-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve several major issues: Vertical Metrics, Monospace Recognition #227
base: main
Are you sure you want to change the base?
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
@@ -53,6 +53,10 @@ value = 0; | |||
{ | |||
name = "Use Typo Metrics"; | |||
value = 1; | |||
}, | |||
{ | |||
name = isFixedPitch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 metrics
andfont info
on each.glyphs
file1. Avoid write lastChange and displayString to version control
2. Check
Use Typo Metrics
to 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
typo
andhhea
value. Adjust this value will "centering" glyphs across the vertical bounding box.- #169 Probably same as above, tweaking
typo
andhhea
does resolve theline-height
orleading
default to1.2
or120%
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
isFixedPitch
is not set, the record in the POST TableisFixedPitch
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
These images below illustrate
Aring
on theoverflow: hidden
environmentBefore: Top of Aring seems clipping because miss configuration
typo/hhea
After: Resolve clipping and vertically balance basic latin