diff options
author | Behdad Esfahbod <behdad@google.com> | 2014-07-29 17:19:22 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@google.com> | 2014-07-30 17:29:00 -0400 |
commit | 5986f6048ae21e0ec094c1f2ca0169d0ca6ec6b5 (patch) | |
tree | 32f00ffa069007ac40286552ceec98914c5ce018 /include/minikin/MinikinFont.h | |
parent | 9802b0dc8e648117ab917e716e81e8a0da909cb3 (diff) | |
download | android_frameworks_minikin-5986f6048ae21e0ec094c1f2ca0169d0ca6ec6b5.tar.gz android_frameworks_minikin-5986f6048ae21e0ec094c1f2ca0169d0ca6ec6b5.tar.bz2 android_frameworks_minikin-5986f6048ae21e0ec094c1f2ca0169d0ca6ec6b5.zip |
Support fontFeatureSettings
Bug: 15246510
Change-Id: I544915d29b2be4fb9f82f1989188a3a918c50fbc
Diffstat (limited to 'include/minikin/MinikinFont.h')
-rw-r--r-- | include/minikin/MinikinFont.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/minikin/MinikinFont.h b/include/minikin/MinikinFont.h index 873a3ea..9b25f92 100644 --- a/include/minikin/MinikinFont.h +++ b/include/minikin/MinikinFont.h @@ -17,6 +17,8 @@ #ifndef MINIKIN_FONT_H #define MINIKIN_FONT_H +#include <string> + #include <minikin/MinikinRefCounted.h> #include <minikin/FontFamily.h> @@ -28,10 +30,15 @@ namespace android { class MinikinFont; // Possibly move into own .h file? -// Note: if you add a field here, also update LayoutCacheKey +// Note: if you add a field here, either add it to LayoutCacheKey or to skipCache() struct MinikinPaint { MinikinPaint() : font(0), size(0), scaleX(0), skewX(0), letterSpacing(0), paintFlags(0), - fakery() { } + fakery(), fontFeatureSettings() { } + + bool skipCache() const { + return !fontFeatureSettings.empty(); + } + MinikinFont *font; float size; float scaleX; @@ -39,6 +46,7 @@ struct MinikinPaint { float letterSpacing; uint32_t paintFlags; FontFakery fakery; + std::string fontFeatureSettings; }; struct MinikinRect { |