Closed m4rc1e closed 5 years ago
It would be better to change the fsSelection bit in the sources, instead of using this post processing approach. Unfortunately, I wasn't able to do this. If anyone is able to adjust the fsSelection in the sources, I'll happily close this pr. I may take a stab at this later.
Keep this open for now.
@m4rc1e, Jeremy asked me to look at this and fix without the post process. I'm currently on vacation, but should have a PR for fixing it by Tuesday of next week.
Fabulous thank you!. I'll close this pr.
@m4rc1e To confirm the above as I work through this, when you said "fsSelection is also less for Italic because the Oblique fsSelection bit has been disabled", you meant that your code didn't change this, but that the prior change to the WWS selection bits, turning off Oblique, changed this, correct?
At Google Fonts, we need to enable OS/2.fsSelection bit 6 in non-RIBBI fonts in order for them to work in Google Docs. This Pr enables bit 6 when the user runs ttfPostProcess.py.
I've bumped the version number to v1.004. It's currently v1.003.
I've regenerated the fonts. Here's the output from Diffenator when I compare v1.003 against v1.004 for the Text family.
Bold
Displaying the 50 most significant items in each table. To increase use the '-ol' flag
names modified: 4
attribs modified: 2
Bold Italic
Displaying the 50 most significant items in each table. To increase use the '-ol' flag
names modified: 4
attribs modified: 3
Italic
Displaying the 50 most significant items in each table. To increase use the '-ol' flag
names modified: 4
attribs modified: 3
Medium
Displaying the 50 most significant items in each table. To increase use the '-ol' flag
names modified: 4
attribs modified: 3
Medium Italic
Displaying the 50 most significant items in each table. To increase use the '-ol' flag
names modified: 4
attribs modified: 3
Regular
Displaying the 50 most significant items in each table. To increase use the '-ol' flag
names modified: 4
attribs modified: 2
As we can see, the nametable records indicate the version number has been bumped and the fontRevision also shows the new version number. The fsSelection is greater for non-RIBBI styles since it now set to Regular. The fsSelection is also less for Italic fonts because the Oblique fsSelection bit has been disabled. The results are the same for the Display family.
No other changes have been made to the fonts. To verify this for yourself you can use fontdiffenator. If you want raw diffs, convert the fonts to .ttx using fonttools and compare them using a differ such as vimdiff.
Note: Non-RIBBI fonts are any fonts not in [Regular, Italic, Bold, Bold Italic].