You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked the actual font tables of an example Averia Serif Libre and found that the capHeight value is missing. What are other ways we can calculate capHeight?
The text was updated successfully, but these errors were encountered:
Hey 👋 yep Capsize extracts the internal metrics available within the font files, so if there are metrics missing they will not be populated. I have audited the Google Fonts library for both missing and correctness of values and these issues are definitely outliers.
If you are using Typescript, the types are generated and will catch missing metrics at build time.
I have considered populating these (even manually as there are so few) but that will create manual review overhead if the upstream metrics are populated/changed on Google Fonts.
I have considered populating these (even manually as there are so few) but that will create manual review overhead if the upstream metrics are populated/changed on Google Fonts.
I completely agree, avoiding manual review is key.
If you are using Typescript, the types are generated and will catch missing metrics at build time.
That’s a good start! I wonder if it would be possible to include a smart fallback or if a separate script could generate the metrics for a particularly troublesome fonts missing the cap-height.
Perhaps, it would be possible to measure the cap-height of particular letters. Maybe the letter H or a median/average of the letters BDEFHIKLRTUVXYZ and do a few sanity checks comparing to the ascent.
If you have any suggestions for making the script better or more accurate, please let me know!
29 Google Fonts at the time of writing are missing the required metrics for capsize.
The required metrics are:
The incomplete fonts are:
I checked the actual font tables of an example
Averia Serif Libre
and found that thecapHeight
value is missing. What are other ways we can calculatecapHeight
?The text was updated successfully, but these errors were encountered: