summaryrefslogtreecommitdiff
path: root/include/minikin/MinikinPaint.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/minikin/MinikinPaint.h')
-rw-r--r--include/minikin/MinikinPaint.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/minikin/MinikinPaint.h b/include/minikin/MinikinPaint.h
index 54b476f..04cab1d 100644
--- a/include/minikin/MinikinPaint.h
+++ b/include/minikin/MinikinPaint.h
@@ -23,6 +23,7 @@
#include "minikin/FamilyVariant.h"
#include "minikin/FontCollection.h"
#include "minikin/FontFamily.h"
+#include "minikin/FontFeature.h"
#include "minikin/Hasher.h"
namespace minikin {
@@ -45,7 +46,7 @@ enum MinikinFontFlags {
};
// Possibly move into own .h file?
-// Note: if you add a field here, either add it to LayoutCacheKey or to skipCache()
+// Note: if you add a field here, either add it to LayoutCacheKey
struct MinikinPaint {
MinikinPaint(const std::shared_ptr<FontCollection>& font)
: size(0),
@@ -59,7 +60,7 @@ struct MinikinPaint {
fontFeatureSettings(),
font(font) {}
- bool skipCache() const { return !fontFeatureSettings.empty(); }
+ bool skipCache() const;
float size;
float scaleX;
@@ -70,7 +71,7 @@ struct MinikinPaint {
uint32_t localeListId;
FontStyle fontStyle;
FamilyVariant familyVariant;
- std::string fontFeatureSettings;
+ std::vector<FontFeature> fontFeatureSettings;
std::shared_ptr<FontCollection> font;
void copyFrom(const MinikinPaint& paint) { *this = paint; }
@@ -100,7 +101,7 @@ struct MinikinPaint {
.update(localeListId)
.update(fontStyle.identifier())
.update(static_cast<uint8_t>(familyVariant))
- .updateString(fontFeatureSettings)
+ .update(fontFeatureSettings)
.update(font->getId())
.hash();
}