BLFontManager Class Referencefinal

Font manager [C++ API].

Member Functions

Construction & Destruction
Overloaded Operators
Common Functionality
Create Functionality
Face Management

Additional Inherited Members

- Public Attributes inherited from BLObjectCore

Member Function Documentation

bool BLFontManager::isValid() const◆ 

Tests whether the font-manager is a valid FontManager and not a built-in default instance.

size_t BLFontManager::faceCount() const◆ 

Returns the number of BLFontFace instances the font manager holds.

size_t BLFontManager::familyCount() const◆ 

Returns the number of unique font families the font manager holds.

bool BLFontManager::hasFace(const BLFontFaceCore& face) const◆ 

Tests whether the font manager contains the given font face.

BLResult BLFontManager::addFace(const BLFontFaceCore& face)◆ 

Adds a font face to the font manager.

Important conditions:

  • BL_SUCCESS is returned if the face was successfully added to font manager or if font manager already held it.
  • BL_ERROR_FONT_NOT_INITIALIZED is returned if the font face is invalid.
  • BL_ERROR_OUT_OF_MEMORY is returned if memory allocation failed.

BLResult BLFontManager::queryFace(const char* name, BLFontFaceCore& out) const[1/4]◆ 

Queries a font face by family name and stores the result to out.

BLResult BLFontManager::queryFace(BLStringView name, BLFontFaceCore& out) const[2/4]◆ 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLResult BLFontManager::queryFace(const char* name, const BLFontQueryProperties& properties, BLFontFaceCore& out) const[3/4]◆ 

Queries a font face by family name and stores the result to out.

A properties parameter contains query properties that the query engine will consider when doing the match. The best candidate will be selected based on the following rules:

  • Style has the highest priority.
  • Weight has the lowest priority.

BLResult BLFontManager::queryFace(BLStringView name, const BLFontQueryProperties& properties, BLFontFaceCore& out) const[4/4]◆ 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

BLResult BLFontManager::queryFacesByFamilyName(const char* name, BLArray<BLFontFace>& out) const[1/2]◆ 

Queries all font faces by family name and stores the result to out.

BLResult BLFontManager::queryFacesByFamilyName(BLStringView name, BLArray<BLFontFace>& out) const[2/2]◆ 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.