IndexTextBLFontFace
BLFontFace Class Referencefinal

Font face [C++ API].

Member Functions

Construction & Destruction
Overloaded Operators
Common Functionality
Create Functionality
Properties

Additional Inherited Members

- Public Attributes inherited from BLObjectCore

bool BLFontFace::isValid() constnoexcept[¶]

Tests whether the font face is valid.

bool BLFontFace::empty() constnoexcept[¶]

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

BLResult BLFontFace::createFromFile(
const char* fileName,
)noexcept[¶]

Creates a new BLFontFace from a file specified by fileName.

This is a utility function that first creates a BLFontData` and then calls createFromData(fontData, 0). See BLFontData::createFromFile() for more details, especially the use of readFlags is important for system fonts.

Note
This function offers a simplified creation of BLFontFace directly from a file, but doesn't provide as much flexibility as createFromData() as it allows to specify a faceIndex, which can be used to load multiple font faces from a TrueType/OpenType collection. The use of createFromData() is recommended for any serious font handling.

BLResult BLFontFace::createFromData(
const BLFontDataCore& fontData,
uint32_t faceIndex
)noexcept[¶]

Creates a new BLFontFace from BLFontData at the given faceIndex.

On success the existing BLFontFace is completely replaced by a new one, on failure an error is returned in BLResult and the existing BLFontFace is kept as is.

uint32_t BLFontFace::weight() constnoexcept[¶]

Returns font weight (returns default weight in case this is a variable font).

uint32_t BLFontFace::stretch() constnoexcept[¶]

Returns font stretch (returns default weight in case this is a variable font).

uint32_t BLFontFace::style() constnoexcept[¶]

Returns font style.

const BLFontFaceInfo& BLFontFace::faceInfo() constnoexcept[¶]

Returns font face information as BLFontFaceInfo.

BLFontFaceType BLFontFace::faceType() constnoexcept[¶]

Returns the font face type.

BLFontOutlineType BLFontFace::outlineType() constnoexcept[¶]

Returns the font face type.

uint32_t BLFontFace::glyphCount() constnoexcept[¶]

Returns the number of glyphs this font face provides.

uint32_t BLFontFace::faceIndex() constnoexcept[¶]

Returns a zero-based index of this font face.

Note
Face index does only make sense if this face is part of a TrueType or OpenType font collection. In that case the returned value would be the index of this face in that collection. If the face is not part of a collection then the returned value would always be zero.

BLFontFaceFlags BLFontFace::faceFlags() constnoexcept[¶]

Returns font face flags.

bool BLFontFace::hasFaceFlag() constnoexcept[¶]

Tests whether the font face has a given flag set.

bool BLFontFace::hasTypographicNames() constnoexcept[¶]

Tests whether the font face uses typographic family and subfamily names.

bool BLFontFace::hasTypographicMetrics() constnoexcept[¶]

Tests whether the font face uses typographic metrics.

bool BLFontFace::hasCharToGlyphMapping() constnoexcept[¶]

Tests whether the font face provides character to glyph mapping.

bool BLFontFace::hasHorizontalMetrics() constnoexcept[¶]

Tests whether the font face has horizontal glyph metrics (advances, side bearings).

bool BLFontFace::hasVerticalMetrics() constnoexcept[¶]

Tests whether the font face has vertical glyph metrics (advances, side bearings).

bool BLFontFace::hasHorizontalKerning() constnoexcept[¶]

Tests whether the font face has a legacy horizontal kerning feature ('kern' table with horizontal kerning data).

bool BLFontFace::hasVerticalKerning() constnoexcept[¶]

Tests whether the font face has a legacy vertical kerning feature ('kern' table with vertical kerning data).

bool BLFontFace::hasOpenTypeFeatures() constnoexcept[¶]

Tests whether the font face has OpenType features (GDEF, GPOS, GSUB).

bool BLFontFace::hasPanoseData() constnoexcept[¶]

Tests whether the font face has panose classification.

bool BLFontFace::hasUnicodeCoverage() constnoexcept[¶]

Tests whether the font face has unicode coverage information.

bool BLFontFace::hasBaselineYAt0() constnoexcept[¶]

Tests whether the font face's baseline equals 0.

bool BLFontFace::hasLSBPointXAt0() constnoexcept[¶]

Tests whether the font face's left sidebearing point at x equals 0.

bool BLFontFace::hasVariationSequences() constnoexcept[¶]

Tests whether the font face has unicode variation sequences feature.

bool BLFontFace::hasOpenTypeVariations() constnoexcept[¶]

Tests whether the font face has OpenType Font Variations feature.

bool BLFontFace::isSymbolFont() constnoexcept[¶]

This is a symbol font.

bool BLFontFace::isLastResortFont() constnoexcept[¶]

This is a last resort font.

BLFontFaceDiagFlags BLFontFace::diagFlags() constnoexcept[¶]

Returns font face diagnostics flags.

BLUniqueId BLFontFace::uniqueId() constnoexcept[¶]

Returns a unique identifier describing this BLFontFace.

const BLFontData& BLFontFace::data() constnoexcept[¶]

Returns BLFontData associated with this font face.

const BLString& BLFontFace::fullName() constnoexcept[¶]

Returns a full of the font.

const BLString& BLFontFace::familyName() constnoexcept[¶]

Returns a family name of the font.

const BLString& BLFontFace::subfamilyName() constnoexcept[¶]

Returns a subfamily name of the font.

const BLString& BLFontFace::postScriptName() constnoexcept[¶]

Returns a PostScript name of the font.

const BLFontDesignMetrics& BLFontFace::designMetrics() constnoexcept[¶]

Returns design metrics of this BLFontFace.

int BLFontFace::unitsPerEm() constnoexcept[¶]

Returns units per em, which are part of font's design metrics.

const BLFontPanose& BLFontFace::panose() constnoexcept[¶]

Returns PANOSE classification of this BLFontFace`.

const BLFontUnicodeCoverage& BLFontFace::unicodeCoverage() constnoexcept[¶]

Returns unicode coverage of this BLFontFace.

Note
The returned unicode-coverage is not calculated by Blend2D so in general the value doesn't have to be correct. Consider getCharacterCoverage() to get a coverage calculated by Blend2D at character granularity.

BLResult BLFontFace::getCharacterCoverage() constnoexcept[¶]

Calculates the character coverage of this BLFontFace.

Each unicode character is represented by a single bit in the given BitSet.

bool BLFontFace::hasScriptTag(
BLTag scriptTag
) constnoexcept[¶]

Tests whether the font face provides the given OpenType scriptTag.

bool BLFontFace::hasFeatureTag(
BLTag featureTag
) constnoexcept[¶]

Tests whether the font face provides the given OpenType featureTag.

bool BLFontFace::hasVariationTag(
BLTag variationTag
) constnoexcept[¶]

Tests whether the font face provides the given OpenType variationTag.

BLResult BLFontFace::getScriptTags() constnoexcept[¶]

Retrieves OpenType script tags provided by this BLFontFace.

Each script tag is represented by 4 characters encoded in BLTag.

BLResult BLFontFace::getFeatureTags() constnoexcept[¶]

Retrieves OpenType feature tags provided by this BLFontFace.

Each feature tag is represented by 4 characters encoded in BLTag.

Feature tag registry:

BLResult BLFontFace::getVariationTags() constnoexcept[¶]

Retrieves OpenType variation tags provided by this BLFontFace.

Each variation tag is represented by 4 characters encoded in BLTag.

Variation tag registry: