Chromium Code Reviews

Unified Diff: app/gfx/font.h

Issue 1095004: Clamp the max size of fonts used by skia/chrome canvas. (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | app/gfx/font_gtk.cc » ('j') | app/gfx/font_gtk.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: app/gfx/font.h
diff --git a/app/gfx/font.h b/app/gfx/font.h
index f79f6d060d99005e0f2637e9371e000fb25842ee..550c59d13ceca85d958a54659cbc00f2b9baa2f0 100644
--- a/app/gfx/font.h
+++ b/app/gfx/font.h
@@ -219,6 +219,10 @@ class Font {
// The default font, used for the default constructor.
static Font* default_font_;
+ // Return the scale factor for fonts that account for DPI. We clamp the
+ // max DPI to prevent large fonts from overflowing UI elements.
+ static float GetPangoScaleFactor();
+
// The average width of a character, initialized and cached if needed.
double avg_width() const;
« no previous file with comments | « no previous file | app/gfx/font_gtk.cc » ('j') | app/gfx/font_gtk.cc » ('J')

Powered by Google App Engine