View Single Post
Old 12-21-2019, 04:51 AM   #444
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 876
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by rtiangha View Post
Thanks for the ttx hint; it's EXACTLY what I was looking for. Unlike with Fontforge, I can update PANOSE and name/family data with virtually no impact on file size. The one thing I can't figure out is how to update the "Style Map" field in the OS/2 table (maybe it's called something different or lives somewhere else?) so I still use Fontforge for that (it's needed to fix things such as Apple's New York font and Amazon's KindleBlackboxC otherwise they render as italics), but if I could figure out how to do that with ttx, then that'd be good for 98% of my use cases.
As I mentioned in a previous post, it's called fsSelection. Details from Microsoft here. It should be in the OS/2 table.

Note, it is a bitfield, so will appear as a single number. The main numbers should be:
  • Bit 0 = italic = 1
  • Bit 5 = bold = 32
  • Bit 6 = Regular = 64
  • Bit 0 and 5 = Bold Italic = 32 + 1 = 33

Hopefully I've got those numbers correct!

EDIT: Yep, just checked with the TTLib python library from fonttools. It is the fsSelection attribute/field in the 'OS/2' table. One would hope this is also the case in the ttx export.

Last edited by sherman; 12-21-2019 at 05:08 AM.
sherman is offline   Reply With Quote