Skip to content

markFeatureWriter: RightToLeft lookupflag emitted on lookups that cannot honor it (types 4/5/6) #36

Description

@pauldhunt

Observed on main @ 56401be (fetched 2026-07-28), in make_lookup_wrappers (lines 617–638).

Behavior

make_lookup_wrappers appends _RightToLeft_ to the lookup flag whenever the anchor name ends in AR, HE, or RTL:

rtl = anchor_name.endswith(('AR', 'HE', 'RTL'))
lookup_flag = ['lookupflag']
if rtl:
    lookup_flag.append('RightToLeft')

Per the OpenType specification, the RightToLeft lookup flag (0x0001) is honored only by GPOS lookup type 3 (cursive attachment). The lookups this script emits are MARK_BASE_* (type 4), MARK_LIGATURE_* (type 5), and MKMK_MARK_* (type 6). The string cursive does not appear anywhere in the file, so no type-3 lookup is ever produced.

Every RightToLeft the script emits therefore has no effect at shaping time. It compiles cleanly and is inert.

Question

Is this intentional (e.g. forward-compatibility, or parity with hand-authored RTL feature conventions), or is the flag
safe to drop on the non-cursive lookups this script emits?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions