fontmake: help needed: I am unable to make progress on testing variable fonts
This is a follow up to https://github.com/googlei18n/fontmake/issues/167
From sources at https://github.com/googlei18n/noto-source/tree/master/src I managed to build the following variable files that have only weight axis:
The following newly built VF fonts have only single weight axis (axis=“wght”); see https://github.com/googlei18n/noto-fonts/tree/master/alpha/from-pipeline/unhinted/variable-ttf/sans for the sans fonts and in …/serif you can find serif fonts: NotoSansCherokee-VF.ttf NotoSansLao-VF.ttf NotoSansLaoUI-VF.ttf NotoSansSymbols-VF.ttf NotoSerifLao-VF.ttf NotoSerifSinhala-VF.ttf
… sample ttx output for Cherokee <fvar>
<!-- Weight -->
<Axis>
<AxisTag>wght</AxisTag>
<MinValue>100.0</MinValue>
<DefaultValue>400.0</DefaultValue>
<MaxValue>900.0</MaxValue>
<NameID>256</NameID>
</Axis>
<!-- Thin -->
<NamedInstance nameID="257">
<coord axis="wght" value="100.0"/>
</NamedInstance>
<!-- ExtraLight -->
<NamedInstance nameID="258">
<coord axis="wght" value="200.0"/>
</NamedInstance>
When I run fontdiff tests (see https://github.com/googlei18n/noto-source/tree/master/test for the tests) I get the correct behavior. For example for Cherokee for test
<html lang="Cher">
<p>
<span style="font-weight:100">ꮓ̀</span>
<span style="font-weight:200">ꮓ̀</span>
<span style="font-weight:300">ꮓ̀</span>
<span style="font-weight:400">ꮓ̀</span>
<span style="font-weight:500">ꮓ̀</span>
<span style="font-weight:600">ꮓ̀</span>
<span style="font-weight:700">ꮓ̀</span>
<span style="font-weight:800">ꮓ̀</span>
<span style="font-weight:900">ꮓ̀</span>
</p>
I get the following result in the PDF file created by fontdiff

The following newly built VF fonts have only both weight axis (axis=“wght”) and width axis (axis=“wdth”); see https://github.com/googlei18n/noto-fonts/tree/master/alpha/from-pipeline/unhinted/variable-ttf/sans for the sans fonts and in …/serif you can find serif fonts: NotoSans-Italic-VF.ttf NotoSans-VF.ttf NotoSansArabic-VF.ttf NotoSansArabicUI-VF.ttf NotoSansArmenian-VF.ttf NotoSansDevanagari-VF.ttf NotoSansDisplay-Italic-VF.ttf NotoSansDisplay-VF.ttf NotoSansGeorgian-VF.ttf NotoSansHebrew-VF.ttf NotoSansKhmer-VF.ttf NotoSansKhmerUI-VF.ttf NotoSansMyanmar-VF.ttf NotoSansMyanmarUI-VF.ttf NotoSansSinhala-VF.ttf NotoSansSymbols2-Regular-VF.ttf NotoSansTamil-VF.ttf NotoSansThai-VF.ttf NotoSansThaiUI-VF.ttf NotoSerifArmenian-VF.ttf NotoSerifEthiopic-VF.ttf NotoSerifGeorgian-VF.ttf NotoSerifHebrew-VF.ttf NotoSerifKhmer-VF.ttf NotoSerifTamil-VF.ttf NotoSerifThai-VF.ttf
sample ttx output (Hebrew)
<fvar>
<!-- Weight -->
<Axis>
<AxisTag>wght</AxisTag>
<MinValue>100.0</MinValue>
<DefaultValue>400.0</DefaultValue>
<MaxValue>900.0</MaxValue>
<AxisNameID>256</AxisNameID>
</Axis>
<!-- Width -->
<Axis>
<AxisTag>wdth</AxisTag>
<MinValue>70.0</MinValue>
<DefaultValue>100.0</DefaultValue>
<MaxValue>100.0</MaxValue>
<AxisNameID>257</AxisNameID>
</Axis>
<!-- Thin -->
<NamedInstance subfamilyNameID="258">
<coord axis="wght" value="100.0"/>
<coord axis="wdth" value="100.0"/>
</NamedInstance>
<!-- ExtraLight -->
<NamedInstance subfamilyNameID="259">
<coord axis="wght" value="200.0"/>
<coord axis="wdth" value="100.0"/>
</NamedInstance>
However, when I ran my fontdiff tests with these dual axis fonts I do not get the expected results. For example for Hebrew Sans using https://github.com/googlei18n/noto-source/blob/master/test/Hebrew/specimen-he-weights-widths.html as a test. For the first line
<html lang="he">
<p>
<span style="font-weight:100">וַיִּפֶן </span>
<span style="font-weight:200">וַיִּפֶן </span>
<span style="font-weight:300">וַיִּפֶן </span>
<span style="font-weight:400">וַיִּפֶן </span>
<span style="font-weight:500">וַיִּפֶן </span>
<span style="font-weight:600">וַיִּפֶן </span>
<span style="font-weight:700">וַיִּפֶן </span>
<span style="font-weight:800">וַיִּפֶן </span>
<span style="font-weight:900">וַיִּפֶן </span>
</p>
I get the following PDF output (note they all appear to be thin whereas I expected them to change weights)

Most likely it is not a fontmake problem: it might be a problem with my test HTML, might be a fontdiff problem, harfbuzz problem, pdf problem, etc… but I’m stumped and need help debugging this and fixing this (if this is an issue).
About this issue
- Original URL
- State: open
- Created 7 years ago
- Comments: 27 (25 by maintainers)
If I drag n drop both the Hebrew VF into Axis Praxis and only change the width axis, it works fine.
As soon as I change the weight, the width axis fails to work. I had the same behaviour with the Latin vf font.
I’m running webkit r214471. I’ll update this tomorrow and try build the fonts myself.