Donner SVG Editor & Engine
SVG-native editor and embeddable SVG2 + CSS3 engine in C++20, with GPU (WebGPU) and compact CPU renderers, built for correctness, security, and performance.
Loading...
Searching...
No Matches
donner::svg::FontFamilyProvider Class Referenceabstract

Interface implemented by each font source (embedded, system) and by the aggregate FontCatalog. More...

#include "donner/svg/resources/FontCatalogTypes.h"

Inheritance diagram for donner::svg::FontFamilyProvider:
[legend]

Public Member Functions

virtual std::vector< FontFamilyInfofamilies () 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 =0
 Load the raw sfnt (TTF/OTF) bytes for family, or an empty vector if unavailable.

Detailed Description

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.

Member Function Documentation

◆ families()

virtual std::vector< FontFamilyInfo > donner::svg::FontFamilyProvider::families ( ) const
pure virtual

List the families this provider can supply.

Implemented in donner::svg::EmbeddedFontProvider, donner::svg::FontCatalog, and donner::svg::SystemFontProvider.

◆ hasFamily()

virtual bool donner::svg::FontFamilyProvider::hasFamily ( std::string_view family) const
pure virtual

Returns true if family is available (case-insensitive).

Implemented in donner::svg::EmbeddedFontProvider, donner::svg::FontCatalog, and donner::svg::SystemFontProvider.

◆ loadFamilyData()

virtual std::vector< uint8_t > donner::svg::FontFamilyProvider::loadFamilyData ( std::string_view family) const
pure virtual

Load the raw sfnt (TTF/OTF) bytes for family, or an empty vector if unavailable.

The returned bytes are suitable for FontManager::loadFontData().

Implemented in donner::svg::EmbeddedFontProvider, donner::svg::FontCatalog, and donner::svg::SystemFontProvider.


The documentation for this class was generated from the following file: