Skip to content

[skrifa] metrics.left_side_bearing does not apply variations #1747

@simoncozens

Description

@simoncozens

For Roboto:

            let aw = glyph_metrics.advance_width(*old_gid).unwrap_or(0.0);
            let ls = glyph_metrics.left_side_bearing(*old_gid).unwrap_or(0.0);
            println!(
                "Collecting metrics for gid {:?} at location: {:?}: aw {}, ls {}",
                old_gid, location, aw, ls
            );
Collecting metrics for gid GlyphId(20) at location: LocationRef([-1.0, 0.0]): aw 1121, ls 115
Collecting metrics for gid GlyphId(20) at location: LocationRef([0.0, 0.0]): aw 1151, ls 115
Collecting metrics for gid GlyphId(20) at location: LocationRef([1.0, 0.0]): aw 1187, ls 115
Collecting metrics for gid GlyphId(20) at location: LocationRef([0.0, -1.0]): aw 1011, ls 115

Notice that advance width does get variations applied, but lsb does not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions