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

Unified Diff: ui/gfx/font.cc

Issue 14348033: NOT FOR SUBMIT - Windows Views HiDPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Revert spurious changes, plus some corrections. Created 7 years, 7 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.h ('k') | ui/gfx/rect_conversions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font.cc
diff --git a/ui/gfx/font.cc b/ui/gfx/font.cc
index 424d5852d53ca2574fe3a289e8364d6d9889e96a..c96babefc3b49549b07173bc8e021bfdb4379186 100644
--- a/ui/gfx/font.cc
+++ b/ui/gfx/font.cc
@@ -42,6 +42,10 @@ Font Font::DeriveFont(int size_delta) const {
return DeriveFont(size_delta, GetStyle());
}
+Font Font::DeriveFontScaled(float size_scale) const {
+ return DeriveFont(static_cast<int>((size_scale-1.0)*GetFontSize()));
+}
+
Font Font::DeriveFont(int size_delta, int style) const {
return platform_font_->DeriveFont(size_delta, style);
}
« no previous file with comments | « ui/gfx/font.h ('k') | ui/gfx/rect_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698