aboutsummaryrefslogtreecommitdiffstats
path: root/include/core/SkPaint.h
diff options
context:
space:
mode:
authorBilly Hewlett <billyh@google.com>2012-07-03 17:03:55 -0700
committerVictoria Lease <violets@google.com>2012-08-20 08:43:58 -0700
commit725b3e03acb91dc69296554932624b36612bd189 (patch)
tree56edf31f828b49d7b202522b91ac389a29e55714 /include/core/SkPaint.h
parent8ab6679ce80dafa0d97c426c9fe70c6b6ceb20e6 (diff)
downloadexternal_skia-725b3e03acb91dc69296554932624b36612bd189.zip
external_skia-725b3e03acb91dc69296554932624b36612bd189.tar.gz
external_skia-725b3e03acb91dc69296554932624b36612bd189.tar.bz2
DO NOT MERGE Han Preference
Cherry-pick Id8c91ae0be6cad8a7ef77a0cd5803676290986c1 from master. During font initialization, create a seperate fallback list for each locale. At runtime, use the fallbacklist associated with the locale set in the paint object. Fallback files are associated with locales in fallback_fonts.xml. Multiple files can be associated with the same locale, ordering within that langauge and apart from that language in the fallback order is preserved. This changelist also includes some refactoring, notably of the functions that call getNextContext(). Change-Id: I121f0e491a522c4a8558a0066b2d8969fb8a3667
Diffstat (limited to 'include/core/SkPaint.h')
-rw-r--r--include/core/SkPaint.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 1715013..d2233f0 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -10,11 +10,16 @@
#ifndef SkPaint_DEFINED
#define SkPaint_DEFINED
+#include "SkTypes.h"
#include "SkColor.h"
#include "SkDrawLooper.h"
#include "SkXfermode.h"
#include "SkString.h"
+#ifdef SK_BUILD_FOR_ANDROID
+#include "SkLanguage.h"
+#endif
+
class SkAutoGlyphCache;
class SkColorFilter;
class SkDescriptor;
@@ -656,15 +661,15 @@ public:
void setTextAlign(Align align);
#ifdef SK_BUILD_FOR_ANDROID
- /** Return the paint's text locale value.
- @return the paint's text locale value used for drawing text.
+ /** Return the paint's language value used for drawing text.
+ @return the paint's language value used for drawing text.
*/
- const SkString& getTextLocale() const { return fTextLocale; }
+ const SkLanguage& getLanguage() const { return fLanguage; }
- /** Set the paint's text locale.
- @param locale set the paint's locale value for drawing text.
+ /** Set the paint's language value used for drawing text.
+ @param language set the paint's language value for drawing text.
*/
- void setTextLocale(const SkString& locale);
+ void setLanguage(const SkLanguage& language);
enum FontVariant {
@@ -924,7 +929,7 @@ private:
unsigned fTextEncoding : 2; // 3 values
unsigned fHinting : 2;
#ifdef SK_BUILD_FOR_ANDROID
- SkString fTextLocale;
+ SkLanguage fLanguage;
FontVariant fFontVariant;
#endif