Blend2D
2D Vector Graphics Engine
Creates a default initialized font
A default initialized font is not a valid font that could be used for rendering. It can be considered an empty or null font, which has no family, no glyphs, no tables, it's essentially empty.
Copy constructor makes a weak copy of the underlying representation of the other
font.
Move constructor moves the underlying representation of the other
font into this newly created instance and resets the other
font to a default constructed state.
Destroys the font.
Returns whether the font is valid, which means that it was constructed from a valid BLFontFace.
Resets the font to a default constructed state.
Swaps the underlying representation of this font with the other
font.
Copy assignment creates a weak copy of the underlying representation of the other
font and stores it in this font.
Move assignment moves the underlying representation of the other
font into this font and then resets the other
font to a default constructed state.
Tests whether the font is a valid instance.
Tests whether the font is empty, which is the same as !isValid()
.
Tests whether this and other
fonts are equal.
Creates a new font from the existing font face
scaled to the given size
.
Creates a new font from the existing font face
scaled to the given size
.
This is an overloaded function that takes additional argument `featureSettings.
Creates a new font from the existing font face
scaled to the given size
.
This is an overloaded function that takes additional arguments, which are used to override font featureSettings
and font variationSettings
.
Returns the type of the font's associated font face.
Returns the flags of the font.
Returns the size of the font (as float).
Returns the font's associated font face.
Returns the same font face, which was passed to createFromFace()
.
Returns the weight of the font.
Returns the stretch of the font.
Returns the style of the font.
Returns the "units per em" (UPEM) of the font's associated font face.
Returns a 2x2 matrix of the font.
The returned BLFontMatrix is used to scale fonts from design units into user units. The matrix usually has a negative m11
member as fonts use a different coordinate system than Blend2D.
Returns the scaled metrics of the font.
The returned metrics is a scale of design metrics that match the font size and its options.
Returns the design metrics of the font.
The returned metrics is compatible with the metrics of BLFontFace associated with this font.
Returns font feature settings.
Sets font feature settings to featureSettings
.
Returns font variation settings.
Sets font variation settings to variationSettings
.
Retrieves outlines of a single glyph into the out
path.
Optionally, a user can provide a sink
function with userData
, which will be called periodically by the glyph outline decoder. The sink
can be used to immediately process the outline to prevent accumulating a large path in out
.
Retrieves outlines of a single glyph into the out
path transformed by userTransform
.
Optionally, a user can provide a sink
function with userData
, which will be called periodically by the glyph outline decoder. The sink
can be used to immediately process the outline to prevent accumulating a large path in out
.
Retrieves outlines of a glyph run into the out
path.
Optionally, a user can provide a sink
function with userData
, which will be called periodically by the glyph outline decoder. The sink
can be used to immediately process the outline to prevent accumulating a large path in out
.
Retrieves outlines of a glyph run into the out
path transformed by userTransform
.
Optionally, a user can provide a sink
function with userData
, which will be called periodically by the glyph outline decoder. The sink
can be used to immediately process the outline to prevent accumulating a large path in out
.