Issue metadata
Sign in to add a comment
|
Full hinting FontConfig settings are ignored |
||||||||||||||||||||||
Issue description
After upgrading from M68 to M69, Linux Chrome is ignoring my FontConfig settings and rendering all text with slight hinting instead of full hinting. Here's what my $HOME/.fonts.conf contains:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="antialias" mode="assign"><bool>true</bool></edit>
<edit name="autohint" mode="assign"><bool>false</bool></edit>
<edit name="hinting" mode="assign"><bool>true</bool></edit>
<edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
<edit name="rgba" mode="assign"><const>none</const></edit>
</match>
</fontconfig>
I added additional logging to ui/gfx/font_render_params_linux.cc in ToT Linux Chrome (r590026):
- if (delegate)
+ if (delegate) {
params = delegate->GetDefaultFontRenderParams();
+ LOG(ERROR) << "XXX default: hinting=" << params.hinting
+ << " autohinter=" << params.autohinter
+ << " subpixel_pos=" << params.subpixel_positioning
+ << " subpixel_ren=" << params.subpixel_rendering;
+ }
QueryFontconfig(actual_query, ¶ms, family_out);
+ LOG(ERROR) << "XXX query: hinting=" << params.hinting
+ << " autohinter=" << params.autohinter
+ << " subpixel_pos=" << params.subpixel_positioning
+ << " subpixel_ren=" << params.subpixel_rendering;
I can see that LinuxFontDelegate::GetDefaultFontRenderParams() returns the correct hinting setting, but they're overridden by the call to QueryFontconfig():
default: hinting=3 autohinter=0 subpixel_pos=1 subpixel_ren=0
query: hinting=1 autohinter=0 subpixel_pos=1 subpixel_ren=0
final: hinting=1 autohinter=0 subpixel_pos=0 subpixel_ren=0
When I make GetFontRenderParams set params.hinting back to FULL before returning, I see full hinting again in much of the UI (but not tabs, oddly). (A lot of web content doesn't honor my hinting settings either, but that's a separate issue.)
QueryFontconfig hasn't changed since 2016, so I suspect that the regression was introduced by the FontConfig roll at https://crrev.com/c/1138543 on July 16 for issue 857511 . This was right before the M69 branch on July 19.
Side question: why didn't the unit tests in ui/gfx/font_render_params_linux_unittest.cc catch this?
,
Sep 12
Is this what is causing Issue 881366 ?
,
Sep 12
> Is this what is causing Issue 881366 ? No since fontconfig is only used on Linux but that bug lists Windows and Mac as affected OSes.
,
Sep 12
I see the issue go away with the following steps: 1. Start with Chromium 1929034cb6471d9cf0c37a72595454f5c3d605f9 (r590026, 2018-09-10). 2. Reset //src/third_party/fontconfig to 34db191c01779928ad17c1cfe9f5ad50de64bbbb (r523918, 2017-12-13) -- this is just a build fix for the next step. 3. Set //src/third_party/fontconfig/src to b546940435ebfb0df575bc7a2350d1e913919c34 (2017-09-17) and cherry-pick 1451f82 to fix compilation (there were a few easy merge conflicts). After this, I see fully-hinted fonts again (revert.png). Without it, I see light hinting (tot.png). So I think that whatever changed in FontConfig to break this was between b546940435ebfb0df575bc7a2350d1e913919c34 and 1451f829e750926cec27855eded71c24ac7ac7c6.
,
Sep 12
could you try cherrypicking this cl: https://chromium.googlesource.com/external/fontconfig/+/806fd4c2c5164d66d978b0a4c579c157e5cbe766
,
Sep 12
#5: That appears to fix it -- thanks!
,
Sep 13
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d9d67cb2c7edcd68d9735a3ef349714d6b69cd3e commit d9d67cb2c7edcd68d9735a3ef349714d6b69cd3e Author: Tom Anderson <thomasanderson@chromium.org> Date: Thu Sep 13 00:46:29 2018 Update fontconfig to ba206df9b9a7ca300265f650842c1459ff7c634a This fixes settings from ~/.fonts.conf not being respected. BUG= 882577 R=derat Change-Id: I92a2fad0918ef3f4e5a9758efcc437beb3c20850 Reviewed-on: https://chromium-review.googlesource.com/1222728 Reviewed-by: Dan Erat <derat@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/heads/master@{#590878} [modify] https://crrev.com/d9d67cb2c7edcd68d9735a3ef349714d6b69cd3e/DEPS [modify] https://crrev.com/d9d67cb2c7edcd68d9735a3ef349714d6b69cd3e/third_party/fontconfig/README.chromium [modify] https://crrev.com/d9d67cb2c7edcd68d9735a3ef349714d6b69cd3e/third_party/fontconfig/include/config.h [modify] https://crrev.com/d9d67cb2c7edcd68d9735a3ef349714d6b69cd3e/third_party/fontconfig/include/src/fcalias.h [modify] https://crrev.com/d9d67cb2c7edcd68d9735a3ef349714d6b69cd3e/third_party/fontconfig/include/src/fcaliastail.h [modify] https://crrev.com/d9d67cb2c7edcd68d9735a3ef349714d6b69cd3e/third_party/fontconfig/include/src/fcstdint.h
,
Sep 13
Requesting merge of (Linux-only) change from c#7 to M69 and M70. This bug causes user font configuration to be ignored, so this is a pretty serious regression.
,
Sep 13
This bug requires manual review: Request affecting a post-stable build Please contact the milestone owner if you have questions. Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Sep 13
derat@, thanks for bisecting this! And Thomas, thank you for the quick resolution. > Side question: why didn't the unit tests in ui/gfx/font_render_params_linux_unittest.cc catch this? Thomas, any idea how we could better catch such regressions early in the future and why this test didn't trigger?
,
Sep 13
#10: Speculating wildly about why tests didn't catch this: based on the description at https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/110, it sounds like the bug was around FontConfig no longer reading ~/.fonts.conf. We might be able to cover that by setting $HOME in unit tests, but it also looks like FC itself has a test for this now (although I'm not sure when/if those get run in the course of FC development).
,
Sep 13
We didn't see any regressions because we try hard not to read any user font settings in our tests. Like derat pointed out, fontconfig now has a test for this, so think we should rely on fontconfig's test suite for this type of issue. Maybe we could add a note in README.chromium to run the fc test suite before rolling?
,
Sep 13
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a5896e82f1715c84d742efe0fdac9f2584f8dd6e commit a5896e82f1715c84d742efe0fdac9f2584f8dd6e Author: Tom Anderson <thomasanderson@chromium.org> Date: Thu Sep 13 22:28:31 2018 Update fontconfig to ba206df9b9a7ca300265f650842c1459ff7c634a This fixes settings from ~/.fonts.conf not being respected. BUG= 882577 R=​derat Change-Id: I92a2fad0918ef3f4e5a9758efcc437beb3c20850 Reviewed-on: https://chromium-review.googlesource.com/1222728 Reviewed-by: Dan Erat <derat@chromium.org> Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#590878}(cherry picked from commit d9d67cb2c7edcd68d9735a3ef349714d6b69cd3e) Reviewed-on: https://chromium-review.googlesource.com/1226253 Reviewed-by: Krishna Govind <govind@chromium.org> Cr-Commit-Position: refs/branch-heads/3551@{#5} Cr-Branched-From: 08c03be7fdeabd63de8e4efca4c562a2f5a70ba9-refs/heads/master@{#590850} [modify] https://crrev.com/a5896e82f1715c84d742efe0fdac9f2584f8dd6e/DEPS [modify] https://crrev.com/a5896e82f1715c84d742efe0fdac9f2584f8dd6e/third_party/fontconfig/README.chromium [modify] https://crrev.com/a5896e82f1715c84d742efe0fdac9f2584f8dd6e/third_party/fontconfig/include/config.h [modify] https://crrev.com/a5896e82f1715c84d742efe0fdac9f2584f8dd6e/third_party/fontconfig/include/src/fcalias.h [modify] https://crrev.com/a5896e82f1715c84d742efe0fdac9f2584f8dd6e/third_party/fontconfig/include/src/fcaliastail.h [modify] https://crrev.com/a5896e82f1715c84d742efe0fdac9f2584f8dd6e/third_party/fontconfig/include/src/fcstdint.h
,
Sep 13
branch:3538
,
Sep 13
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0dba86d97c522758b0cc0427b51cdf2b71c70fea commit 0dba86d97c522758b0cc0427b51cdf2b71c70fea Author: Tom Anderson <thomasanderson@chromium.org> Date: Thu Sep 13 23:10:53 2018 Update fontconfig to ba206df9b9a7ca300265f650842c1459ff7c634a > This fixes settings from ~/.fonts.conf not being respected. > > BUG= 882577 > R=derat > > Change-Id: I92a2fad0918ef3f4e5a9758efcc437beb3c20850 > Reviewed-on: https://chromium-review.googlesource.com/1222728 > Reviewed-by: Dan Erat <derat@chromium.org> > Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> > Cr-Commit-Position: refs/heads/master@{#590878} BUG= 882577 TBR=derat NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true Change-Id: I7206b3f7c320b548972de56f5c3fa4ec86adbc67 Reviewed-on: https://chromium-review.googlesource.com/1226201 Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/branch-heads/3538@{#391} Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811} [modify] https://crrev.com/0dba86d97c522758b0cc0427b51cdf2b71c70fea/DEPS [modify] https://crrev.com/0dba86d97c522758b0cc0427b51cdf2b71c70fea/third_party/fontconfig/README.chromium [modify] https://crrev.com/0dba86d97c522758b0cc0427b51cdf2b71c70fea/third_party/fontconfig/include/config.h [modify] https://crrev.com/0dba86d97c522758b0cc0427b51cdf2b71c70fea/third_party/fontconfig/include/src/fcalias.h [modify] https://crrev.com/0dba86d97c522758b0cc0427b51cdf2b71c70fea/third_party/fontconfig/include/src/fcaliastail.h [modify] https://crrev.com/0dba86d97c522758b0cc0427b51cdf2b71c70fea/third_party/fontconfig/include/src/fcstdint.h
,
Sep 14
pls update bug with Dev/canary result tomorrow morning on version 71.0.3551.3 or higher.
,
Sep 14
The NextAction date has arrived: 2018-09-14
,
Sep 14
thomasanderson@ - Could you please provide manual repro steps to verify the fix from TE-end. Thanks...!!
,
Sep 14
#18: Put the config I pasted above into ~/.fonts.conf:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="antialias" mode="assign"><bool>true</bool></edit>
<edit name="autohint" mode="assign"><bool>false</bool></edit>
<edit name="hinting" mode="assign"><bool>true</bool></edit>
<edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
<edit name="rgba" mode="assign"><const>none</const></edit>
</match>
</fontconfig>
When you start Chrome, font rendering should look similar to revert.png from #4 rather than tot.png. Feel free to attach a screenshot if you need me to take a look. Thanks!
,
Sep 14
derat@ I'm unable to reproduce the issue on stable (I'm seeing changes in ~/.fonts.conf reflected in Chrome). Could you provide verification that the issue is fixed on 71.0.3551.3 ? The package is at go/brwdj
,
Sep 14
+ derat@, could you ptal comment #20 pls?
,
Sep 14
Yes, I downloaded chrome-linux64.zip from that directory and can confirm that my hinting settings are honored now. See the attached screenshot.
,
Sep 14
For comparison, here's what stable (69.0.3497.92) looks like for me on the same system.
,
Sep 14
Approving merge to M69 branch 3497 based on comments #8, #22. Pls merge ASAP. Thank you.
,
Sep 14
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/40144de10375216b3ed67ee9364b880d6bf963c0 commit 40144de10375216b3ed67ee9364b880d6bf963c0 Author: Tom Anderson <thomasanderson@chromium.org> Date: Fri Sep 14 20:01:23 2018 [Merge to M69] Update fontconfig to ba206df9b9a7ca300265f650842c1459ff7c634a > This fixes settings from ~/.fonts.conf not being respected. > > BUG= 882577 > R=derat > > Change-Id: I92a2fad0918ef3f4e5a9758efcc437beb3c20850 > Reviewed-on: https://chromium-review.googlesource.com/1222728 > Reviewed-by: Dan Erat <derat@chromium.org> > Commit-Queue: Thomas Anderson <thomasanderson@chromium.org> > Cr-Commit-Position: refs/heads/master@{#590878} BUG= 882577 TBR=derat NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true Change-Id: I200f8ec878a85ff446d2b86408db3c8d81f65a7e Reviewed-on: https://chromium-review.googlesource.com/1225887 Reviewed-by: Thomas Anderson <thomasanderson@chromium.org> Cr-Commit-Position: refs/branch-heads/3497@{#941} Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753} [modify] https://crrev.com/40144de10375216b3ed67ee9364b880d6bf963c0/DEPS [modify] https://crrev.com/40144de10375216b3ed67ee9364b880d6bf963c0/third_party/fontconfig/README.chromium [modify] https://crrev.com/40144de10375216b3ed67ee9364b880d6bf963c0/third_party/fontconfig/include/config.h [modify] https://crrev.com/40144de10375216b3ed67ee9364b880d6bf963c0/third_party/fontconfig/include/src/fcalias.h [modify] https://crrev.com/40144de10375216b3ed67ee9364b880d6bf963c0/third_party/fontconfig/include/src/fcaliastail.h [modify] https://crrev.com/40144de10375216b3ed67ee9364b880d6bf963c0/third_party/fontconfig/include/src/fcstdint.h
,
Sep 17
Unable to reproduce the issue on ubuntu 17.10 using chrome stable #69.0.3497.81 and dev #71.0.3551.3 as per comment #19. Observed that full hinting FontConfig settings are not ignored and it is as per tot.png in comment #4. Attached screen shots for reference. derat@ - Could you please check the attached screen shots and please help us in verifying the fix from your end. Thanks...!!
,
Sep 17
Yep, 69.0.3497.100 is fixed -- see the attached screenshot. Re #26, it looks like the system that produced those screenshots isn't configured to use full hinting. Linux font configuration is a disaster, but I can confirm that the regression appears to be fixed by the merge.
,
Sep 17
Thank you derat@ for verification on chrome stable #69.0.3497.100.
,
Sep 19
derat@, can you please help us to verify this fix on today's beta RC# 70.0.3538.22 (Build Console: https://goto.google.com/vgblt) ? Thank you!
,
Sep 19
Yep, that one's fine too.
,
Sep 19
Thank you so much for the quick confirmation.
,
Sep 21
Working for me in chromium 69.0.3497.100. I use hintslight but setting fontconfig to hintfull chromium honors it correctly.
,
Sep 21
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by thomasanderson@chromium.org
, Sep 10