summaryrefslogtreecommitdiffstats
path: root/include/minikin/Layout.h
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2014-06-06 17:56:41 -0700
committerRaph Levien <raph@google.com>2014-06-11 12:42:44 -0700
commit1565169734dbed6d59cc10f2a7de01f8601533e0 (patch)
tree7d6be261f3a7d30b0d7f14a66b2ff5e290e1bc4f /include/minikin/Layout.h
parentb1eae5ea1f0f1303d155ee550f9aa94acd0127c5 (diff)
downloadandroid_frameworks_minikin-1565169734dbed6d59cc10f2a7de01f8601533e0.tar.gz
android_frameworks_minikin-1565169734dbed6d59cc10f2a7de01f8601533e0.tar.bz2
android_frameworks_minikin-1565169734dbed6d59cc10f2a7de01f8601533e0.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.h5
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;
};