diff options
author | Raph Levien <raph@google.com> | 2014-08-26 22:16:20 -0700 |
---|---|---|
committer | Raph Levien <raph@google.com> | 2014-08-26 22:19:29 -0700 |
commit | 531dab6d3a2ffcd13684367659dfd0296f86cfe5 (patch) | |
tree | 85f259363cf95ee7ac16732086d363bbbc84ac6e /core/jni/android | |
parent | 0db4f35e0bbc25ee25ebe2d57174893217248597 (diff) | |
download | frameworks_base-531dab6d3a2ffcd13684367659dfd0296f86cfe5.zip frameworks_base-531dab6d3a2ffcd13684367659dfd0296f86cfe5.tar.gz frameworks_base-531dab6d3a2ffcd13684367659dfd0296f86cfe5.tar.bz2 |
Fix incorrect return value on missing glyph
The GetGlyph function returns a boolean indicating whether the glyph
exists in the font. However, we were testing the pointer, so the test
would always succeed even if the glyph was missing. This interfered with
fallback algorithms for rendering compatibility characters.
Bug: 15816880
Bug: 16856221
Change-Id: I95cd45bb8f5e8ddf74cf23e6e624fbf30172e00a
Diffstat (limited to 'core/jni/android')
-rw-r--r-- | core/jni/android/graphics/MinikinSkia.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/android/graphics/MinikinSkia.cpp b/core/jni/android/graphics/MinikinSkia.cpp index ae29014..4649b07 100644 --- a/core/jni/android/graphics/MinikinSkia.cpp +++ b/core/jni/android/graphics/MinikinSkia.cpp @@ -39,7 +39,7 @@ bool MinikinFontSkia::GetGlyph(uint32_t codepoint, uint32_t *glyph) const { uint16_t glyph16; paint.textToGlyphs(&codepoint, sizeof(codepoint), &glyph16); *glyph = glyph16; - return !!glyph; + return !!glyph16; } static void MinikinFontSkia_SetSkiaPaint(const MinikinFont* font, SkPaint* skPaint, const MinikinPaint& paint) { |