It updates the weight of fontExample to be normal. All widgets have the same Font object will be updated to the new font style. The advantage of using Font object rather than font tuple type is that the same Font object could be assigned to different widgets and could be programmatically updated with nfigure method. overstrike - strikeout of the font, False or True.underline - underlining of the font, False or True.family - font family, like Arial, Courier.import tkinter as tkįontExample = tkFont.Font(family="Arial", size=16, weight="bold", slant="italic") If you don't have it you can try some similar fonts here: SIMILAR FREE FONTS for NSimSun.
If you have installed Microsoft Windows 10 it should be available. This font is part of Microsoft Windows 10 software package so it cannot be downloaded separately. We could also set the font with a font object of tkFont module. nsimsun copyright zhongyi electronic 2001. Set Font for Tkinter Text Widget With tkFont It sets the font to be Courier, italic with the size of 16. SimSun & NSimSun (Subset 260) A Subset 260 font that includes only the CP1252 and GB2312 characters. Set Font for Tkinter Text Widget import tkinter as tk SimSun & NSimSun (Subset 250) A Subset 250 font that includes only the 12,13,15,16 PPEM bitmap ranges. The font could be either a tuple type or a Tkinter Font object.
Set Font for Tkinter Text Widget With tkFontĬonfigure method of Tkinter Text widget specifies properties of Text, like text font.Created: February-22, 2020 | Updated: December-10, 2020 Using the NSimSun font in the Windows 10 console hosting PowerShell Preview, attempt using characters such as the curly double quotes or emdash on the command line.