Index: cc/font_atlas.h |
diff --git a/cc/font_atlas.h b/cc/font_atlas.h |
index 24592e4b52bfff2f76fee836fbe703849542de92..d18483fba081a44ad82bf43d8b5781a2c31f68ec 100644 |
--- a/cc/font_atlas.h |
+++ b/cc/font_atlas.h |
@@ -31,6 +31,9 @@ public: |
} |
~FontAtlas(); |
+ // Current font height. |
+ int fontHeight() const { return m_fontHeight; } |
+ |
// Draws multiple lines of text where each line of text is separated by '\n'. |
// - Correct glyphs will be drawn for ASCII codes in the range 32-127; any characters |
// outside that range will be displayed as a default rectangle glyph. |
@@ -39,6 +42,9 @@ public: |
// - Should only be called only on the impl thread. |
void drawText(SkCanvas*, const SkPaint&, const std::string& text, const gfx::Point& destPosition, const gfx::Size& clip) const; |
+ // Gives a text's width and height on the canvas. |
+ gfx::Size textSize(const std::string& text); |
+ |
// Draws the entire atlas at the specified position, just for debugging purposes. |
void drawDebugAtlas(SkCanvas*, const gfx::Point& destPosition) const; |