-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repair CFF fonts if stem hints are in wrong order #10277
Conversation
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.67.70.0:8877/2eb0399181f2b42/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @brendandahl received. Current queue size: 0 Live output at: http://54.215.176.217:8877/39fb5de04351c3f/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/2eb0399181f2b42/output.txt Total script time: 17.79 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/39fb5de04351c3f/output.txt Total script time: 23.37 mins
|
/botio makeref |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @brendandahl received. Current queue size: 0 Live output at: http://54.215.176.217:8877/6d02149a5257d9c/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @brendandahl received. Current queue size: 0 Live output at: http://54.67.70.0:8877/715db6aca425d81/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/715db6aca425d81/output.txt Total script time: 16.28 mins
|
From: Bot.io (Windows)SuccessFull output at http://54.215.176.217:8877/6d02149a5257d9c/output.txt Total script time: 21.37 mins
|
Fixes #10014
Fixes #10084
The embedded CFF fonts fail to follow CFF Type2 specification, page 11:
In the issues, the operators are in wrong order: first
vstem
and thenhstem
. When this happens, my patch overwrites operatorshstem
andhstemhm
with codesvstem
orvstemhm
. The arguments remain in the byte array. (This is somewhat similar to the handling ofdotsection
in cff_parser.js.) The resulting new vertical stem hints are pointless, of course. However, all I can see is that the glyphs become only slightly blurrier because they are rendered withouthstem
hints. The text is still easy to read.