TkinterWeb
TkinterWeb copied to clipboard
Specify font
Hi, How can fonts be specified in TkinterWeb please? I'm working on an application that has embedded static content and .ttf files. The usual CSS doesn't seem to work. There doesn't seem to be any debug message when it tries to load a font either. Cheers, Jim
Hi! Unfortunately TkinterWeb doesn't support custom fonts, and fixing this is beyond the scope of this project. Sorry.
Thank you for the prompt reply. How about using the Tk font-setting mechanism on a TkInterWeb instance? Maybe it inherits a default font-setting mechanism common to all Tk widgets.
Great idea! I hadn't thought of that. I just tried it but no avail. TkinterWeb is based on the Tkhtml3 web engine, which is mainly written in C (not Tcl and Python, like the rest of Tkinter) and because of this there are still some gaps between the two. It is also discontinued, so many web standards were never fully implemented in it. Sorry!