Closed Pomax closed 7 years ago
What is the current info highlight? I2002 and I2004? If that's the case, it is in OTFontFileVal/val_name.cs
from about line 750 starting with if (v.PerformTest(T.name_PreferredFamily))
. It checks name id 16, 17?
In any case, that's probably where one want to look at for this sort of thing.
If you have the current info code (e.g. I2002/I2004), you can look up the symbol for it (the atom field) in the GenerateFValData/OurData.xml
:
[Hin-Tak@localhost FontValidator]$ grep -A 1 I2002 GenerateFValData/OurData.xml
helpID="I2002"
atom="name_I_Preferred_family_not_present"
Then find out how the code is written with:
[Hin-Tak@localhost FontValidator]$ grep -n name_I_Preferred_family_not_present OTFontFileVal/val_name.cs
784: v.Info(T.name_PreferredFamily, I.name_I_Preferred_family_not_present, m_tag, s);
792: v.Info(T.name_PreferredFamily, I.name_I_Preferred_family_not_present, m_tag);
826: v.Info(T.name_PreferredFamily, I.name_I_Preferred_family_not_present, m_tag, s);
I am a JavaScript developer; I have literally no idea how C, C++, or C# works, and with 100+ other repositories to work on (I wish I was joking about that number), also one without any time to start learning a new codebase. However, I'm more than happy to supply the additional information. It is indeed those two values:
I don't know what actual name records that maps to, but this is a validation against a font I was working on a while back (hex code in this stackoverflow post that was missing name strings id 3 and 6. If I2002 and I2004 are not actually for those two ids, then FV is not currently warning or info-ing about missing crucial (but not technically erroneous) strings.
No, those two are about 16 and 17, from my quick look at the code (I could be wrong); better description of what I2002 and I2004 are about is lacking. If you have a sample font file, I 'll think about adding such.
I don't know how to attach a file to a github issue... apparently this is still a thing we can't do, but if you paste the following hex code into any hex editor (I like XVI32 on Windows, and Hex Fiend on OSX, both free) then you have the test.otf
file that I was working with:
4F 54 54 4F 00 09 00 80 00 03 00 10 43 46 46 20 03 00 B4 92 00 00 02 A4 00 00 00 B3 4F 53 2F 32
30 F6 24 D4 00 00 01 00 00 00 00 60 63 6D 61 70 00 0D 00 B7 00 00 02 50 00 00 00 32 68 65 61 64
61 E4 43 91 00 00 00 9C 00 00 00 36 68 68 65 61 06 96 01 52 00 00 00 D4 00 00 00 24 68 6D 74 78
02 A8 00 00 00 00 03 58 00 00 00 08 6D 61 78 70 00 02 50 00 00 00 00 F8 00 00 00 06 6E 61 6D 65
C6 CC FF EC 00 00 01 60 00 00 00 F0 70 6F 73 74 00 03 00 01 00 00 02 84 00 00 00 20 00 01 00 00
00 01 00 00 1A EA FF 64 5F 0F 3C F5 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 14 FF EC 02 BC 02 A8 00 00 00 08 00 02 00 00 00 00 00 00 00 01 00 00 03 EC FE A8 00 00 02 A8
00 00 00 00 02 A8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 00 00 50 00 00 02 00 00
00 03 00 00 01 90 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00 20 3D 29 20 00 40
00 7E 00 7E 02 A8 FF EC 01 44 03 EC 01 58 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 7E 00 00
00 00 00 08 00 66 00 01 00 20 00 00 00 01 00 0B 00 00 00 01 00 20 00 00 00 02 00 07 00 21 00 01
00 20 00 00 00 04 00 11 00 36 00 01 00 20 00 00 00 05 00 0B 00 69 00 03 00 01 04 09 00 01 00 16
00 0B 00 03 00 01 04 09 00 02 00 0E 00 28 00 03 00 01 04 09 00 04 00 22 00 47 00 03 00 01 04 09
00 05 00 16 00 74 43 75 73 74 6F 6D 20 46 6F 6E 74 00 43 00 75 00 73 00 74 00 6F 00 6D 00 20 00
46 00 6F 00 6E 00 74 52 65 67 75 6C 61 72 00 52 00 65 00 67 00 75 00 6C 00 61 00 72 43 75 73 74
6F 6D 20 47 6C 79 70 68 20 46 6F 6E 74 00 43 00 75 00 73 00 74 00 6F 00 6D 00 20 00 47 00 6C 00
79 00 70 00 68 00 20 00 46 00 6F 00 6E 00 74 56 65 72 73 69 6F 6E 20 31 2E 30 00 56 00 65 00 72
00 73 00 69 00 6F 00 6E 00 20 00 31 00 2E 00 30 00 00 00 01 00 03 00 01 00 00 00 0C 00 04 00 26
00 00 00 04 00 04 00 01 00 00 00 7E FF FF 00 00 00 7E FF FF FF 83 00 01 00 00 00 00 00 00 00 00
00 01 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 01 00 04 01 00 01 01 01 0B 63 75 73 74 6F 6D 66 6F 6E 74 00 01 01 01 23 F8 1B 00 F8
1C 02 F8 1D 03 F8 19 04 8C 0D 9F 77 F9 50 F9 3C 05 F7 05 0F F7 08 10 F7 0B 11 9B F7 37 12 00 04
01 01 0C 1D 28 2E 56 65 72 73 69 6F 6E 20 31 2E 30 43 75 73 74 6F 6D 20 47 6C 79 70 68 20 46 6F
6E 74 43 75 73 74 6F 6D 20 46 6F 6E 74 63 75 73 74 6F 6D 00 00 00 01 8A 00 01 01 00 02 01 01 02
27 0E 9F 77 15 8B F9 50 05 F9 3C 8B 05 8B FD 50 05 FD 3C 8B 05 F7 2A F7 2A 15 8B F8 24 05 F8 10
8B 05 8B FC 24 05 0E 8B 8B 06 8B 8B 08 95 0A 95 0B F9 50 14 F9 50 14 00 00 00 00 00 02 A8 00 00
(thankfully, "spec compliant" fonts can be made really tiny)
LOL. github uses javascript for uploading attachments (for pictures, at least)... the "select item" thing at the bottom of the comment text panel.
FWIW, the command to reverse a hexdump on linux is xxd - never had to use it before!
Added W2006 and updated the description for I2002 and I2004. Also I2001 and I2003 (those two were okay - they actually says what's found, but did not say they were looking for 16/17). Here is what it says now:
W | W2006 | Name ID 1 to 6 are often needed to be installable.
Missing Name ID 3
W | W2006 | Name ID 1 to 6 are often needed to be installable.
Missing Name ID 6
I | I2002 | No string for Typographic Family name (Name ID 16)
I | I2004 | No string for Typographic Subfamily name (Name ID 17)
snapshot binary at https://sourceforge.net/projects/hp-pxl-jetready/files/Microsoft%20Font%20Validator/misc/FontVal-2.0.0-45-g471f37d.zip , and as usual, please feel free to make a donation or pursuade your employer(s)/others to do so.
Many thanks.
The code currently signals missing name records 3 and 6 with an "info" highlight, whereas these should probably be "warning" highlights: while not in error according to the spec, fonts with name records in the 1 through 6 range missing, will absolutely fail when users try to actually make them available for typesetting due to never-mentioned hard requirements on name strings in the various operating systems.
Windows has a hard requirement for ids 3 and 6, and MacOS has the additional hard requirement for 4 and 5; In addition, everything needs 1 and 2, so marking string ids 1 through 6 as a warning would help with making sure fonts are deployment-ready.