source-han-sans
source-han-sans copied to clipboard
Incomplete localized `name` table for VF, and other problems
Not sure if it is a problem with the build process or the build program itself, but the name
table in VF left traces of the starting ExtraLight in the name
table as such (exported with ttx
):
<namerecord nameID="1" platformID="3" platEncID="1" langID="0xc04">
思源黑體 香港 VF
</namerecord>
<namerecord nameID="2" platformID="3" platEncID="1" langID="0xc04">
Regular
</namerecord>
<namerecord nameID="4" platformID="3" platEncID="1" langID="0xc04">
思源黑體 香港 VF
</namerecord>
<namerecord nameID="17" platformID="3" platEncID="1" langID="0xc04">
ExtraLight
</namerecord>
There is no name
ID = 16 in the font file:
<namerecord nameID="14" platformID="3" platEncID="1" langID="0x409">
http://scripts.sil.org/OFL
</namerecord>
<namerecord nameID="17" platformID="3" platEncID="1" langID="0x409">
ExtraLight
</namerecord>
and there is no localized name for name
ID = 265-279.
Could it be related to why SHS does not display all weight instances in Windows (including no Prev/Next button when previewing)? Source Sans and Roboto VF do appear to be able to display all weight instances in Windows.
ExtraLight is because that's the default instance in the variable font. Since there are only two masters only one of those can be the default so it must be either ExtraLight or Heavy. That's an issue with how the variable font spec was created in the first place. Ideally we could make it Regular, but since we can't right now we use ExtraLight.
This is the first I've heard of Windows not displaying the full name. Is this with the release fonts or with something you did with ttx? Which version of Windows? Which app or is it Font Settings in the system settings?
Not the full name, but the 7 weights (Extralight to Heavy) in VF as mentioned here (https://github.com/adobe-fonts/source-han-sans/issues/290#issuecomment-829505434), sorry for confusion.
My main question is on the incomplete localized name
table and the weirdly removed name
record ID 16.
For the default instance, Source Sans also has the default instance at ExtraLight (200) but it still doesn't affect how the font is displayed. Below is the fvar
from Source Sans 3.
<!-- Weight -->
<Axis>
<AxisTag>wght</AxisTag>
<Flags>0x0</Flags>
<MinValue>200.0</MinValue>
<DefaultValue>200.0</DefaultValue>
<MaxValue>900.0</MaxValue>
<AxisNameID>299</AxisNameID>
</Axis>
Below is screenshot of Source Sans 3 VF displaying its bold instance:
and all weight instances in Microsoft Word (6 in total, Bold is merged with Regular):
Oh, that issue. That seems to be a bug in Word and since Microsoft said they don't officially support variable fonts in Word it's not really considered a bug. The subsets and other fonts mentioned are created in exactly the same way so it was only the full set showing this issue. That makes it seems like something else is going on.
I am guessing something else is going on too since Word processor relies on Windows type engine. In Control Panel, SHS only show up with ExtraLight:
but Source Sans appear in a family and shows the 6 weights:
and double clicking any of the font will show the same preview as opening the VF itself. (Note that the Previous and Next are available similar to TTC even though it is a variable font).
Comparison of SHS (does not have the buttons):
In Notepad:
Maybe a parameter isn't set correctly in head
or OS/2
that Windows did not detect?
I don't think anything is wrong in the font since the subset versions do show all the names and everything in those is exactly the same as the full set.