BLFont Class Reference

Font [C++ API].

Member Functions

Construction & Destruction
Overloaded Operators
Common Functionality
Create Functionality
Glyphs & Text

Additional Inherited Members

- Public Attributes inherited from BLObjectCore

Member Function Documentation

bool BLFont::isValid() const

Tests whether the font is a valid instance.

bool BLFont::empty() const

Tests whether the font is empty, which the same as !isValid().

uint32_t BLFont::faceType() const

Returns the type of the font's associated font-face, see BLFontFaceType.

uint32_t BLFont::faceFlags() const

Returns the flags of the font, see BLFontFaceFlags.

float BLFont::size() const

Returns the size of the font (as float).

int BLFont::unitsPerEm() const

Returns the "units per em" (UPEM) of the font's associated font-face.

const BLFontFace& BLFont::face() const

Returns the font's associated font-face.

Returns the same font-face, which was passed to createFromFace().

const BLArray<BLFontFeature>& BLFont::features() const

Returns the features associated with the font.

const BLArray<BLFontVariation>& BLFont::variations() const

Returns the variations associated with the font.

uint32_t BLFont::weight() const

Returns the weight of the font.

uint32_t BLFont::stretch() const

Returns the stretch of the font.

uint32_t BLFont::style() const

Returns the style of the font.

const BLFontMatrix& BLFont::matrix() const

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.

const BLFontMetrics& BLFont::metrics() const

Returns the scaled metrics of the font.

The returned metrics is a scale of design metrics that match the font size and its options.

const BLFontDesignMetrics& BLFont::designMetrics() const

Returns the design metrics of the font.

The returned metrics is compatible with the metrics of BLFontFace associated with this font.