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

Issue 406493002: linux: Get font DPI from GTK. (Closed)

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

Description

linux: Get font DPI from GTK. Use GtkSettings's gtk-xft-dpi property to convert Pango font descriptions from points to pixels. Previously PangoContext's default resolution, which is sometimes (always?) unset, was used, resulting in 96 DPI being used for conversions regardless of the value reported by X. BUG=375824 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284121

Patch Set 1 #

Total comments: 8

Patch Set 2 : apply review feedback #

Total comments: 2

Patch Set 3 : inline initialization of a static variable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -34 lines) Patch
M chrome/browser/ui/libgtk2ui/gtk2_ui.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/libgtk2ui/gtk2_ui.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download
M ui/gfx/linux_font_delegate.h View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/gfx/pango_util.cc View 1 2 3 chunks +17 lines, -34 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Daniel Erat
6 years, 5 months ago (2014-07-18 01:09:28 UTC) #1
msw
lgtm with nits; +cc oshima as per his related TODO: https://code.google.com/p/chromium/codesearch#chromium/src/ui/views/widget/desktop_aura/desktop_screen_x11.cc&l=37 https://codereview.chromium.org/406493002/diff/1/chrome/browser/ui/libgtk2ui/gtk2_ui.cc File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): ...
6 years, 5 months ago (2014-07-18 03:39:33 UTC) #2
Daniel Erat
https://codereview.chromium.org/406493002/diff/1/chrome/browser/ui/libgtk2ui/gtk2_ui.cc File chrome/browser/ui/libgtk2ui/gtk2_ui.cc (right): https://codereview.chromium.org/406493002/diff/1/chrome/browser/ui/libgtk2ui/gtk2_ui.cc#newcode665 chrome/browser/ui/libgtk2ui/gtk2_ui.cc:665: gint dpi = 0.0; On 2014/07/18 03:39:33, msw wrote: ...
6 years, 5 months ago (2014-07-18 04:20:26 UTC) #3
oshima
nice. We can use this to compute scale factor I guess? Or should I use ...
6 years, 5 months ago (2014-07-18 04:24:22 UTC) #4
msw
Still lgtm https://codereview.chromium.org/406493002/diff/20001/ui/gfx/pango_util.cc File ui/gfx/pango_util.cc (right): https://codereview.chromium.org/406493002/diff/20001/ui/gfx/pango_util.cc#newcode107 ui/gfx/pango_util.cc:107: pixels_in_point = GetPangoDPI() / 72.0; // 72 ...
6 years, 5 months ago (2014-07-18 05:02:33 UTC) #5
Daniel Erat
https://codereview.chromium.org/406493002/diff/20001/ui/gfx/pango_util.cc File ui/gfx/pango_util.cc (right): https://codereview.chromium.org/406493002/diff/20001/ui/gfx/pango_util.cc#newcode107 ui/gfx/pango_util.cc:107: pixels_in_point = GetPangoDPI() / 72.0; // 72 points in ...
6 years, 5 months ago (2014-07-18 14:27:05 UTC) #6
Daniel Erat
The CQ bit was checked by derat@chromium.org
6 years, 5 months ago (2014-07-18 14:27:22 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/406493002/40001
6 years, 5 months ago (2014-07-18 14:27:52 UTC) #8
commit-bot: I haz the power
6 years, 5 months ago (2014-07-18 16:29:55 UTC) #9
Message was sent while issue was closed.
Change committed as 284121

Powered by Google App Engine
This is Rietveld 408576698