wxPython development of combat Font Comments

wx.Font object determining the appearance of a text. Can, for example TextCtrl, Button, Label other controls to indicate the text displayed by setFont (Font Object).

Its constructor as follows:

wx.Font(pointSize,family,style,weight,underline,faceName,encoding)

parameter Explanation
pointSize pointSize is in points integer size of the font.
family family used to quickly specify a font without having to know the actual name of the font. accurate font choice depends on the system and the specific fonts available. you get the exact font will depend on your system. Font categories are as follows: wx.DECORATIVE: a formal, old English style font. wx.DEFAULT: the system default font. wx.MODERN: a single interval (fixed pitch characters) font. wx.ROMAN: serif font, usually similar to Times New Roman. wx.SCRIPT: handwriting or cursive. wx.SWISS:sans-serif font, usually similar to Helvetica or Arial.
style font style parameter indicates whether the tilt, its values ​​are: wx.NORMAL, wx.SLANT, wx.ITALIC
weight weight parameter specifies the font boldness, his values ​​are: wx.NORMAL, wx.LIGHT, wx.BOLD
underline underline parameters work only on Windows systems, if the value is True, underlined, False is not underlined.
faceName faceName parameter specifies the font name.
encoding encoding parameter allows you to select one of several coding, mapping its internal character and word present display characters. Unicode encoding is not encoded, except for a different 8-bit encoding of wxPython. In most cases you can use the default encoding.

Transfer: https://blog.csdn.net/u014647208/article/details/78486370

发布了84 篇原创文章 · 获赞 250 · 访问量 15万+

Guess you like

Origin blog.csdn.net/ygdxt/article/details/89240321