|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
A single entry listed in src:-either a local face, a URL, or inline data. More...
#include "donner/css/FontFace.h"
Public Types | |
| enum class | Kind : uint8_t { Local , Url , Data } |
| Specifies the source type for a font face declaration. More... | |
Public Attributes | |
| Kind | kind |
| Font source kind. | |
| std::variant< RcString, std::shared_ptr< const std::vector< uint8_t > > > | payload |
| The payload of the source, which can be a URL or shared font data bytes. Using shared_ptr for the data variant avoids deep-copying font bytes (~13MB per font set) when FontFace objects are copied across documents, preventing glibc heap fragmentation in test suites. | |
| RcString | formatHint |
| Format hint, if provided, e.g. "woff2" or "opentype". | |
| std::vector< RcString > | techHints |
| Technology hints, if provided, e.g. {"variations","color-COLRv1"}. | |
| bool | trusted = false |
| True only for application-controlled font bytes, never parsed document sources. | |
A single entry listed in src:-either a local face, a URL, or inline data.
FontFaceIdentityKey is total over every field below: it is what decides whether two declarations are the same declaration, and callers deduplicate on it, dropping the later of two that match. A field added here without being added there makes two sources that differ only in that field indistinguishable, and the second one is then silently discarded in favour of the first. Extend the key with any field added here.
|
strong |