Skip to content
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

Typo Ascender value is too low. #72

Open
Anutrix opened this issue Jul 5, 2019 · 7 comments
Open

Typo Ascender value is too low. #72

Anutrix opened this issue Jul 5, 2019 · 7 comments

Comments

@Anutrix
Copy link

Anutrix commented Jul 5, 2019

Typo Ascender values is too less which cause issues when used on single line things like buttons.
HHead ascender values seem to be more appropriate.
Simple test:

<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Overpass:semibold' rel='stylesheet'>
<style>
button {
  background-color: #4CAF50; /* Green */
  border: none;
  font-family: 'Overpass';
  color: white;
  padding: 0px 0px;
  font-size: 60px;
}
</style>
</head>
<body>
 <button type="button">Click Me!</button> 
</body>
</html>

Firefox_Screenshot_2019-07-05T15-31-30 006Z
Notice that the space below it is almost double than above.
Having issues in other softwares using FreeType since it respects Typo flag since FreeType version 2.10.0.
Another case: godotengine/godot#28335

@Anutrix Anutrix changed the title Ascender Typo is too less. Typo Ascender value is too low. Jul 6, 2019
@joemaro
Copy link

joemaro commented Jul 18, 2019

when i use the font on my desktop on GTK and QT apps, the same happens: lots of space below the font and crammed towards the top.

@rprpx
Copy link

rprpx commented Aug 28, 2019

I experience the issue as well.
I'm in Manjaro Gnome Linux 18.0.4
With FreeType2 2.10.0 and 2.10.1 this issue is present with the Overpass font.
The font "sits high" and so, for example, bumps the upper edge of buttons, etc. It doesn't look good at all. I'm really hopeful that someone might be willing to look after a fix. (My knowledge of font matters is far from sufficient for me to currently try to address the issue.)

(If I downgrade to FreeType2 2.9 the Overpass font issue does not appear, but this is an unacceptable "resolution" naturally since software dependency issues are bound to happen. For example, with this downgrade, FireFox 68 (at least) won't run for me.)

Some possibly helpful comments and information might be found at these links:

  1. Link 1
  2. Link 2
  3. Link 3

I'm not familiar enough personally with font creation and such to truly understand the details provided in and around these linked comments, but I assume someone more knowledgeable with the subject might find them useful in fixing Overpass.

Thank you.

@gforrest-bw
Copy link

Related to #56?

@madig
Copy link

madig commented Nov 23, 2019

This might be text rendering stacks not dealing with typo metrics correctly, now that FreeType choses them if the UseTypoMetrics flag is on. Going from #72 (comment), the typo line heights are likely correct, but Qt/GTK/Cairo do not properly add the line gap. Try increasing the line gap yourself.

@Anutrix
Copy link
Author

Anutrix commented Nov 23, 2019

@madig But the issue is not exactly about line gap, since the only issue is Typo Ascender value. Afaik, all 3 Ascender/Decender shouldn't have too much differences.
I am still learning so I might be wrong, so do correct me if I am.

@madig
Copy link

madig commented Nov 23, 2019

Commonly, typo metrics are going to be tighter than the other metrics and that is on purpose. They are supposed to be used by typography-savvy applications to provide precise control over line height. Typo metrics come with some semantics attached (https://docs.microsoft.com/en-us/typography/opentype/spec/recom#tad) and require special handling by applications. AFAIK, no popular toolkit on Unixoids is doing that. The result is very tight line spacing.

Unfortunately, handling of line spacing across applications and operating systems differs significantly and it is more or less impossible to get the same metrics everywhere. Some strategies are explained in https://glyphsapp.com/tutorials/vertical-metrics. Google Fonts is pushing for the therein mentioned webfont strategy iirc, which assigns the same metrics to all fields. Maybe that helps for this font.

@davelab6
Copy link

davelab6 commented Dec 5, 2022

Does this family comply with the gf vm spec?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants