|
|
Donner SVG 0.8.0-pre
SVG editor and embeddable C++20 engine.
|
#include <cstddef>#include <cstdint>#include <span>#include <vector>Classes | |
| struct | donner::fonts::CffGlyphOutlineComplexity |
| Bounded outline cost proved for one CFF or CFF2 glyph. More... | |
| struct | donner::fonts::CffOutlineValidationResult |
| Per-glyph complexities returned by the bounded CFF interpreter. More... | |
Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
Enumerations | |
| enum class | donner::fonts::CffOutlineValidationStatus : uint8_t { Complete , UnsupportedVariation , WorkLimitExceeded , Invalid } |
| Outcome of bounded CFF outline validation. | |
Functions | |
| CffOutlineValidationResult | donner::fonts::ValidateCffOutlineComplexities (std::span< const uint8_t > table, bool cff2, std::size_t expectedGlyphs, std::size_t maximumWork=kMaximumCffOutlineValidationWork) |
| Validate CFF1 or non-variable CFF2 charstrings without materializing outlines. | |
Variables | |
| constexpr std::size_t | donner::fonts::kMaximumCffOutlineValidationWork = 64 * 1024 * 1024 |
| Default whole-font work ceiling for one bounded CFF validation. | |
| CffOutlineValidationResult donner::fonts::ValidateCffOutlineComplexities | ( | std::span< const uint8_t > | table, |
| bool | cff2, | ||
| std::size_t | expectedGlyphs, | ||
| std::size_t | maximumWork = kMaximumCffOutlineValidationWork ) |
Validate CFF1 or non-variable CFF2 charstrings without materializing outlines.
Variable CFF2 operators return CffOutlineValidationStatus::UnsupportedVariation so callers can retain directory validation while failing closed before an untrusted outline decoder. Legacy CFF1 endchar composites include their resolved component costs in the returned bound.
| table | Exact CFF or CFF2 table bytes. |
| cff2 | Whether table uses CFF2 structures and CharStrings. |
| expectedGlyphs | Glyph count from the sfnt maxp table. |
| maximumWork | Caller-owned work remaining for this validation. |