diff options
author | Raph Levien <raph@google.com> | 2014-06-06 17:56:41 -0700 |
---|---|---|
committer | Raph Levien <raph@google.com> | 2014-06-10 11:59:29 -0700 |
commit | 9a5f713add8cfb91ac2c9ed5c917309053201ab6 (patch) | |
tree | 7d6be261f3a7d30b0d7f14a66b2ff5e290e1bc4f /include/minikin/Layout.h | |
parent | 89566f0ada1cafe673efa064cde38467990235d4 (diff) | |
download | android_frameworks_minikin-9a5f713add8cfb91ac2c9ed5c917309053201ab6.tar.gz android_frameworks_minikin-9a5f713add8cfb91ac2c9ed5c917309053201ab6.tar.bz2 android_frameworks_minikin-9a5f713add8cfb91ac2c9ed5c917309053201ab6.zip |
Support for fake bold and italics
This patch adds support for computing when fake bold and fake italics
are needed (because the styles are requested but not provided by the
matching FontFamily), and providing them as part of the layout result.
Part of the fix for bug 15436379 Fake bold doesn't fully work (Minikin)
Change-Id: I180c034b559837943673b5c272c8e890178dff0d
Diffstat (limited to 'include/minikin/Layout.h')
-rw-r--r-- | include/minikin/Layout.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/minikin/Layout.h b/include/minikin/Layout.h index 91b8ef6..1b91ad8 100644 --- a/include/minikin/Layout.h +++ b/include/minikin/Layout.h @@ -87,6 +87,7 @@ public: size_t nGlyphs() const; // Does not bump reference; ownership is still layout MinikinFont *getFont(int i) const; + FontFakery getFakery(int i) const; unsigned int getGlyphId(int i) const; float getX(int i) const; float getY(int i) const; @@ -101,7 +102,7 @@ public: private: // Find a face in the mFaces vector, or create a new entry - int findFace(MinikinFont* face, LayoutContext* ctx); + int findFace(FakedFont face, LayoutContext* ctx); // Lay out a single bidi run void doLayoutRunCached(const uint16_t* buf, size_t start, size_t count, size_t bufSize, @@ -125,7 +126,7 @@ private: std::vector<float> mAdvances; const FontCollection* mCollection; - std::vector<MinikinFont *> mFaces; + std::vector<FakedFont> mFaces; float mAdvance; MinikinRect mBounds; }; |