[HarfBuzz] Windows 10 monbaiti.ttf upgrade (5.01 -> 5.51) caused loss of diacritical marks when shaped with harfbuz

Jonathan Kew jfkthame at gmail.com
Fri Dec 4 10:51:21 PST 2015


On 4/12/15 17:14, Tom Hindle wrote:
> Hi,
>
> I noticed in windows 10 that when using System Mongolian Baiti Font,
> text shaping via harfbuz (seen in firefox + chrome) no longer displayed
> the dots bellow the words.
>
> Tested using hg-view.exe using harfbuz 1.1.2
>
> Attached pngs of output from hb-view using both the windows 10 font
> (5.51) and the windows 7 font (5.01).
>
>
> hb-view.exe Windows7Font_monbaiti.ttf --text-file=Mongolian.txt
> outtput-format=png --output-file=file-monbaiti_5.01-harfbuzz-1.1.2.png
>
> hb-view.exe Windows10Font_monbaiti.ttf --text-file=Mongolian.txt
> outtput-format=png --output-file=file-monbaiti_5.51-harfbuzz-1.1.2.png
>
> Installing the Windows 7 font on windows 10 fixed the behavior in
> harfbuz based application (eg. firefox).
>
> Windows 10's IE (11) + Edge both displayed the dots regardless of which
> font was used.


This appears to be a result of changes to the 'calt' feature in the font.

With the older font, applying   --features calt=0   when shaping will 
give you the dotless forms; i.e. the dots are being provided by the 
(applied-by-default) Contextual Alternates feature.

But with the newer font, the behavior is reversed; applying  --features 
calt=0  will give you the dotted forms, while   calt=1   (the default) 
results in dotless.

So you should be able to control the result (in Firefox or Chrome) by 
setting font features appropriately in the CSS; but the fact that the 
older and newer fonts behave differently makes this problematic if you 
want content to render the same across Windows versions.

(I also tried to tweak the font features in Edge, but AFAICT it ignores 
my attempts to apply (-ms-)font-feature-settings to Mongolian content.)

Whether this is a deliberate change, a font bug, or harfbuzz 
mis-applying the lookups in some way is not yet clear to me.

JK



More information about the HarfBuzz mailing list