If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

"font-family: palatino" gives differently-sized characters (in Ubuntu 8.04, 8.10)

REOPENED
Unassigned

Status

()

Core
Layout: Text
REOPENED
9 years ago
4 years ago

People

(Reporter: dholbert, Unassigned)

Tracking

({regression, testcase})

Trunk
x86
Linux
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(4 attachments)

(Reporter)

Description

9 years ago
Created attachment 323452 [details]
testcase 1

I just noticed that Boris's blog ( http://weblogs.mozillazine.org/bz ) has odd-looking text on my Linux box, and it seems to be due to his use of "font-family: palatino;"

Basically, certain characters (in particular: c, e, g, o, s, w, x) are visibly taller and/or darker than other characters, for certain font-sizes.  (in particular, at size 12pt, which is relatively common :))

Some of the issues are fixed at larger font-sizes, but up until size 26pt, I still see some issues.  (e.g. in the testcase at 18 and 22pt, it looks like "r" is shorter than "n" in the word "internet")

I'm attaching a testcase with particular words that look broken ("been, internet, no, particular"), at various font-sizes.

Testing with Firefox 3 rc1 on Ubuntu Linux 8.04.

The page & testcase look fine in FF2. (FF2 uses a generic serif font on the testcase, and a generic sans-serif font on Boris's blog, because he includes 'sans-serif' in the font-family fallback list).  Hence, regression keyword.
(Reporter)

Comment 1

9 years ago
Created attachment 323453 [details]
screenshot: testcase 1

Here's a screenshot of testcase 1, with consecutive differently-sized characters highlighted.
(Reporter)

Comment 2

9 years ago
(In reply to comment #1)
> Here's a screenshot of testcase 1, with consecutive differently-sized
> characters highlighted.

er, with SOME consecutive differently-sized characters highlighted.
(I didn't highlight *all* the broken parts.)
(Reporter)

Comment 3

9 years ago
Created attachment 323454 [details]
screenshot: boris's blog

Here's a screenshot of Boris's blog, with some consecutive differently-sized characters highlighted.
I could have sworn we had bugs with that sort of screenshot on file (filed by me, at that, though I can't find it)...  At the time, people were blaming an old freetype, which apparently sometimes used cached glyphs from the wrong font size if the desired size fell between two actually available sizes.

Perhaps something similar is going on here?

Comment 5

9 years ago
Confirming this is a Freetype or font issue.

fc-match -v Palatino-12|grep file:
        file: "/usr/share/fonts/type1/gsfonts/p052003l.pfb"(s)

ftview -r 96 -m "been, internet, no particular" 12 /usr/share/fonts/type1/gsfonts/p052003l.pfb 

This last command give me the same rendering as the testcase for size 12pt (-r 96 is the number of dpi of my display), where the letter "e" is too big.

I tested this on Ubuntu Hardy too, which contains the latest Freetype release (2.3.5).
(Reporter)

Comment 6

8 years ago
This is now WFM in Firefox 3.0.11 and mozilla-central on Ubuntu Jaunty (9.04)

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090613 Minefield/3.6a1pre

However, if I run the 'ftview' command given in comment 5, I still get buggy output in the ftview window. (and the 'fc-match' command gives me the same "pfb" file that Sylvain mentioned)

So, it would appear that Firefox (or one of its a font libraries, separate from what 'ftview' uses) is now working around the issue somehow. --> WORKSFORME.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
(Reporter)

Comment 7

8 years ago
Created attachment 383377 [details]
screenshot: testcase WFM in FF 3.0.11 / Ubuntu 9.04
I don't have a 1.9.0 build handy to test on, but I still see this on mozilla-central revision be17081e57cf... dholbert, do you not see this anymore on trunk builds?
(Reporter)

Comment 9

8 years ago
As noted in comment 6, this is WFM on *both* mozilla-central and the 1.9.0 branch, in Ubuntu 9.04

However, I just tested an Ubuntu 8.10 machine, and this is *still broken* in both branches there.  So apparently the WFM-ness was due to a change in Ubuntu 9.04.  (Blake says in IRC that he's *not* on 9.04, so that would explain why he's still seeing this bug.)

Reopening, and updating summary to note that this is only in certain Ubuntu versions.
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Summary: "font-family: palatino" gives differently-sized characters → "font-family: palatino" gives differently-sized characters (in Ubuntu 8.04, 8.10)

Comment 10

4 years ago
This still reproduces on Ubuntu 12.04.2 and Firefox 24
I suspect this is a question of the system being configured to use font rendering options (hinting/antialiasing) that don't work well with the "Palatino" font that's installed. (Which is not really Palatino, but an old Type 1 clone from Ghostscript, at least according to comment 5. The exact font may vary between distros, versions, whatever...)

You can probably "fix" it by adjusting system-wide font rendering options, e.g. with Gnome Tweak Tool (or whatever is appropriate for the desktop environment being used), but it's also possible the settings that make one font look better will regress another...

Comment 12

4 years ago
Yes, it appears that i had autohinting disabled and hinting set to fullhint. Reducing the hinting improves, Pallatino looks good ... but now everything else looks a bit ugly :)

On Ubuntu it appears that URW Palladio is a polyfill for Palatino.

Is there any way to force specific font hinting from CSS ?
You need to log in before you can comment on or make changes to this bug.