OSDN Git Service

Support for fake bold in Minikin builds
authorRaph Levien <raph@google.com>
Sat, 7 Jun 2014 01:05:22 +0000 (18:05 -0700)
committerRaph Levien <raph@google.com>
Wed, 11 Jun 2014 19:55:26 +0000 (12:55 -0700)
commiteb4f5680c3773750464a3786ec89e2c679e105f2
tree30e53c58c78b36fc27b83672cf7a45e1acad3670
parentf71372099ee000e8639a9fc1d33d5657dfbc3ccd
Support for fake bold in Minikin builds

Part of the fix for bug 15436379 Fake bold doesn't fully work (Minikin)

This patch queries the Minikin layout for when fake bold is needed,
and applies that to both shaping and drawing paint.

Also simplifies refcounting (the lifetime of all MinikinFont objects
is subsumed by the enclosing FontCollection).

Note: the fake bold flag set by the user is ignored in this patch.

Fake italics would be possible using the same mechanism, but it's
slightly more complicated (fake and user-set textSkewX values would need
to be combined, and the latter restored after drawing).

Change-Id: Ica2c4604846cbb37e5a783778b18d8993c9d4563
core/jni/android/graphics/Canvas.cpp
core/jni/android/graphics/MinikinSkia.cpp
core/jni/android/graphics/MinikinSkia.h
core/jni/android/graphics/MinikinUtils.h
core/jni/android/graphics/Paint.cpp
core/jni/android/graphics/TypefaceImpl.cpp
core/jni/android_view_GLES20Canvas.cpp