Index: cc/font_atlas.h |
diff --git a/cc/font_atlas.h b/cc/font_atlas.h |
index f9baea14fc2b8963457cd728e3052c11c28bbb24..8bacdaac6714894337eb1cf2db379cd610fa8082 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 IntSize& clip) const; |
+ // Gives a text's width and height on the canvas. |
+ IntSize 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; |