diff options
author | Victoria Lease <violets@google.com> | 2013-06-14 16:15:41 -0700 |
---|---|---|
committer | Victoria Lease <violets@google.com> | 2013-06-17 11:57:37 -0700 |
commit | 8870538f7c8d32187255707bc3217bd3625d397e (patch) | |
tree | 49ecec1fcc28d2ff062bd3faebc745f412fb3006 /core/jni/android | |
parent | 636f119e2f3df30ccde1d5b2cce5e3cf140a75a7 (diff) | |
download | frameworks_base-8870538f7c8d32187255707bc3217bd3625d397e.zip frameworks_base-8870538f7c8d32187255707bc3217bd3625d397e.tar.gz frameworks_base-8870538f7c8d32187255707bc3217bd3625d397e.tar.bz2 |
make setHinting(HINTING_ON) kNormal_Hinting
Previously, the default hinting mode for a freshly-constructed Paint
object is equivalent to Skia's kNormal_Hinting mode, in which font
hints are respected if available. Calling
Paint.setHinting(HINTING_ON), however, is equivalent to setting
Skia's kSlight_Hinting mode, in which font hints are ignored in
favour of freetype-generated autohints.
This discrepancy is bad for a variety of reasons:
- Once Paint.setHinting() has been called, it is impossible to return
to the default hinting level.
- Calling paint.setHinting(otherPaint.getHinting()) can result in
paint having a different hinting level than otherPaint.
- Paint.setHinting(HINTING_ON) actually results in font hints being
ignored, which is perhaps the opposite of the intended behaviour.
This commit resolves these discrepancies by making HINTING_ON
correspond to Skia's kNormal_Hinting setting.
Change-Id: Iefb8e051ef53bea783e6f3be37748985ec397bc5
Bug: 9466164
Diffstat (limited to 'core/jni/android')
-rw-r--r-- | core/jni/android/graphics/Paint.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android/graphics/Paint.cpp b/core/jni/android/graphics/Paint.cpp index 380f061..527aee4 100644 --- a/core/jni/android/graphics/Paint.cpp +++ b/core/jni/android/graphics/Paint.cpp @@ -113,7 +113,7 @@ public: static void setHinting(JNIEnv* env, jobject paint, jint mode) { NPE_CHECK_RETURN_VOID(env, paint); GraphicsJNI::getNativePaint(env, paint)->setHinting( - mode == 0 ? SkPaint::kNo_Hinting : SkPaint::kSlight_Hinting); + mode == 0 ? SkPaint::kNo_Hinting : SkPaint::kNormal_Hinting); } static void setAntiAlias(JNIEnv* env, jobject paint, jboolean aa) { |