-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Line-height problem with regular compared to black (ATS bug) #124
Comments
So strange. What font files do you have installed? (Please be as detailed and exact as possible.) |
Something's definitely not right here. @fontinfo black vs regular
"head": {
- "checkSumAdjustment": 1882288472,
+ "checkSumAdjustment": 1637560464,
...
- "xMax": 4860,
- "xMin": -2433,
- "yMax": 3145,
- "yMin": -1196
+ "xMax": 4650,
+ "xMin": -2080,
+ "yMax": 3072,
+ "yMin": -1084
...
"hhea": {
...
- "xMaxExtent": 4860
+ "xMaxExtent": 4650 |
Here's what I'm seeing for OTF files of v3.2: @ black vs regular (v3.2 OTF)
"head": {
...
- "xMax": 4860,
- "xMin": -2433,
- "yMax": 3145,
- "yMin": -1236
+ "xMax": 4524,
+ "xMin": -2080,
+ "yMax": 3012,
+ "yMin": -1076
},
"hhea": {
...
- "xMaxExtent": 4860
+ "xMaxExtent": 4524 The black, regular and light masters all have identical metrics in the source files, both Glyphs and UFO. The diff also shows that there are no differences between metrics that account for line-height, so this is really strange. Additionally, it seems to only be an issue with ATS-based type rendering — the only way to reproduce this is with Apple software that directly uses ATS (i.e. no Safari.) Adobe tools (uses adobe's type setter) as well as tools based on freetype and harfbuzz shows the correct line height. |
I downloaded the latest release from inter/releases. (Here my installed fonts.) Another example comparing all weights and line-heights. You mentioned that on Adobe software it's correct (and in fact the line-height number is), but when creating a grid line and comparing the weights on Illustrator, Bold and Black have a slight difference between others. Could be a software bug though. (it's impossible to screenshot since Illustrator removes the "outer box" when hitting cmd – but you can download file here). |
I can help look into this! Typically, Google Fonts projects need to set custom parameters in GlyphsApp to control vertical metrics in their various flavors. This is one thing that FontBakery helps to catch. I’m on my phone right now, but I’ll be able to post more detail later. |
I tried scaling the glyphs source to 2048 UPM, compiled font files and tested with the Apple apps. No difference. So probably not a UPM-related bug (there has been issues with uncommon UPMs in ATS/CoreText.) |
Seeing the same thing on Apple Pages/Numbers/Keynote, presumably they use ATS/CoreText as well |
I've had this issue before on Android. Some applications use the font's yMin and yMax to determine the position for the first line of text. |
Diffing
Notable differences: (Black vs Regular)
This is by design though and shouldn't affect line height. |
I'm pretty sure Roboto experienced this issue in Android. To solve it they forced the yMin and yMax using the following script, https://github.com/google/roboto/blob/master/scripts/force_yminmax.py https://github.com/google/roboto/blob/master/Makefile#L39 |
@m4rc1e I patched the font files' yMin and yMax to match (otf -> ttx, patch values, ttx -> otf) and I get the same results. |
Here are the highest and lowest glyphs in the regular and black masters: (from a script in Glyphs)
(looks normal) |
regular
and bold
on Inter 3.3
Inter UI v3.2 seems to have the same issue. @hmaesta what was the previous release you were using? |
Unfortunately I don't remember, but I don't believe it was 3.2 since I can't remember the last time I updated (so it must be a long time). |
This seems to still be an issue in v3.3, currently the latest release. However, I (tentatively) think I may have resolved the issue (click image to see it bigger if the bounding boxes are too faint): Pull Request with updates: #141 I have followed an earlier system suggested by @m4rc1e, using a script to apply custom parameters across all masters based on min and max heights, then rebuilding: Sketch (Inter 3.4 WIP)Variable Static TextEdit (Inter 3.4 WIP)Variable Static |
Confirming build off of master fb79b9e works correctly and fixes the issues. Nice work @thundernixon ! Here's a build of master fb79b9e if you want to try yourself: |
Since I upgraded to Inter 3.3 there is a difference between line-height of
Regular
andBold
.Environment
The text was updated successfully, but these errors were encountered: