-
Notifications
You must be signed in to change notification settings - Fork 64
Description
Today, the text pipeline is dominated by 2 stages: shaping and font selection as shown in the below profile:
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.