Skip to main content

Module layout_policy

Module layout_policy 

Source
Expand description

User-facing layout policy presets and deterministic fallback contract.

This module ties together the three layout subsystems:

It provides three named quality tiers (Quality, Balanced, Fast) and a deterministic fallback contract that maps runtime capabilities to the highest achievable tier.

§Fallback semantics

Given a RuntimeCapability descriptor, LayoutPolicy::resolve returns a fully-resolved ResolvedPolicy that may have been degraded from the requested tier. The degradation path is:

  Quality → Balanced → Fast

Each step disables features that require capabilities not available at runtime (e.g., proportional fonts, sub-pixel rendering, hyphenation dict).

Structs§

LayoutPolicy
User-facing layout policy configuration.
ResolvedPolicy
Fully-resolved layout configuration ready for use by the layout engine.
RuntimeCapability
Descriptor of available runtime capabilities.

Enums§

LayoutTier
Named quality tiers for text layout.
PolicyError
Errors from policy resolution.