Font
Native font.
| Module | require("gui") |
| Type | Class |
Class methods
default()
Return the default font used for displaying text.
Return
Fontcreate(name, size, weight, style)
Create a Font implementation with the specified name, DIP size,
weight and style.
Parameters
StringnameNumbersizeFont::WeightweightFont::Stylestyle
Return
FontcreateFromPath(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
StringpathNumbersize
Return
FontMethods
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
NumbersizeDeltaFont::WeightweightFont::Stylestyle
Return
FontgetName()
Return font's family name.
Return
StringgetSize()
Return font's DIP size.
Return
NumbergetWeight()
Return the font weight.
Return
Font::WeightgetStyle()
Return the font style.
Return
Font::Style