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'm looking for the correct way to draw a font vertically.
Current Behavior
If I use font.ascender and font.descender to determine vertical placement (unitsPerEm taken into account), I get unnaturally large gaps between characters with vertical spacing.
This is odd, since opening the font in FontForge doesn't show such abnormally large ascender/descenders as I'm getting from opentype.js.
Maybe it has something to do with you reading the glyph data instead of the actual font metrics?
Possible Solution
I noticed FontForge has a concept of a vertical advance, which I don't see in opentype.js.
Steps to Reproduce (for bugs)
Draw glyphs manually, using font.ascender and font.descender as metrics for spacing the glyphs vertically.
Your Environment
Version used: 1.3.4
Font used: Noto Sans JP
The text was updated successfully, but these errors were encountered:
After inspecting the code, it seems the vmtx/vhea table is not parsed, and thus this feature is not supported. If it's easy enough I'll open a PR for it.
Version 1.3.4 is outdated and has been for several years now, we're preparing a new release, please try the in development version 2.0.0 on the master branch.
We'll look into it, probably for version 2.1.0 as we need to get 2.0.0 out quick.
This is a very simple change; parse some tables, expose a few variables. Doubt you're going to see anything controversial in the PR because it's basically the existing hmtx / hhea code copied and renamed.
Expected Behavior
I'm looking for the correct way to draw a font vertically.
Current Behavior
If I use font.ascender and font.descender to determine vertical placement (unitsPerEm taken into account), I get unnaturally large gaps between characters with vertical spacing.
This is odd, since opening the font in FontForge doesn't show such abnormally large ascender/descenders as I'm getting from opentype.js.
Maybe it has something to do with you reading the glyph data instead of the actual font metrics?
Possible Solution
I noticed FontForge has a concept of a vertical advance, which I don't see in opentype.js.
Steps to Reproduce (for bugs)
Your Environment
The text was updated successfully, but these errors were encountered: