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

Unified Diff: ui/gfx/platform_font_win.h

Issue 847283003: Revert of Relanding this with font test fixes for gdi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/font_list_unittest.cc ('k') | ui/gfx/platform_font_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/platform_font_win.h
diff --git a/ui/gfx/platform_font_win.h b/ui/gfx/platform_font_win.h
index 9ba2b81af78bbd01359745d296a7d8a993a0ef30..11f94d4d2ee86576f879c7a8b7435c7279bfca6f 100644
--- a/ui/gfx/platform_font_win.h
+++ b/ui/gfx/platform_font_win.h
@@ -49,10 +49,11 @@
// name could not be retrieved, returns GetFontName().
std::string GetLocalizedFontName() const;
- // Returns a derived Font with the specified |style| and maximum |height|.
- // The returned Font will be the largest font size with a height <= |height|,
- // since a size with the exact specified |height| may not necessarily exist.
- // GetMinimumFontSize() may impose a font size that is taller than |height|.
+ // Returns a derived Font with the specified |style| and with height at most
+ // |height|. If the height and style of the receiver already match, it is
+ // returned. Otherwise, the returned Font will have the largest size such that
+ // its height is less than or equal to |height| (since there may not exist a
+ // size that matches the exact |height| specified).
Font DeriveFontWithHeight(int height, int style);
// Overridden from PlatformFont:
@@ -171,6 +172,10 @@
static HFontRef* CreateHFontRefFromGDI(HFONT font,
const TEXTMETRIC& font_metrics);
+ // Returns a largest derived Font whose height does not exceed the height of
+ // |base_font|.
+ static Font DeriveWithCorrectedSize(HFONT base_font);
+
// Creates and returns a new HFontRef from the specified HFONT using metrics
// from skia. Currently this is only used if we use DirectWrite for font
// metrics.
« no previous file with comments | « ui/gfx/font_list_unittest.cc ('k') | ui/gfx/platform_font_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698