本文整理匯總了Python中pango.WEIGHT_ULTRALIGHT屬性的典型用法代碼示例。如果您正苦於以下問題:Python pango.WEIGHT_ULTRALIGHT屬性的具體用法?Python pango.WEIGHT_ULTRALIGHT怎麽用?Python pango.WEIGHT_ULTRALIGHT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類pango
的用法示例。
在下文中一共展示了pango.WEIGHT_ULTRALIGHT屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: set_weight
# 需要導入模塊: import pango [as 別名]
# 或者: from pango import WEIGHT_ULTRALIGHT [as 別名]
def set_weight(self, weight):
"""
Set the font weight. weight has to be one of the following:
- label.WEIGHT_ULTRALIGHT
- label.WEIGHT_LIGHT
- label.WEIGHT_NORMAL
- label.WEIGHT_BOLD
- label.WEIGHT_ULTRABOLD
- label.WEIGHT_HEAVY
@param weight: the font weight
@type weight: one of the constants above.
"""
self.set_property("weight", weight)
self.emit("appearance_changed")