OSDN Git Service

Support for scaleX and skewX in Minikin
authorRaph Levien <raph@google.com>
Sat, 31 May 2014 07:02:19 +0000 (00:02 -0700)
committerRaph Levien <raph@google.com>
Thu, 5 Jun 2014 17:57:18 +0000 (10:57 -0700)
commite95b5850ac2e56330abf68362451e7614b3dfe16
treee36b8e30f0b8153b716e78f027a1903dd5ecbd15
parentdd1253294110f9626eac18839632de7d6102cbcc
Support for scaleX and skewX in Minikin

Passes textScaleX and textSkewX parameters, as well as paint flags from
the paint to Minikin, to support nontrivial scale and stretch of text.
Passing paint flags should minimize kerning artifacts arising from
mismatch of glyph rendering in layout and drawing.

Also, replaces unsafe snprintf to a fixed size buffer with a safe
version, which still avoids an allocation per layout operation.

This is part of the fix for bug 15186705 "Usability of the suggestion
strip in recent OTA's is severely reduced"

Change-Id: I79788383135836f4c21fb84405f36382627bf959
core/jni/android/graphics/MinikinSkia.cpp
core/jni/android/graphics/MinikinSkia.h
core/jni/android/graphics/MinikinUtils.cpp
core/jni/android/graphics/MinikinUtils.h
core/jni/android/graphics/TypefaceImpl.cpp