Skip to content

Shaper Driven Itemisation #462

@taj-p

Description

@taj-p

Today, the text pipeline is dominated by 2 stages: shaping and font selection as shown in the below profile:

Image

Per @behdad's comment (see 2. in harfbuzz/harfrust#297 (comment)), it appears that a more correct and, likely, faster approach is to perform shaper-driven itemization where:

you simply shape the text with your primary font, then look for unshaped holes in the middle and reshape those holes with the next font, and next font, etc. This sidesteps the classic font fallback itemization.

The hope is that this strategy could consolidate the redundant work happening in shaping and font selection (charmap lookups and normalisation). Moreover, it could help us be more correct since, as Behdad states, it's unlikely for us to succeed in making our itemizer match the same normalisation applied by the shaper.

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