|
|
| SfntFont (SfntFont &&) noexcept |
|
SfntFont & | operator= (SfntFont &&) noexcept |
|
| SfntFont (const SfntFont &)=delete |
|
SfntFont & | operator= (const SfntFont &)=delete |
| std::optional< std::span< const uint8_t > > | findTable (std::span< const uint8_t > data, std::string_view tag) const |
| | Find a validated table in data.
|
|
bool | hasTable (std::string_view tag) const |
| | Return true when the validated directory contains tag.
|
|
size_t | numTables () const |
| | Number of validated directory entries.
|
|
size_t | numGlyphs () const |
| | Number of glyphs with retained outline bounds, or zero when validation was unavailable.
|
|
std::optional< GlyphOutlineComplexity > | glyphOutlineComplexity (size_t glyphIndex) const |
| | Return the validation-time outline bound for a glyph.
|
|
size_t | retainedBytes () const |
| | Exact dynamic bytes retained by the sorted directory and outline indexes.
|
Validated, allocation-bounded index for one sfnt font.
Table records are sorted once, making lookup O(log T). TrueType glyf fonts also retain a validated loca index and are accepted only when every compound dependency is acyclic, at most kMaximumCompoundGlyphDepth frames deep, and within the expanded vertex and outline-work caps. The work model includes repeated and shared descendants, simple point decoding, component transforms, and stb_truetype's repeated prefix copies.
CFF and non-variable CFF2 outlines also receive bounded CharString validation. CFF tables must still be consumed by an exact-span parser such as FreeType; stb_truetype's CFF parser uses a synthetic 512 MiB span and must not be initialized for untrusted CFF fonts.