Skip to main content

simple_deltas

Function simple_deltas 

Source
fn simple_deltas<C, D>(
    var_data: Option<GlyphVariationData<'_>>,
    (coords, gvar_scalars): (&[F2Dot14], &[Fixed]),
    points: &[Point<C>],
    flags: &mut [PointFlags],
    contours: &[u16],
    buffers: &mut DeltaBuffers<'_, D>,
) -> bool
where C: PointCoord, D: PointCoord + From<C>,
Expand description

Computes the deltas for a simple glyph of a varying font, and reports whether the caller should take its delta path.

The glyph takes that path even with no variation data of its own, on zeroed deltas. That looks wasteful and is not: Scale26Dot6 scales (font units + delta) and shifts back down, which does not round the same way as scaling the font units alone, so a whole 26.6 unit rides on which path runs. FreeType makes the same distinction.