Resolve several major issues: Vertical Metrics, Monospace Recognition#227
Resolve several major issues: Vertical Metrics, Monospace Recognition#227ottta wants to merge 6 commits intogithubnext:mainfrom
Conversation
- Display string can be heavy process while opening the .glyphs file - lastChange possibly adding new unnecessary record history, such as last saved file or hit cmd + s
Prepare tweaking vertical metrics value Please refer to this opentype guideline: - https://learn.microsoft.com/en-us/typography/opentype/spec/os2#fsselection - https://googlefonts.github.io/gf-guide/metrics.html#5-use_typo_metrics-must-be-enabled
Highest & Lowest glyphs on each file: - Monaspace Xenon Var.glyphs — Uring (2011.0), Gcommaaccent (-786.0) - Monaspace Xenon.glyph — Uring (2011.0), Gcommaaccent (-786.0) - Monaspace Argon Var.glyph — lacute (1988.0), Gcommaaccent (-786.0) - Monaspace Argon.glyph — lacute (1988.0), Gcommaaccent (-786.0) - Monaspace Krypton Var.glyph — lacute (1988.0), Gcommaaccent (-786.0) - Monaspace Krypton.glyph — lacute (1988.0), Gcommaaccent (-786.0) - Monaspace Neon Var.glyph — lacute (1988.0), Gcommaaccent (-786.0) - Monaspace Neon.glyph — lacute (1988.0), Gcommaaccent (-786.0) Please refer to these documentation: - winAscent: https://learn.microsoft.com/en-us/typography/opentype/spec/os2#uswinascent - winDescent: https://learn.microsoft.com/en-us/typography/opentype/spec/os2#uswindescent - https://googlefonts.github.io/gf-guide/metrics.html#6-winascent-and-windescent-values-must-be-the-same-as-the-familys-tallestdeepest-ymin-and-ymax-bounding-box-values
- githubnext#21 githubnext#37 "Hanging Font": Miss configure `typo` and `hhea` value. Adjust this value will "centering" glyphs across the vertical bounding box. - githubnext#169 Probably same as above, tweaking `typo` and `hhea` does resolve the `line-height` or `leading` default to `1.2` or `120%` from the upm value. UPM = 2000 (typo/hhea)Ascenders = 1930 (typo/hhea)Descenders = -470 (typo/hhea)LineGap = 0 Total: ascender + abs(descenders) + linegap = 2400 Note that "Gcommaaccent" may be truncated in environments that have `overflow: hidden` Please see these documentation: - https://googlefonts.github.io/gf-guide/metrics.html#6-winascent-and-windescent-values-must-be-the-same-as-the-familys-tallestdeepest-ymin-and-ymax-bounding-box-values - https://googlefonts.github.io/gf-guide/metrics.html#11-the-sum-of-the-fonts-vertical-metric-values-absolute-should-be-20-30-greater-than-the-fonts-upm
Because `isFixedPitch` is not set, the record in the POST Table `isFixedPitch` has zero value. Please refer to these: - https://learn.microsoft.com/en-us/typography/opentype/spec/post#header - https://googlefonts.github.io/gf-guide/requirements.html#monospace-fonts
| value = 1; | ||
| }, | ||
| { | ||
| name = isFixedPitch; |
There was a problem hiding this comment.
That would be automatically set if it would be valid iirc.
Forcing the value to 1 while the font is not isFixedPitch can lead to problems, see for example google/fonts#225
Anyhow, the root cause should be in
and supposedly it is fixed now. But it is not. I can redo the search for offending glyphs if need be.
Here the isFixedPitch value in the font file:
fini@Air ~ % showttf ~/Downloads/monaspace-v1.101/fonts/otf/MonaspaceArgon-Regular.otf | tail -n +1065 | head
Required tables: glyf and loca have been replaced by CFF => OpenType
post table (at 7312)
format=00030000
italicAngle=0
underlinePos=-70
underlineWidth=72
fixedpitch=0
mem1=0
mem2=0
mem3=0
mem4=0
fini@Air ~ %
Here a screenshot of the "warning" to set it in Glyphs ;-)
|
Comment on commit 972eb52 More important would be to just make all 3 metrices the same (already the case), and avoid using gap values. Hmm, and then the released font does already have that set, see here: |
It appears to be identical, but it is not. See the differences below.The released version (old files:
However, the above metrics caused
Reference: https://googlefonts.github.io/gf-guide/metrics.html#9-uppercases-should-be-centered-in-the-text-line The tweaked version (this PR:
Even though I changed the
Reference: https://googlefonts.github.io/gf-guide/metrics.html#8-linegap-values-must-be-0 |












This PR only tweaks all
vertical metricsandfont infoon each.glyphsfile1. Avoid write lastChange and displayString to version control
2. Check
Use Typo Metricsto get more consistent vertical metrics- https://learn.microsoft.com/en-us/typography/opentype/spec/os2#fsselection
- https://googlefonts.github.io/gf-guide/metrics.html#5-use_typo_metrics-must-be-enabled
3. Resolve #21 #37 #169
- #21 #37 "Hanging Font": Miss configure
typoandhheavalue. Adjust this value will "centering" glyphs across the vertical bounding box.- #169 Probably same as above, tweaking
typoandhheadoes resolve theline-heightorleadingdefault to1.2or120%from the upm value.Note that "Gcommaaccent" may be truncated in environments that have
overflow: hidden.Please see these documentation:
- https://googlefonts.github.io/gf-guide/metrics.html#6-winascent-and-windescent-values-must-be-the-same-as-the-familys-tallestdeepest-ymin-and-ymax-bounding-box-values
- https://googlefonts.github.io/gf-guide/metrics.html#11-the-sum-of-the-fonts-vertical-metric-values-absolute-should-be-20-30-greater-than-the-fonts-upm
4. Resolve #111 not recognized as monospace font
Because
isFixedPitchis not set, the record in the POST TableisFixedPitchhas zero value.Please refer to these:
- https://learn.microsoft.com/en-us/typography/opentype/spec/post#header
- https://googlefonts.github.io/gf-guide/requirements.html#monospace-fonts
These images below illustrate
Aringon theoverflow: hiddenenvironmentBefore: Top of Aring seems clipping because miss configuration

typo/hheaAfter: Resolve clipping and vertically balance basic latin
