Font

Native font.

Modulerequire("yue.gui")
TypeClass

Class methods

default()

Return the default font used for displaying text.

Return

Font

create(name, size, weight, style)

Create a Font implementation with the specified name, DIP size, weight and style.

Parameters

Return

Font

createfrompath(path, size)

Create a Font by reading from |path|. If the font file contains multiple families or weights, only the first encountered font will be used.

Parameters

Return

Font

Methods

derive(sizedelta, weight, style)

Returns a new Font derived from the existing font.

The size_delta is the size in DIP to add to the current font.

Parameters

Return

Font

getname()

Return font's family name.

Return

string

getsize()

Return font's DIP size.

Return

number

getweight()

Return the font weight.

Return

Font::Weight

getstyle()

Return the font style.

Return

Font::Style