BLFontManager Class Reference

Font manager [C++ API].

Member Functions

Construction & Destruction
Overloaded Operators
Common Functionality
Create Functionality
Face Management

Static Functions

Additional Inherited Members

- Public Attributes inherited from BLFontManagerCore

Member Function Documentation

bool BLFontManager::isNone() const

Tests whether the font-data is a built-in null 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 BLFontFace& face) const

Tests whether the font manager contains the given font face.

BLResult BLFontManager::addFace(const BLFontFace& 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, BLFontFace& out) const[1/4]

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

BLResult BLFontManager::queryFace(const BLStringView& name, BLFontFace& 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, BLFontFace& 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(const BLStringView& name, const BLFontQueryProperties& properties, BLFontFace& 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(const 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.