Skip to main content

calculate_colr_metrics

Function calculate_colr_metrics 

Source
fn calculate_colr_metrics<'a>(
    font_size: f32,
    draw_props: DrawProps,
    glyph: Glyph,
    font_ref: &'a FontRef<'a>,
    color_glyph: &ColorGlyph<'a>,
    location: LocationRef<'a>,
    outline_cache: &mut OutlineCacheSession<'_>,
    font_info: FontInfo,
) -> ColrMetrics
Expand description

Calculate COLR glyph metrics (scale factors, bounding box, etc.).

This computes the intermediate values needed for both creating the GlyphColr and calculating its positioning transform.