Issue metadata
Sign in to add a comment
|
TrueType fonts rendered using bitmaps
Reported by
grawity@gmail.com,
Dec 23 2017
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36 Example URL: Steps to reproduce the problem: 1. Install a font such as Cambria from Windows (or Monaco from macOS), which is TTF with embedded bitmaps for certain sizes. 2. Open a document which uses the font (at 10pt or 12pt). What is the expected behavior? Chrome should honor the system-wide fontconfig option 'embeddedbitmaps=false' and render antialiased text. What went wrong? Chrome ignores the fontconfig option and uses non-antialiased embedded bitmaps for the text. Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? Yes 62 Does this work in other browsers? Yes Chrome version: 63.0.3239.108 Channel: stable OS Version: Flash Version: (Affects Arch Linux Chromium builds *and* the official Google Chrome builds.)
,
Dec 23 2017
,
Dec 25 2017
,
Dec 26 2017
,
Dec 27 2017
grawity@ - Thanks for filing the issue...!! Could you please provide a sample test document/url to test the issue from TE-end. This will help us in triaging the issue further. Thanks...!!
,
Dec 27 2017
I can reproduce it with any document, even as simple as this: <p style="font: 12pt Cambria">Hello world!</p> ...as long as the font is installed. (I copied C:\Windows\Fonts\Cambria* from Windows 10 to ~/.local/share/fonts/ on Linux.)
,
Dec 27 2017
And, forgot to mention the library versions Arch uses: extra/fontconfig 2.12.6+5+g665584a-1 extra/freetype2 2.8.1-1 (Not sure if the official Google binaries use system libraries or ship their own...)
,
Dec 27 2017
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 28 2017
grawity@ - Thanks for your help...!! Tried testing the issue on Ubuntu 14.04 using chrome reported version #63.0.3239.108 by copying the fonts at C:\Windows\Fonts\Cambria* from Windows 10 to ~/.local/share/fonts/ on Linux, but permission was denied even after modifying the permission using chmod command. Hence, tried method #2, from url: http://www.aboutlinux.info/2005/12/adding-windows-fonts-in-linux.html Opened the document provided at comment #6 and observed that chrome used non-antialiased embedded bitmaps for the text as in "2017-12-12.191658.Chromium63.png". This behaviour is same in M-62 and in M-50 also. Attached screen shots for reference. Could you please let us know if it the the correct way to proceed with testing. Please guide us with your inputs. Thanks...!!
,
Dec 28 2017
Well, yeah, the embedded bitmap feature is enabled by default in Linux's fontconfig :( But in this bug report, I am *disabling* this via ~/.config/fontconfig/fonts.conf (attached), and 62 honors this setting but 63 does not.
,
Dec 28 2017
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 29 2017
Able to reproduce the issue on Ubuntu 14.04 using chrome reported version #63.0.3239.108 and latest dev #65.0.3306.0. Bisect Information: ===================== Good build: 63.0.3234.0 Revision(506936) Bad Build : 63.0.3235.0 Revision(507234) Change Log URL: https://chromium.googlesource.com/chromium/src/+log/80f8312df3cc9c0f24600b0e7fe27bca1cd64785..a4eab4fa86aa0f2a0be6ef7234687b70c7a02f95 From the above change log suspecting below change Change-Id: I3e11df05fab9b0fdc465c97c4b2f7579b5403723 Reviewed-on: https://chromium-review.googlesource.com/702422 drott@ - Could you please check whether this is caused with respect to your change, if not please help us in assigning it to the right owner. Note: Adding stable blocker for M-63 as it seems to be a recent regression. Please feel free to remove the same if not appropriate. Thanks...!!
,
Jan 2 2018
,
Jan 3 2018
This is a side effect of an important change to improve rendering of the Calibri font on Windows. The Calibri font has bitmap strikes for Latin text which collide with subpixel rendering and lead to uneven spacing. Compare https://chromium-review.googlesource.com/702422 and issue 707713 . I am not exactly sure how this CL causes this regression side effect - that needs more investigation and we should be able to fix it. However, since this is a custom fontconfig configuration and custom installed font on Linux, it does not affect a large number of users and I would thus not consider it RB-Stable.
,
Jan 3 2018
> The Calibri font has bitmap strikes for Latin text which collide with subpixel rendering and lead to uneven spacing
Right, and Cambria has bitmaps as well – we're both trying to disable the same thing. But Chrome's fix to disable bitmaps for Calibri accidentally ended up force-*enabling* those bitmaps for other fonts, with noticeably bad results.
Looking at it, the problem seems to be in FontPlatformData{Linux,Win}.cpp:
paint->setEmbeddedBitmapText(!avoid_embedded_bitmaps_);
Instead, it should only disable the option, but never enable it:
if (avoid_embedded_bitmaps_) {
paint->setEmbeddedBitmapText(false);
}
,
Jan 3 2018
Thanks, now I see clearer, I did read your initial report the wrong way around. and had assumed you'd like to enable them. Your fix proposal seems reasonable, we can try with that, plus adding Cambria to the list of fonts not to use bitmaps from.
,
Jan 11 2018
...Not sure if that meant I should write the patch, but here you go anyway: https://crrev.com/c/861562
,
Jan 12 2018
Thanks for the CL - I've started on it, the tricky part is developing a regression test by creating an open license font file which has both bitmap glyphs and TrueType outlines. We do have the beginnings of such a test in https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/fast/text/chromium-linux-fontconfig-renderstyle.html?q=fontconfig+LayoutTests&sq=package:chromium&dr=C&l=23 - unfortunately, this one did not cover the bitmap case so far.
,
Jan 31 2018
,
Aug 31
drott@ Any chance you could fix the bug without needing the full regression testing? Perfect is the enemy of good, after all. 😉 |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by grawity@gmail.com
, Dec 23 2017102 KB
102 KB View Download