class
UIng::FontDescriptor
- UIng::FontDescriptor
- Reference
- Object
Overview
Describes a font and owns its family name until #free is called.
Descriptors yielded by FontButton callbacks and block methods are valid only for the duration of the block. Use #snapshot to retain their values.
Defined in:
uing/font_descriptor.crConstructors
- .new(cstruct : LibUI::FontDescriptor = LibUI::FontDescriptor.new)
- .new(family : String | Nil = nil, size : Int32 | Nil = nil, weight : TextWeight | Nil = nil, italic : TextItalic | Nil = nil, stretch : TextStretch | Nil = nil)
Instance Method Summary
-
#family
Auto convert to and from String
- #family=(value : String)
- #finalize
- #font_button_font_loaded : Nil
- #free : Nil
-
#free_font_button_font : Nil
Compatibility alias for #free.
- #italic
- #italic=(value)
- #load_control_font : Nil
- #prepare_for_font_button_font : Nil
- #released? : Bool
- #size
- #size=(value)
-
#snapshot : FontDescriptor
Returns an independently owned copy that remains valid after a borrowed FontButton callback or block descriptor expires.
- #stretch
- #stretch=(value)
- #to_unsafe
- #weight
- #weight=(value)
Constructor Detail
def self.new(family : String | Nil = nil, size : Int32 | Nil = nil, weight : TextWeight | Nil = nil, italic : TextItalic | Nil = nil, stretch : TextStretch | Nil = nil)
#
Instance Method Detail
def snapshot : FontDescriptor
#
Returns an independently owned copy that remains valid after a borrowed FontButton callback or block descriptor expires.