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

Issue 377413002: linux: Round font sizes when going from points to pixels. (Closed)

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

Description

linux: Round font sizes when going from points to pixels. Round point-based Pango font sizes to the nearest pixel. Otherwise, we can end up with smaller UI fonts than GTK+ 2.0 apps in some cases. This seems to be in line with what get_scaled_size() does in Pango's pango/pangofc-fontmap.c, and gives me identically sized text in Gimp 2.6.12 and Chrome when I set the Gtk/FontName XSETTINGS property to "Arial 10". Note that Chrome doesn't currently honor additional fine-grained configuration performed via FontConfig, like disabling antialiasing for fonts of a certain size. That'll happen in a separate change. BUG=375824 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282204

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -12 lines) Patch
M ui/gfx/pango_util.h View 1 chunk +1 line, -1 line 0 comments Download
M ui/gfx/pango_util.cc View 1 chunk +9 lines, -11 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Daniel Erat
i'd like to add a test for this, but i'm not sure how to isolate ...
6 years, 5 months ago (2014-07-09 20:08:44 UTC) #1
msw
Awesome!!! lgtm
6 years, 5 months ago (2014-07-09 20:19:59 UTC) #2
Daniel Erat
The CQ bit was checked by derat@chromium.org
6 years, 5 months ago (2014-07-09 20:20:39 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/derat@chromium.org/377413002/1
6 years, 5 months ago (2014-07-09 20:22:24 UTC) #4
commit-bot: I haz the power
6 years, 5 months ago (2014-07-10 01:03:47 UTC) #5
Message was sent while issue was closed.
Change committed as 282204

Powered by Google App Engine
This is Rietveld 408576698