mozilla / Fira

Mozilla's new typeface, used in Firefox OS
mozilla.github.io/Fira
Other
5.06k stars 311 forks source link

Fira Hinting Problems on Windows #76

Open steffenweber opened 9 years ago

steffenweber commented 9 years ago

First of all, thank you for creating Fira!

We have noticed a few problems with the hinting in Fira. These problems exist (at least) on Windows 7 and Windows 8.1. We've also noticed these problems on Linux (the „freetype“ package may be using the same hinting-algorithm as „ttfautohint“ which seems to have been used for the hinting in Fira.)

  1. At 16px, numerals have different heights (the „4“ sits too low, the „7“ seems to fly).
  2. At 16px, bold uppercase letters are noticably smaller than regular uppercase letters. The same is true for bold numerals vs. regular numerals.

Please have a look at the demo page for examples with screenshots. (Update: Please have a look at the comment below for the demo files.)

Can the fonts be slightly adjusted to be more „friendly“ to freetype / ttfautohint?

Or could some special ttfautohint options help?

carrois commented 9 years ago

ttf-hinting, being more exact, ttf-auto-hinting is still a problem and we know that. Adding manual hinting means a lot of additionl effort and makes it impossible for us to update and/or expand Fira the way we do currently. Though we have an eye on it. The Glyphs developers also support us concerning ttf-auto-hinting and “ttfautohint” issues. Let's see what new software features can do for us and Fira.

steffenweber commented 9 years ago

Thank you for the reply.

I've just noticed that the issue disappears in Google Chrome on Windows 8.1 when I use OTF fonts instead of TTF fonts. They seem to use a different kind of hinting. Unfortunately, the rendering of OTF fonts in other Windows browsers like Firefox is rather ugly.

I understand that you are focussing on other aspects of Fira right now. Are you aware of any ttfautohint parameters that we could experiment with? Or would that be pointless and we just have to be patient?

carrois commented 9 years ago

We will ship version 4.1 (Greek / Cyrillic extensions) in a few weeks and hopefully we can find a solution or at least get some better results via ttfautohint in the meantime.

Am 16.03.2015 um 11:12 schrieb Steffen Weber notifications@github.com:

Thank you for the reply.

I've just noticed that the issue disappears in Google Chrome on Windows 8.1 when I use OTF fonts instead of TTF fonts. They seem to use a different kind of hinting. Unfortunately, the rendering of OTF fonts in other Windows browsers like Firefox is rather ugly.

I understand that you are focussing on other aspects of Fira right now. Are you aware of any ttfautohint parameters that we could experiment with? Or would that be pointless and we just have to be patient?

— Reply to this email directly or view it on GitHub.

patrykdesign commented 9 years ago

@Steffen185 can you please retest using the new Fira Sans v.4.1? Thanks!

steffenweber commented 9 years ago

I've created a new demo page that uses Fira 4.1. (Update: Please have a look at the comment below for the demo files.)

The line-height and spacing in general has changed quiet heavily (open both demo pages in separate tabs and see for yourself) but the reported issues are still there. Tested with IE11 and Chrome 41.

Do you see an improvement?

davelab6 commented 9 years ago

ttfautohint now has an 'control' file that allows you to control the hinting after the freetype autohinter has done its thing, so that @carrois can achieve the quality of manual hinting with much less additional effort and makes it possible to update the positions of points of existing glyphs, or add new glyphs, without having to redo anything.

adrientetar commented 9 years ago

This control file seems to be intended for customizing individual glyphs, looking at the documentation I don’t quite get how you would change font-wide pixel-rounding. I assume FreeType has a mechanism to make the hinting of fonts in the same family consistent with eachother? cc @lemzwerg

lemzwerg commented 9 years ago

Right now, ttfautohint has no mechanism to 'harmonize' font families. If you can suggest a solution (i.e., an algorithm that coulf be used by a ttfautohint), please discuss this with me using e-mail!

Not having time currently to test Fira by myself: Have the designers tried to play with ttfautohint options -X and -x? It seems that the problem exists at 16ppem only, so this might yield a solution.

On the other hand, some control instructions to fix the vertical number alignment at 16ppem should solve the issue.

patrykdesign commented 9 years ago

I can confirm still an issue on Windows 10 :(

lemzwerg commented 9 years ago

I'll try to release a new version of ttfautohint in September (or early October) that allows a simple fix for this issue.

homeworkprod commented 8 years ago

I can reproduce the issue with Fira 4.2 on Firefox and Linux as well using a modified local copy of @steffenweber's test page.

davelab6 commented 8 years ago

@lemzwerg was the simple fix released?

lemzwerg commented 8 years ago

Fixing the 'dancing' glyphs with delta instructions (using a control instructions file) is already possible in ttfautohint, yes. A means to manually harmonize font families will be hopefully part of the next release.

wUFr commented 8 years ago

Windows Phone 8.1 and Android - Chrome - same problems, buttons with equal padding are the best example - font more than 3px out of center (flying)

tested with version from Google Fonts

ghost commented 8 years ago

@carrois some web-products ship with Fira by default (e.g. SOGo). Quite a disaster for Windows terminal users (without AA) these rely on hinting. I think this is a priority issue. View this screenshot, please: fira-hinting-windows Here Tahoma for comparison: tahoma

lemzwerg commented 8 years ago

Fira hinting is not suited for non-AA display. The used autohinter, TTFautohint, explicitly doesn't support B/W hinting. The problem with the different sizes will be hopefully fixed very soon in ttfautohint.

lemzwerg commented 8 years ago

BTW, can someone tell me please the parameters used for ttfautohint? I would have expected the necessary scripts being part of the git repository, but this was a wrong assumption, unfortunately...

davelab6 commented 8 years ago

It may be just glyphs running it with all default args

lemzwerg commented 8 years ago

In other words, noone has apparently tried to follow my advice given here? While I'm late with a new ttfautohint release, some feedback on the already available options would be quite helpful...

lemzwerg commented 7 years ago

@steffenweber, please re-enable your Fira demo page. I have now a fix for ttfautohint which I would like to test.

steffenweber commented 7 years ago

Sorry for the broken link, I have now attached the demo files to this bug report: fira-issue-76.zip

lemzwerg commented 7 years ago

Thanks for the demo files!

With the current git of ttfautohint you can use a reference font for getting blue zone data (command line option -R). The images below (IE 11 on Win 8.1) show the result of FiraSans-Bold.ttf with and without FiraSans-Regular.ttf (both version 4.106) as a reference.

You will still have to use control instruction files to fix hinting glitches here and there, but family harmonization should now be much easier.

fira-old

fira-new

steffenweber commented 7 years ago

That looks promising, thank you!

davelab6 commented 7 years ago

@carrois are you seeing up ttfautohint correctly as per https://www.freetype.org/ttfautohint/doc/ttfautohint.html#blue-zone-reference-font ? :)

davelab6 commented 7 years ago

cc @m4rc1e