class UIng::FontDescriptor

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.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(cstruct : LibUI::FontDescriptor = LibUI::FontDescriptor.new) #

[View source]
def self.new(family : String | Nil = nil, size : Int32 | Nil = nil, weight : TextWeight | Nil = nil, italic : TextItalic | Nil = nil, stretch : TextStretch | Nil = nil) #

[View source]

Instance Method Detail

def family #

Auto convert to and from String


[View source]
def family=(value : String) #

[View source]
def finalize #

[View source]
def font_button_font_loaded : Nil #

[View source]
def free : Nil #

[View source]
def free_font_button_font : Nil #

Compatibility alias for #free.


[View source]
def italic #

[View source]
def italic=(value) #

[View source]
def load_control_font : Nil #

[View source]
def prepare_for_font_button_font : Nil #

[View source]
def released? : Bool #

[View source]
def size #

[View source]
def size=(value) #

[View source]
def snapshot : FontDescriptor #

Returns an independently owned copy that remains valid after a borrowed FontButton callback or block descriptor expires.


[View source]
def stretch #

[View source]
def stretch=(value) #

[View source]
def to_unsafe #

[View source]
def weight #

[View source]
def weight=(value) #

[View source]