|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
Interface implemented by each font source (embedded, system) and by the aggregate FontCatalog. More...
#include "donner/svg/resources/FontCatalogTypes.h"
Public Member Functions | |
| virtual std::vector< FontFamilyInfo > | families () const =0 |
| List the families this provider can supply. | |
| virtual bool | hasFamily (std::string_view family) const =0 |
Returns true if family is available (case-insensitive). | |
| virtual std::vector< uint8_t > | loadFamilyData (std::string_view family, const FontFaceRequest &request) const =0 |
Load the raw sfnt (TTF/OTF) bytes for the face of family that best matches request, or an empty vector if the family is unavailable. | |
Interface implemented by each font source (embedded, system) and by the aggregate FontCatalog.
Lets FontManager resolve a font-family name against providers without depending on the (potentially large) embedded font bytes: the core engine sees only this interface, and the editor injects a concrete catalog.
All lookups by family name are case-insensitive.
|
pure virtual |
List the families this provider can supply.
Implemented in donner::svg::EmbeddedFontProvider, donner::svg::FontCatalog, and donner::svg::SystemFontProvider.
|
pure virtual |
Returns true if family is available (case-insensitive).
Implemented in donner::svg::EmbeddedFontProvider, donner::svg::FontCatalog, and donner::svg::SystemFontProvider.
|
pure virtual |
Load the raw sfnt (TTF/OTF) bytes for the face of family that best matches request, or an empty vector if the family is unavailable.
Providers that only hold a single file per family return it for every request, which means bold and italic render as regular for those families - see EmbeddedFontProvider.
The returned bytes are suitable for FontManager::loadFontData().
| family | Family name to load (case-insensitive). |
| request | Face within the family to prefer. |
Implemented in donner::svg::EmbeddedFontProvider, donner::svg::FontCatalog, and donner::svg::SystemFontProvider.