Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::TextBackend::ShapingContext::WorkBudget Struct Reference

Shared admission for all primary/fallback calls while preparing contextual fragments. More...

#include "donner/svg/text/TextBackend.h"

Public Member Functions

bool consume (size_t rangeBytes, size_t contextBytes=0)
 Charge range traversal, uncached context detection and bounded surrounding context.

Public Attributes

size_t bytes
size_t calls
bool rejected = false
size_t glyphOutlineVertices = fonts::kMaximumExpandedGlyphVertices
 Aggregate untrusted outline expansion admitted before vertical metric callbacks.
size_t glyphOutlineWork = fonts::kMaximumGlyphOutlineWork
 Aggregate untrusted decode work admitted before vertical metric callbacks.

Detailed Description

Shared admission for all primary/fallback calls while preparing contextual fragments.

Member Function Documentation

◆ consume()

bool donner::svg::TextBackend::ShapingContext::WorkBudget::consume ( size_t rangeBytes,
size_t contextBytes = 0 )
inline

Charge range traversal, uncached context detection and bounded surrounding context.

Parameters
rangeBytesBytes of output text passed to the shaper.
contextBytesAdditional context bytes that must be scanned on this call.

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