diff options
Diffstat (limited to 'include/minikin/Layout.h')
-rw-r--r-- | include/minikin/Layout.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/minikin/Layout.h b/include/minikin/Layout.h index 19f3109..388a7a7 100644 --- a/include/minikin/Layout.h +++ b/include/minikin/Layout.h @@ -84,7 +84,8 @@ public: // public accessors size_t nGlyphs() const { return mGlyphs.size(); } - const MinikinFont* getFont(int i) const { return mGlyphs[i].font.font->typeface().get(); } + const Font* getFont(int i) const { return mGlyphs[i].font.font.get(); } + const std::shared_ptr<Font>& getFontRef(int i) const { return mGlyphs[i].font.font; } FontFakery getFakery(int i) const { return mGlyphs[i].font.fakery; } unsigned int getGlyphId(int i) const { return mGlyphs[i].glyph_id; } float getX(int i) const { return mGlyphs[i].x; } @@ -92,8 +93,6 @@ public: float getAdvance() const { return mAdvance; } float getCharAdvance(size_t i) const { return mAdvances[i]; } const std::vector<float>& getAdvances() const { return mAdvances; } - void getBounds(MinikinRect* rect) const { rect->set(mBounds); } - const MinikinRect& getBounds() const { return mBounds; } // Purge all caches, useful in low memory conditions static void purgeCaches(); @@ -135,7 +134,6 @@ private: std::vector<float> mAdvances; float mAdvance; - MinikinRect mBounds; }; } // namespace minikin |