Skip to main content

calculate_colr_transform

Function calculate_colr_transform 

Source
fn calculate_colr_transform(metrics: &ColrMetrics) -> Affine
Expand description

Calculate transform for COLR glyphs.

This uses pre-calculated metrics to compute the final positioning transform for a COLR glyph, taking into account:

  • Y-axis flip (fonts use upside-down coordinate system)
  • Scale compensation (to avoid double-application of run transform scale)
  • Bounding box alignment