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

Issue 400193004: Unify desktop Linux and Chrome OS font rendering params. (Closed)

Created:
6 years, 5 months ago by Daniel Erat
Modified:
6 years, 5 months ago
Reviewers:
msw
CC:
chromium-reviews, Yuki
Project:
chromium
Visibility:
Public.

Description

Unify desktop Linux and Chrome OS font rendering params. Use the same path to get font rendering settings on desktop Linux and Chrome OS: query the LinuxFontDelegate if it's set and then query Fontconfig. Also make the LinuxFontDelegate interface return a PangoFontDescription directly (as opposed to an opaque string that's actually a stringified PangoFontDescription) and make it return a cached FontRenderParams struct instead of exposing separate methods for looking up individual properties. Finally, add a missing build dependency on ui_test_pak, which is needed to get the default font resource when running gfx_unittests on Chrome OS. BUG=125235, 393067 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284255

Patch Set 1 #

Patch Set 2 : handle NULL strings in helper functions #

Patch Set 3 : inline params init, enable tests for cros, and add missing ui_test_pak dependency #

Patch Set 4 : update some comments #

Total comments: 13

Patch Set 5 : merge and apply review feedback #

Total comments: 2

Patch Set 6 : make ScopedPangoFontDescription accept a string #

Total comments: 2

Patch Set 7 : use initializer list #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -172 lines) Patch
M chrome/browser/ui/libgtk2ui/gtk2_ui.h View 1 2 3 4 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/gtk2_ui.cc View 1 2 3 4 5 5 chunks +65 lines, -88 lines 0 comments Download
M ui/gfx/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/font_render_params_linux.cc View 2 chunks +9 lines, -37 lines 0 comments Download
M ui/gfx/font_render_params_linux_unittest.cc View 1 2 2 chunks +0 lines, -13 lines 0 comments Download
M ui/gfx/gfx_tests.gyp View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/linux_font_delegate.h View 1 2 3 4 2 chunks +9 lines, -13 lines 0 comments Download
M ui/gfx/pango_util.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
M ui/gfx/platform_font_pango.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M ui/gfx/platform_font_pango.cc View 1 2 3 4 5 1 chunk +8 lines, -8 lines 0 comments Download
M ui/gfx/platform_font_pango_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -4 lines 0 comments Download
M ui/gfx/render_text_pango.cc View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
Daniel Erat
https://codereview.chromium.org/400193004/diff/60001/ui/gfx/linux_font_delegate.h File ui/gfx/linux_font_delegate.h (right): https://codereview.chromium.org/400193004/diff/60001/ui/gfx/linux_font_delegate.h#newcode39 ui/gfx/linux_font_delegate.h:39: virtual scoped_ptr<ScopedPangoFontDescription> (i was concerned that the string that ...
6 years, 5 months ago (2014-07-18 17:19:11 UTC) #1
Daniel Erat
On 2014/07/18 17:19:11, Daniel Erat wrote: > https://codereview.chromium.org/400193004/diff/60001/ui/gfx/linux_font_delegate.h > File ui/gfx/linux_font_delegate.h (right): > > https://codereview.chromium.org/400193004/diff/60001/ui/gfx/linux_font_delegate.h#newcode39 ...
6 years, 5 months ago (2014-07-18 17:26:16 UTC) #2
msw
Nice cleanup! https://codereview.chromium.org/400193004/diff/60001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (left): https://codereview.chromium.org/400193004/diff/60001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc#oldcode831 chrome/browser/ui/libgtk2ui/gtk2_ui.cc:831: // TODO(derat): Remove this debugging code if/when ...
6 years, 5 months ago (2014-07-18 19:14:44 UTC) #3
Daniel Erat
https://codereview.chromium.org/400193004/diff/60001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (left): https://codereview.chromium.org/400193004/diff/60001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc#oldcode831 chrome/browser/ui/libgtk2ui/gtk2_ui.cc:831: // TODO(derat): Remove this debugging code if/when http://crbug.com/375824 On ...
6 years, 5 months ago (2014-07-18 19:39:09 UTC) #4
msw
https://codereview.chromium.org/400193004/diff/60001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (left): https://codereview.chromium.org/400193004/diff/60001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc#oldcode831 chrome/browser/ui/libgtk2ui/gtk2_ui.cc:831: // TODO(derat): Remove this debugging code if/when http://crbug.com/375824 On ...
6 years, 5 months ago (2014-07-18 19:59:46 UTC) #5
Daniel Erat
https://codereview.chromium.org/400193004/diff/60001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/400193004/diff/60001/chrome/browser/ui/libgtk2ui/gtk2_ui.cc#newcode368 chrome/browser/ui/libgtk2ui/gtk2_ui.cc:368: g_free(hint_style); On 2014/07/18 19:59:46, msw wrote: > On 2014/07/18 ...
6 years, 5 months ago (2014-07-18 20:26:52 UTC) #6
msw
nice! lgtm with a nit. https://codereview.chromium.org/400193004/diff/100001/ui/gfx/pango_util.h File ui/gfx/pango_util.h (right): https://codereview.chromium.org/400193004/diff/100001/ui/gfx/pango_util.h#newcode30 ui/gfx/pango_util.h:30: description_ = pango_font_description_from_string(str.c_str()); nit: ...
6 years, 5 months ago (2014-07-18 20:31:39 UTC) #7
Daniel Erat
https://codereview.chromium.org/400193004/diff/100001/ui/gfx/pango_util.h File ui/gfx/pango_util.h (right): https://codereview.chromium.org/400193004/diff/100001/ui/gfx/pango_util.h#newcode30 ui/gfx/pango_util.h:30: description_ = pango_font_description_from_string(str.c_str()); On 2014/07/18 20:31:39, msw wrote: > ...
6 years, 5 months ago (2014-07-18 20:35:05 UTC) #8
Daniel Erat
The CQ bit was checked by derat@chromium.org
6 years, 5 months ago (2014-07-18 20:35:10 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/400193004/120001
6 years, 5 months ago (2014-07-18 20:36:41 UTC) #10
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 23:53:59 UTC) #11
Message was sent while issue was closed.
Change committed as 284255

Powered by Google App Engine
This is Rietveld 408576698