[Python] Fontforge - Why is the GPOS pairing not working when there are two subsequent kerned...

Discussão em 'Python' iniciado por Stack, Abril 16, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to fix kerning in a font. It works fine except if there are two kerned glyphs after each other, see picture.

    AW AW

    This is the code I use

    if abs(round_kerning_value) > 20:
    left_glyph.addPosSub(subtable_name, right_glyph_name,
    0, 0, 0, 0, # No change to first glyph
    round_kerning_value, 0, round_kerning_value, 0) # Apply kerning to second glyph


    This is the relevant part of the docs. https://fontforge.org/docs/scripting/python/fontforge.html#font

    glyph.addPosSub(subtable_name, other_glyph_name, xoff1, yoff1, xadv1, yadv1, xoff2, yoff2, xadv2, yadv2)


    What am I doing wrong?

    Continue reading...

Compartilhe esta Página