Open Bug 1182651 Opened 10 years ago Updated 3 years ago

"Oswald" font renders incorrectly in Nightly

Categories

(Core :: Graphics: Text, defect)

Unspecified
Linux
defect

Tracking

()

People

(Reporter: jorendorff, Unassigned)

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files, 1 obsolete file)

Attached file oswald.html (obsolete) —
The attached file renders with pretty obvious bugs, in Nightly only, on Linux.
Attached image abcdefg.png
I'm running Linux on a Retina MBP, in case that matters --- layout.css.devPixelsPerPx is -1.0 and Nightly is apparently inferring a value of 2.0.
I'm not able to reproduce this on the following systems: * Retina Macbook Pro 13" (2013) running Mac OS Yosemite * Razerblade 15" laptop running Windows 10 * Desktop PC running Windows 7 * Desktop PC running Fedora 22 Would you mind checking if this reproduces for you elsewhere (eg. Mac OSX on your Macbook)?
Revised testcase to use https in the Google fonts url. Without this, the fonts won't load due to a mixed http/https content error. With the revised testcase, the font renders fine on trunk under OSX 10.8 and Ubuntu 14.04. Jason, could you comment on the specific distro/version that you have installed?
Attachment #8632279 - Attachment is obsolete: true
Flags: needinfo?(jorendorff)
Whiteboard: [gfx-noted]
(In reply to John Daggett (:jtd) from comment #4) > With the revised testcase, the font renders fine on trunk under OSX 10.8 and > Ubuntu 14.04. The revised testcase still renders incorrectly for me. Much the same. > Jason, could you comment on the specific distro/version that you have > installed? I'm using Fedora Core 22. The version of Firefox that exhibits the bug is, according to about:support, Firefox 42.0a1, build id 20150802030218.
Flags: needinfo?(jorendorff) → needinfo?(jdaggett)
It looks like there's some crazy hinting-related stuff going on. The behavior may depend on your font hinting settings (possibly specified through fontconfig), and/or on how freetype was built on your system -- in particular, whether the TrueType bytecode interpreter is present and enabled, or whether FT's auto-hinting is in use, etc.
Flags: needinfo?(jdaggett)
OS: Unspecified → Linux
(In reply to Jonathan Kew (:jfkthame) from comment #6) > It looks like there's some crazy hinting-related stuff going on. Thanks for looking. What can I try in ~/.fonts.conf to confirm this theory? Currently there is no such file. I'd never heard of fontconfig until today. > The > behavior may depend on your font hinting settings (possibly specified > through fontconfig), and/or on how freetype was built on your system -- in > particular, whether the TrueType bytecode interpreter is present and > enabled, or whether FT's auto-hinting is in use, etc. How can I find out? I checked with /proc/$FIREFOX_PID/maps and this is the only mapped file that has "freetype" in the filename: $ rpm -qf /usr/lib64/libfreetype.so.6.11.4 freetype-2.5.5-1.fc22.x86_64 So however Fedora builds it for everybody, that's what I've got. (We also have a copy of free-type in the gecko tree, I guess? But I'm just using the Nightly channel, so if we build it for everybody, then that's what I've got.)
Flags: needinfo?(jfkthame)
I think :karlt knows a lot more about this side of things than I do; Karl, can you suggest what Jason should try here?
Flags: needinfo?(jfkthame) → needinfo?(karlt)
(In reply to Jonathan Kew (:jfkthame) from comment #6) > It looks like there's some crazy hinting-related stuff going on. The > behavior may depend on your font hinting settings (possibly specified > through fontconfig), and/or on how freetype was built on your system -- in > particular, whether the TrueType bytecode interpreter is present and > enabled, or whether FT's auto-hinting is in use, etc. Yes, the bytecode hints are causing the rendering. I may be possible to determine whether this is a FreeType or font bug by testing on WINNT with ClearType disabled, but I don't know how to tell Firefox not to enable ClearType for downloaded fonts. You can work around these issues per font with this kind of thing in ~/.config/fontconfig/fonts.conf or ~/.fonts.conf: <?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <fontconfig> <match target="font"> <test name="family"> <string>OsWald</string> </test> <test name="foundry"> <string>unknown</string> </test> <edit name="autohint"> <bool>true</bool> </edit> </match> </fontconfig> But many web fonts seem to have bad hints. A blanket setting can apply to all fonts downloaded in Firefox, if you prefer. <match target="font"> <test name="prgname"> <string>firefox</string> </test> <!-- no file name matches with |all| and means a downloaded font --> <test name="file" qual="all"> <string>A STRING THAT IS NOT A FILENAME//</string> </test> <test name="foundry"> <string>unknown</string> </test> <edit name="autohint"> <bool>true</bool> </edit> </match>
Flags: needinfo?(karlt)
https://www.google.com/fonts/specimen/Oswald Check Light 300 and Bold 300 lines! Oswald font INCORRECT, please fix this asap. Our Whole website built on that font!!! thanks win7 ff
Presumably, one way to work around the problem (as a site author) would be to strip the truetype hints from the problematic fonts, and deploy your own unhinted copies instead of relying on what's served by google fonts. Or possibly re-hinting the files with ttfautohint might give better results. The Oswald font appears to be released under the Open Font License, so it should be permissible to do this.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: