We are trying to create our font calls to rely on font-weight and font-style with a common font-family name. What we are finding is that tools we might use to autogenerate the @font-face rules for a font family are giving us different weight information then we are getting by using prince --scanfonts. We have nearly hundreds of fonts so being able to create a service to provide this information is important to our production workflow.
As an example if we take the Roboto Thin and scan it with prince --scanfonts it tells us the font-weight is “normal.” but if we look at the OS/2 and Windows Metrics table under usWeightClass we get “250.” We have a few ways to find this value and we get the same information with each of them, here is a link to a web site that has a font inspector.
https://opentype.js.org/font-inspector.html
So when we programmatically create a set of CSS @font-face rules with font-weight(s) that do not match what Prince seems to be looking for we end up with a lot of the fonts being dropped and substituted for other fonts from that same family, these usually happen to be those fonts whose font-weight matches.
We have 8 font weights in Gotham, we can only get a handful of them to show up in Prince using our @font-face rules because of this gap in what Prince sees as the fonts weight and what the font metadata indicates it is.
Were is prince --scanfonts getting its font-weight, font-style and font-stretch values from?
As an example if we take the Roboto Thin and scan it with prince --scanfonts it tells us the font-weight is “normal.” but if we look at the OS/2 and Windows Metrics table under usWeightClass we get “250.” We have a few ways to find this value and we get the same information with each of them, here is a link to a web site that has a font inspector.
https://opentype.js.org/font-inspector.html
So when we programmatically create a set of CSS @font-face rules with font-weight(s) that do not match what Prince seems to be looking for we end up with a lot of the fonts being dropped and substituted for other fonts from that same family, these usually happen to be those fonts whose font-weight matches.
We have 8 font weights in Gotham, we can only get a handful of them to show up in Prince using our @font-face rules because of this gap in what Prince sees as the fonts weight and what the font metadata indicates it is.
Were is prince --scanfonts getting its font-weight, font-style and font-stretch values from?