Closed Bug 1231713 Opened 9 years ago Closed 9 years ago

Italic font used for regular text with Goudy Old Style under Linux

Categories

(Core :: Graphics: Text, defect)

44 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: heftig, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

Visited http://aiohttp.readthedocs.org/en/stable/client.html using Firefox 44.0a2.

The "Goudy Old Style" font, sourced from Windows 7, is available.

The italic variant of Goudy Old Style is chosen for the text. The regular variant should have been chosen.

Disabling `gfx.font_rendering.fontconfig.fontlist.enabled` restores the expected behavior.


Goudy Old Style v1.51 md5sums:
856dd110b08628f38f8fcfafe6fab19c  GOUDOSB.TTF
832e3cfb4368f895ac5805cb9fff7898  GOUDOSI.TTF
78d7bdc55148aaa3307a1e8ad735c40f  GOUDOS.TTF
(In reply to Jan Steffens from comment #0)
> Visited http://aiohttp.readthedocs.org/en/stable/client.html using Firefox
> 44.0a2.
> 
> The "Goudy Old Style" font, sourced from Windows 7, is available.

FWIW, I don't see a "Goudy Old Style" in the list at https://www.microsoft.com/typography/Fonts/product.aspx?PID=161. I suspect it may have come from some other package.
Blocks: 1180560
Is this a recent regression?
Whiteboard: [gfx-noted]
It must be fairly recent, as the new Linux font-list code initially landed for mozilla-41, I believe (bug 1056479, mozilla-41; there have also been a number of followups, some of which may have affected this). Note that comment 0 indicates that the old code (i.e. with the new font-list preffed off) doesn't have this problem.
Summary: Mistakenly chooses italic font variant → Italic font used for regular text with Goudy Old Style under Linux
I've reproduced the problem using versions of these fonts from an old Windows XP install.

The problem here is that the Goudy Old Style family from Windows XP has some odd width values in the OS/2 table [1]:

GOUDOS.ttx:    <usWidthClass value="6"/>
GOUDOSB.ttx:    <usWidthClass value="6"/>
GOUDOSI.ttx:    <usWidthClass value="5"/>

This implies that the regular and bold faces have a semi-expanded width while the italic face has a normal width. By the style matching rules defined in CSS3 Fonts, matching the italic face is correct for plain text because matching font-stretch: normal takes precedence over matching font-style: normal.

[1] https://www.microsoft.com/typography/otspec/os2.htm#wdc

The older font matching code was deferring to fontconfig which implements it's own set of priorities for font matching.
Blocks: 543715
No longer blocks: 1180560
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Here's a fontconfig file that fixes the reported width. Force-regenerating the caches (fc-cache -f) will be needed to fix existing fonts.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: