diff options
Diffstat (limited to 'include/minikin/CssParse.h')
-rw-r--r-- | include/minikin/CssParse.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/include/minikin/CssParse.h b/include/minikin/CssParse.h index 2dceb4a..519056d 100644 --- a/include/minikin/CssParse.h +++ b/include/minikin/CssParse.h @@ -25,26 +25,31 @@ namespace android { enum CssTag { unknown, fontSize, - fontWeight, fontStyle, - minikinHinting, + fontWeight, + cssLang, minikinBidi, + minikinHinting, + minikinVariant, }; const std::string cssTagNames[] = { "unknown", "font-size", - "font-weight", "font-style", - "-minikin-hinting", + "font-weight", + "lang", "-minikin-bidi", + "-minikin-hinting", + "-minikin-variant", }; class CssValue { public: enum Type { UNKNOWN, - FLOAT + FLOAT, + STRING }; enum Units { SCALAR, @@ -58,14 +63,20 @@ public: Type getType() const { return mType; } double getFloatValue() const { return floatValue; } int getIntValue() const { return floatValue; } + std::string getStringValue() const { return stringValue; } std::string toString(CssTag tag) const; void setFloatValue(double v) { mType = FLOAT; floatValue = v; } + void setStringValue(const std::string& v) { + mType = STRING; + stringValue = v; + } private: Type mType; double floatValue; + std::string stringValue; Units mUnits; }; @@ -85,4 +96,4 @@ private: } // namespace android -#endif // MINIKIN_CSS_PARSE_H
\ No newline at end of file +#endif // MINIKIN_CSS_PARSE_H |