|
|
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.
|
FontFamilyProvider backed by the host operating system's installed fonts. More...
#include "donner/svg/resources/SystemFontProvider.h"
Public Member Functions | |
| std::vector< FontFamilyInfo > | families () const override |
| List the families this provider can supply. | |
| bool | hasFamily (std::string_view family) const override |
Returns true if family is available (case-insensitive). | |
| std::vector< uint8_t > | loadFamilyData (std::string_view family) const override |
Load the raw sfnt (TTF/OTF) bytes for family, or an empty vector if unavailable. | |
Static Public Member Functions | |
| static bool | isSupported () |
| Returns true if this build enumerates real system fonts (i.e. macOS), false for the stub. | |
FontFamilyProvider backed by the host operating system's installed fonts.
On macOS this enumerates families via CoreText (CTFontManagerCopyAvailableFontFamilyNames) and materializes a flat sfnt byte stream on demand by reconstructing the font's tables through CoreText (which works even for .ttc/.dfont members). All families report FontSource::System.
On non-Apple platforms this is a stub: it enumerates nothing and loads nothing, so the catalog still compiles and behaves (embedded fonts only).
|
overridevirtual |
List the families this provider can supply.
Implements donner::svg::FontFamilyProvider.
|
overridevirtual |
Returns true if family is available (case-insensitive).
Implements donner::svg::FontFamilyProvider.
|
overridevirtual |
Load the raw sfnt (TTF/OTF) bytes for family, or an empty vector if unavailable.
The returned bytes are suitable for FontManager::loadFontData().
Implements donner::svg::FontFamilyProvider.