Hi, On Fri, 28 Jul 2023 09:08:11 -0600 Bob Greschke <b...@passcal.nmt.edu> wrote:
> Hi! > > I'm plotting some stuff to a Canvas() (second-by-second signal-to-noise > values for GPS satellites) and using something like > > > > in the program to get the font to use for text labels and stuff on the > canvas. > > I can't figure out how to get the same font for the an Image (so I can > duplicate the Canvas and save it as a png, of course). Without > specifying anything the text used on the image looks something like > Courier. > do you use Canvas.postscript() to export the canvas contents to an image? If yes, the problem is probably that Tk and postscript disagree about the exact spelling of the font name and so postscript falls back to some default font. (As a side note: PROGPropFont = Font(font = Entry()["font"]) seems a bit over-complicated to me, simply doing PROGPropFont = Font(name = "TkDefaultFont", exists = True) should give you the same result. scnr :) ) Have a nice day, Michael _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org https://mail.python.org/mailman/listinfo/tkinter-discuss