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

Side by Side Diff: ui/gfx/pango_util.h

Issue 377413002: linux: Round font sizes when going from points to pixels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/gfx/pango_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_GFX_PANGO_UTIL_H_ 5 #ifndef UI_GFX_PANGO_UTIL_H_
6 #define UI_GFX_PANGO_UTIL_H_ 6 #define UI_GFX_PANGO_UTIL_H_
7 7
8 #include <cairo/cairo.h> 8 #include <cairo/cairo.h>
9 #include <pango/pango.h> 9 #include <pango/pango.h>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Configures |layout| for the passed-in parameters. 46 // Configures |layout| for the passed-in parameters.
47 void SetUpPangoLayout( 47 void SetUpPangoLayout(
48 PangoLayout* layout, 48 PangoLayout* layout,
49 const base::string16& text, 49 const base::string16& text,
50 const FontList& font_list, 50 const FontList& font_list,
51 base::i18n::TextDirection text_direction, 51 base::i18n::TextDirection text_direction,
52 int flags); 52 int flags);
53 53
54 // Returns the size in pixels for the specified |pango_font|. 54 // Returns the size in pixels for the specified |pango_font|.
55 size_t GetPangoFontSizeInPixels(PangoFontDescription* pango_font); 55 int GetPangoFontSizeInPixels(PangoFontDescription* pango_font);
56 56
57 // Retrieves the Pango metrics for a Pango font description. Caches the metrics 57 // Retrieves the Pango metrics for a Pango font description. Caches the metrics
58 // and never frees them. The metrics objects are relatively small and very 58 // and never frees them. The metrics objects are relatively small and very
59 // expensive to look up. 59 // expensive to look up.
60 PangoFontMetrics* GetPangoFontMetrics(PangoFontDescription* desc); 60 PangoFontMetrics* GetPangoFontMetrics(PangoFontDescription* desc);
61 61
62 } // namespace gfx 62 } // namespace gfx
63 63
64 #endif // UI_GFX_PANGO_UTIL_H_ 64 #endif // UI_GFX_PANGO_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | ui/gfx/pango_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698