TkinterWeb icon indicating copy to clipboard operation
TkinterWeb copied to clipboard

Specify font

Open sjjhsjjh opened this issue 10 months ago • 3 comments

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

sjjhsjjh avatar Apr 03 '24 14:04 sjjhsjjh

Hi! Unfortunately TkinterWeb doesn't support custom fonts, and fixing this is beyond the scope of this project. Sorry.

Andereoo avatar Apr 03 '24 15:04 Andereoo

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.

sjjhsjjh avatar Apr 03 '24 16:04 sjjhsjjh

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!

Andereoo avatar Apr 04 '24 00:04 Andereoo