Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::canvas::ResolvedFont Struct Reference

#include <font_resolver.hpp>

Public Member Functions

bool has_typeface () const noexcept
bool resolved () const noexcept
bool supports_color_font () const noexcept
 Does the resolved typeface carry color-glyph tables?
bool color_font_active () const noexcept
 Composite of color_font_mode + supports_color_font().

Public Attributes

std::string actual_family
 Family name reported by the chosen face.
FallbackOrigin origin = FallbackOrigin::NotFound
FontScopeId scope
std::uint64_t generation = 0
 merged_generation_for(options.scope) at resolve time.
std::vector< FallbackTraceStep > trace
SynthesisTrace synthesis
AntiAliasMode aa_mode = AntiAliasMode::Default
 AA/hinting policy carried over from the originating FontOptions.
HintingMode hinting_mode = HintingMode::PlatformDefault
ColorFontMode color_font_mode = ColorFontMode::Auto
 Color-font mode carried from FontOptions.

Member Function Documentation

◆ color_font_active()

bool pulp::canvas::ResolvedFont::color_font_active ( ) const
noexcept

Composite of color_font_mode + supports_color_font().

Tells the painter whether to render color glyphs from this face. Auto → true iff supports_color_font() Bitmap/COLR/SVG → true iff supports_color_font() (mode hint selects the table; Skia auto-prefers when multiple are present) ForceMonochrome → false (always render mono)

◆ has_typeface()

bool pulp::canvas::ResolvedFont::has_typeface ( ) const
inlinenoexcept

◆ resolved()

bool pulp::canvas::ResolvedFont::resolved ( ) const
inlinenoexcept

◆ supports_color_font()

bool pulp::canvas::ResolvedFont::supports_color_font ( ) const
noexcept

Does the resolved typeface carry color-glyph tables?

Checks for any of: COLR — v0/v1 vector color (Microsoft / OpenType) CPAL — color palette companion to COLR CBDT / CBLC — bitmap color emoji (Google / Apple) sbix — Apple bitmap strikes (Apple Color Emoji) SVG — SVG-in-OT (Adobe / Mozilla) Returns false when there's no typeface or no color tables. Independent of color_font_mode — that says what the caller wants; this says what the font actually has. Always available (returns false on non-Skia builds where no typeface is loaded).

Member Data Documentation

◆ aa_mode

AntiAliasMode pulp::canvas::ResolvedFont::aa_mode = AntiAliasMode::Default

AA/hinting policy carried over from the originating FontOptions.

Recorded at resolve time so paint paths can derive Skia flags without round-tripping through the original options blob.

◆ actual_family

std::string pulp::canvas::ResolvedFont::actual_family

Family name reported by the chosen face.

◆ color_font_mode

ColorFontMode pulp::canvas::ResolvedFont::color_font_mode = ColorFontMode::Auto

Color-font mode carried from FontOptions.

Determines whether the painter should render color glyphs (COLR/CPAL, SVG-in-OT, bitmap emoji) when the typeface supports them.

◆ generation

std::uint64_t pulp::canvas::ResolvedFont::generation = 0

merged_generation_for(options.scope) at resolve time.

◆ hinting_mode

HintingMode pulp::canvas::ResolvedFont::hinting_mode = HintingMode::PlatformDefault

◆ origin

FallbackOrigin pulp::canvas::ResolvedFont::origin = FallbackOrigin::NotFound

◆ scope

FontScopeId pulp::canvas::ResolvedFont::scope

◆ synthesis

SynthesisTrace pulp::canvas::ResolvedFont::synthesis

◆ trace

std::vector<FallbackTraceStep> pulp::canvas::ResolvedFont::trace

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