Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Issue 811123002: linux/chromeos: Improve querying for Fontconfig defaults. (Closed)

Created:
6 years ago by Daniel Erat
Modified:
5 years, 11 months ago
Reviewers:
msw, behdad, behdad_google
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

linux/chromeos: Improve queries for Fontconfig defaults. r302898 made FontRenderParams avoid calling FcFontMatch() for empty queries, instead just sticking to the default pattern. Many users don't have sane default patterns, though, so instead call FcConfigSubstituteWithPat() to load settings that aren't tied to particular font families. Also use scoped_ptr to simplify FcPattern management and add myself as an owner for font_render_params*. BUG=442443, 435277, 423056 Committed: https://crrev.com/2ff93446c3405557b6024d4e65eb5677195456cd Cr-Commit-Position: refs/heads/master@{#309560}

Patch Set 1 #

Patch Set 2 : update tests #

Patch Set 3 : add derat as OWNER for font_render_params* #

Total comments: 6

Patch Set 4 : apply review feedback #

Total comments: 2

Patch Set 5 : remove unnecessary LoadSystemFont() call in Scalable test #

Patch Set 6 : switch to FcConfigSubstituteWithPat() #

Patch Set 7 : revert expectation reordering #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -30 lines) Patch
M ui/gfx/OWNERS View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ui/gfx/font_render_params_linux.cc View 1 2 3 4 5 2 chunks +40 lines, -26 lines 0 comments Download
M ui/gfx/font_render_params_linux_unittest.cc View 1 2 3 4 5 6 2 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 30 (3 generated)
Daniel Erat
Let me know what you guys think about doing this.
6 years ago (2014-12-17 22:31:44 UTC) #2
msw
https://codereview.chromium.org/811123002/diff/40001/ui/gfx/font_render_params_linux.cc File ui/gfx/font_render_params_linux.cc (right): https://codereview.chromium.org/811123002/diff/40001/ui/gfx/font_render_params_linux.cc#newcode129 ui/gfx/font_render_params_linux.cc:129: // patterns configured (http://crbug.com/442443, http://crbug.com/435277, optional nit: to avoid ...
6 years ago (2014-12-17 22:42:23 UTC) #3
Daniel Erat
https://codereview.chromium.org/811123002/diff/40001/ui/gfx/font_render_params_linux.cc File ui/gfx/font_render_params_linux.cc (right): https://codereview.chromium.org/811123002/diff/40001/ui/gfx/font_render_params_linux.cc#newcode129 ui/gfx/font_render_params_linux.cc:129: // patterns configured (http://crbug.com/442443, http://crbug.com/435277, On 2014/12/17 22:42:23, msw ...
6 years ago (2014-12-18 00:15:46 UTC) #4
msw
lgtm with a nit https://codereview.chromium.org/811123002/diff/60001/ui/gfx/font_render_params_linux_unittest.cc File ui/gfx/font_render_params_linux_unittest.cc (right): https://codereview.chromium.org/811123002/diff/60001/ui/gfx/font_render_params_linux_unittest.cc#newcode226 ui/gfx/font_render_params_linux_unittest.cc:226: ASSERT_TRUE(LoadSystemFont("arial.ttf")); nit: We previously tried ...
6 years ago (2014-12-18 01:10:49 UTC) #5
Daniel Erat
https://codereview.chromium.org/811123002/diff/60001/ui/gfx/font_render_params_linux_unittest.cc File ui/gfx/font_render_params_linux_unittest.cc (right): https://codereview.chromium.org/811123002/diff/60001/ui/gfx/font_render_params_linux_unittest.cc#newcode226 ui/gfx/font_render_params_linux_unittest.cc:226: ASSERT_TRUE(LoadSystemFont("arial.ttf")); On 2014/12/18 01:10:49, msw wrote: > nit: We ...
6 years ago (2014-12-18 17:17:59 UTC) #6
behdad_google
Wouldn't this reintroduce the original bug we were trying to fix with the no-match change? ...
6 years ago (2014-12-19 19:59:06 UTC) #8
Daniel Erat
On 2014/12/19 19:59:06, behdad_google wrote: > Wouldn't this reintroduce the original bug we were trying ...
6 years ago (2014-12-19 20:52:37 UTC) #9
behdad_google
On 2014/12/19 20:52:37, Daniel Erat wrote: > On 2014/12/19 19:59:06, behdad_google wrote: > > Wouldn't ...
6 years ago (2014-12-19 21:37:19 UTC) #10
Daniel Erat
On 2014/12/19 21:37:19, behdad_google wrote: > On 2014/12/19 20:52:37, Daniel Erat wrote: > > On ...
6 years ago (2014-12-19 22:02:11 UTC) #11
behdad_google
On 2014/12/19 22:02:11, Daniel Erat wrote: > On 2014/12/19 21:37:19, behdad_google wrote: > > On ...
6 years ago (2014-12-19 22:18:31 UTC) #12
Daniel Erat
On 2014/12/19 22:18:31, behdad_google wrote: > On 2014/12/19 22:02:11, Daniel Erat wrote: > > On ...
6 years ago (2014-12-19 22:26:01 UTC) #13
behdad_google
On 2014/12/19 22:26:01, Daniel Erat wrote: > On 2014/12/19 22:18:31, behdad_google wrote: > > On ...
6 years ago (2014-12-19 22:29:26 UTC) #14
Daniel Erat
On 2014/12/19 22:29:26, behdad_google wrote: > On 2014/12/19 22:26:01, Daniel Erat wrote: > > On ...
6 years ago (2014-12-19 23:12:20 UTC) #15
Daniel Erat
On 2014/12/19 23:12:20, Daniel Erat wrote: > On 2014/12/19 22:29:26, behdad_google wrote: > > On ...
6 years ago (2014-12-19 23:13:09 UTC) #16
behdad_google
On 2014/12/19 23:13:09, Daniel Erat wrote: > On 2014/12/19 23:12:20, Daniel Erat wrote: > > ...
6 years ago (2014-12-20 07:10:18 UTC) #17
Daniel Erat
On 2014/12/20 07:10:18, behdad_google wrote: > On 2014/12/19 23:13:09, Daniel Erat wrote: > > On ...
6 years ago (2014-12-20 14:24:13 UTC) #18
behdad_google
Can you attach a full test program please? Also, which version of fontconfig?
6 years ago (2014-12-20 19:20:31 UTC) #19
Daniel Erat
On 2014/12/20 19:20:31, behdad_google wrote: > Can you attach a full test program please? > ...
6 years ago (2014-12-21 13:58:26 UTC) #20
behdad_google
On 2014/12/21 13:58:26, Daniel Erat wrote: > On 2014/12/20 19:20:31, behdad_google wrote: > > Can ...
6 years ago (2014-12-21 19:23:58 UTC) #21
behdad_google
On 2014/12/21 19:23:58, behdad_google wrote: > On 2014/12/21 13:58:26, Daniel Erat wrote: > > On ...
6 years ago (2014-12-21 19:41:52 UTC) #22
Daniel Erat
thanks again for the help, behdad! mind reviewing the latest version of this change?
6 years ago (2014-12-22 18:13:28 UTC) #23
behdad_google
lgtm
6 years ago (2014-12-23 04:09:24 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/811123002/120001
6 years ago (2014-12-23 15:00:27 UTC) #26
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years ago (2014-12-23 18:18:37 UTC) #27
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/2ff93446c3405557b6024d4e65eb5677195456cd Cr-Commit-Position: refs/heads/master@{#309560}
6 years ago (2014-12-23 18:21:11 UTC) #28
Daniel Erat
On 2014/12/23 18:21:11, I haz the power (commit-bot) wrote: > Patchset 7 (id:??) landed as ...
6 years ago (2014-12-23 19:11:16 UTC) #29
behdad_google
5 years, 11 months ago (2014-12-30 23:43:26 UTC) #30
Message was sent while issue was closed.
On 2014/12/23 19:11:16, Daniel Erat wrote:
> On 2014/12/23 18:21:11, I haz the power (commit-bot) wrote:
> > Patchset 7 (id:??) landed as
> > https://crrev.com/2ff93446c3405557b6024d4e65eb5677195456cd
> > Cr-Commit-Position: refs/heads/master@{#309560}
> 
> Behdad, thinking about this a bit more: would it also make sense to use
> FcPatternDel() to clear FC_SIZE and FC_PIXEL_SIZE, to ensure that we're not
> affected by configs that e.g. turn off antialiasing for certain size ranges?
For
> example:
> 
>   <match target="font">
>     <edit name="antialias" mode="assign"><bool>true</bool></edit>
>   </match>
>   <match target="font">
>     <test name="size" qual="any" compare="more"><double>10</double></test>
>     <test name="size" qual="any" compare="less"><double>20</double></test>
>     <edit name="antialias"><bool>false</bool></edit>
>   </match>
> 
> If we clear these, are there any other properties that should also be cleared?
> 
> (On the other hand, maybe all of this is hopeless unless we start querying
> Fontconfig for each run of text that's using web fonts -- we'll get it wrong
at
> times otherwise. :-/)

Sure, you have a valid point.  The more you try to fix this the more impossible
it will become.  At the end of the day, the only way to be completely correct is
to add the font to fontconfig and do a real match...

Powered by Google App Engine
This is Rietveld 408576698