Closed Bug 1430446 Opened 2 years ago Closed 2 years ago

Firefox 59 under Linux have ugly interface and content fonts (Tahoma, Trebuchet MS)

Categories

(Core :: Graphics: Text, defect, P3)

x86_64
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox-esr52 --- unaffected
firefox57 --- unaffected
firefox58 --- unaffected
firefox59 --- fixed
firefox60 --- fixed

People

(Reporter: drJeckyll, Assigned: jfkthame)

References

Details

(Keywords: regression, Whiteboard: [gfx-noted])

Attachments

(11 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0
Build ID: 20180113220355

Steps to reproduce:

Install Firefox 59.0a1 (2018-01-13) (64-bit)


Actual results:

My system have Tahoma as font, which is properly displayed everywhere except in Firefox where some letters are glued together. When font is bold it is almost impossible to read.

See attached Screenshots


Expected results:

Tahoma and other fonts like Trebuchet MS to be displayed properly.
Attached image Tahoma - Help-About.png
Attached image Tahoma - popup.png
Attached image Trebuchet MS.png
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Version: 56 Branch → Trunk
What version of Linux do you use? I don't have the Tahoma or Trebuchet MS fonts available on Ubuntu 14.04 x64 and Arch Linux. I need to install them, but I want to make sure that I will test this issue on the same version as yours.

If you don't mind can you please retest this issue using a new Firefox clean profile to eliminate custom settings as a possible cause? In order to to that please follow the steps from here: https://goo.gl/eDV49V. On linux you have to run the commands in the terminal.
If the issue is still reproducible with a new profile, can you please check if the issue is also reproducible in Firefox 57 release? You can download it from here: https://ftp.mozilla.org/pub/firefox/releases/57.0.4/linux-x86_64/en-US/
Flags: needinfo?(drJeckyll)
Gentoo Linux user here. I have Tahoma and Trebuchet MS font since ... well, almost forever which in my case is let's say 2008 when was last time I install Gentoo on my laptop - the same Gentoo Linux which I use today. And like I say fonts are OK in my DE (Mate in my case) and every other application I use. May be there more fonts affected by this issue, but I see problems with this two, because I use them.

With new profile I see the same issue - I will attach two more screenshots from clean profile.

Firefox 57 is OK. - see attached screenshots. In fact it was OK with Firefox 59 since couple of days before I fill a bug.
Flags: needinfo?(drJeckyll)
see "A" and "b" glued toghether in About word
See "A" and "b" in help menu - displayed OK - not glued together
Bold text is displayed OK - not glued together
Bold text is OK - not glued together
If the issue is not reproducible on Firefox 57 and reproducible on latest Nightly build, probably this is a regression. Since you already can reproduce the issue, can you please help us to try to find the regression range?

In order to do this you need to install mozregression tools from here: http://mozilla.github.io/mozregression/install.html 
Just use the terminal commands mentioned in the tutorial and after use the next command (without commas) to start testing:
"mozregression --good year-month-day --bad year-month-day". 
So in your case, you have to run the following command: mozregression --good 2017-08-02 --bad 2018-01-16
When a Firefox window is opened try to reproduce the issue. If the issue is reproducible write "bad" in the terminal and hit "Enter", if is good write "good". Please provide us the pushlog link after no more builds are opened by the tool.

Please let me know if you have any question regarding this.
Flags: needinfo?(drJeckyll)
@drJeckyll thanks for testing this, you did a great job!

From the provided pushlog form comment 13, looks that bug 1428826 introduced this issue. 
@Jonathan can you please take a look at this?
Blocks: 1428826
Status: UNCONFIRMED → NEW
Component: Untriaged → Graphics: Text
Ever confirmed: true
Flags: needinfo?(jfkthame)
Keywords: regression
Product: Firefox → Core
Priority: -- → P3
Whiteboard: [gfx-noted]
I was finally able to reproduce this, by disabling antialiasing and choosing a small size of Tahoma as my Gnome UI font. We really need to be using the hinted glyph widths in such cases. However, we still need to ensure we use linearHoriAdvance for variation fonts, because the other fields are buggy except in very latest freetype. So I think this covers the various cases successfully, and it fixes the rendering in my local testing. There will no doubt be some small impact on the various font-sensitive reftests, so a few tweaks to fuzz annotations will be needed.
Attachment #8944806 - Flags: review?(lsalzman)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
A possible duplicate bug 1432544.

Not only kerning is broken, gamma is also wrong.
Duplicate of this bug: 1432544
Attachment #8944806 - Flags: review?(lsalzman) → review+
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f143545246a9
Prefer hinted glyph widths from FreeType, except when hinting is disabled or the font includes variations. r=lsalzman
https://hg.mozilla.org/mozilla-central/rev/f143545246a9
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
"Target Milestone 	--- 	mozilla60"

The fix won't make into Firefox 59? :O But why?
Don't be so hasty! Mozilla-central development is currently on 60, but once we've confirmed on Nightly that this fixes the problem here, I'm intending to request uplift to FF59 as well.
Flags: needinfo?(jfkthame)
I can confirm that my fonts are back to previous state with Forefox 60.0a1 (2018-01-25) (64-bit). 

Thank you
Comment on attachment 8944806 [details] [diff] [review]
Prefer hinted glyph widths from FreeType, except when hinting is disabled or the font includes variations

Approval Request Comment
[Feature/Bug causing the regression]: bug 1428826 (which in turn was trying to fix a regression from bug 1427641, but resulted in poor rendering for some strongly-hinted fonts)
[User impact if declined]: ugly text rendering with some fonts on Linux, particularly the Microsoft Core Fonts for users who have them installed
[Is this code covered by automated tests?]: it's exercised by loads of text-rendering tests, but the precise quality of glyph spacing is not readily testable
[Has the fix been verified in Nightly?]: yes, see preceding comment
[Needs manual test from QE? If yes, steps to reproduce]: no precise STR, as highly dependent on fonts and system rendering preferences, but would be good for Linux QA to be alert for poorly-rendered text (erratic spacing/kerning)
[List of other uplifts needed for the feature/fix]: none
[Is the change risky?]: not really
[Why is the change risky/not risky?]: minor tweak to text measurement, so that we use FreeType's hinted glyph widths (instead of linearly-scaled widths) in more cases; so the only effect is on fine details of glyph spacing
[String changes made/needed]: none
Attachment #8944806 - Flags: approval-mozilla-beta?
Comment on attachment 8944806 [details] [diff] [review]
Prefer hinted glyph widths from FreeType, except when hinting is disabled or the font includes variations

Nice catch drjeckyll and cosmin!
Let's uplift this fix for 59 beta 6.
Attachment #8944806 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Depends on: 1435234
Depends on: 1437021
Depends on: 1438919
You need to log in before you can comment on or make changes to this bug.