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::EmbeddedFontProvider Class Reference

FontFamilyProvider backed by the curated Google Fonts set embedded into the build. More...

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

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

Public Member Functions

std::vector< FontFamilyInfofamilies () 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.

Detailed Description

FontFamilyProvider backed by the curated Google Fonts set embedded into the build.

The family table is generated from third_party/google_fonts/fonts.bzl (see the DONNER_GF_ENTRY x-macro include), so it always matches the fetched-and-embedded bytes. All families report FontSource::Embedded.

Member Function Documentation

◆ families()

std::vector< FontFamilyInfo > donner::svg::EmbeddedFontProvider::families ( ) const
overridevirtual

List the families this provider can supply.

Implements donner::svg::FontFamilyProvider.

◆ hasFamily()

bool donner::svg::EmbeddedFontProvider::hasFamily ( std::string_view family) const
overridevirtual

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

Implements donner::svg::FontFamilyProvider.

◆ loadFamilyData()

std::vector< uint8_t > donner::svg::EmbeddedFontProvider::loadFamilyData ( std::string_view family) const
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.


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