Skip to content

Mark is positioned incorrectly after forming ligature #543

@NorbertLindenberg

Description

@NorbertLindenberg

I found this bug in Firefox 55.0.3 and reported it as Mozilla bug 1401870; @jfkthame suggested filing it here.

The attached font and HTML file demonstrate a bug that was found during development of a Burmese font. Burmese requires glyph reordering, ligature formation, and mark-to-base and mark-to-mark positioning.

In the test font, the marks u (U+102F) and anusvara (U+1036) are positioned relative to the base nna (U+100F) via anchor attachments. When tested by themselves, this works fine. Positioning of the anusvara also works fine when a medial ra (U+103C) is present. However, when a medial ra is present, the font forms a ligature from medial ra and u in order to position them together. The rule for this is

feature blws {
    script mym2;

    lookup raMedial_uMark_myanmar {
        lookupflag IgnoreBaseGlyphs UseMarkFilteringSet @below_base_myanmar;
        sub raMedial-myanmar uMark-myanmar by raMedial_uMark-myanmar;
    } raMedial_uMark_myanmar;
};

After the ligature is formed, the anusvara is no longer positioned correctly. It appears that the shaping engine loses track of nna as the base and positions relative to the medial ra + u ligature instead.

The same problem does not occur in Safari 11.0 on macOS 10.12.6.

Firefox bug.zip

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