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

Unified Diff: ui/gfx/platform_font_win.h

Issue 251773002: PlatformFontWin::DeriveFontWithHeight insensitive to base font's height (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PlatformFontWin::DeriveFontWithHeight consistency fix after code review changes Created 6 years, 6 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 | « no previous file | 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 2c6f51e0508dbe39374cd9347c6986f5f2d19b67..c07226241dc38b05ab572f291b7bfbb75df11350 100644
--- a/ui/gfx/platform_font_win.h
+++ b/ui/gfx/platform_font_win.h
@@ -142,6 +142,14 @@ class GFX_EXPORT PlatformFontWin : public PlatformFont {
// Creates and returns a new HFONTRef from the specified HFONT.
static HFontRef* CreateHFontRef(HFONT font);
+ // Creates and returns a new HFONTRef from the specified HFONT. Uses provided
+ // |font_metrics| instead of calculating new one.
+ static HFontRef* CreateHFontRef(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 a new PlatformFontWin with the specified HFontRef. Used when
// constructing a Font from a HFONT we don't want to copy.
explicit PlatformFontWin(HFontRef* hfont_ref);
« no previous file with comments | « no previous file | ui/gfx/platform_font_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698