OSDN Git Service

Query style from asset-created font (Minikin)
authorRaph Levien <raph@google.com>
Wed, 4 Jun 2014 20:46:35 +0000 (13:46 -0700)
committerRaph Levien <raph@google.com>
Wed, 4 Jun 2014 20:46:35 +0000 (13:46 -0700)
commit1633caef58ebd0bc3b0c5da15dde2fb425b77c43
tree3460ae16b56a7b3ea996820ab996a6cec39429ac
parentdd1253294110f9626eac18839632de7d6102cbcc
Query style from asset-created font (Minikin)

This patch sets fStyle on the TypefaceImpl based on querying the font,
which is important in the Typeface.createFromAsset path. This fixes both
the style returned from getStyle() and also selects fallback fonts to
best match the style of the main font.

Fixes bug 15429916: "Typeface.getStyle always returning 0 in some L
devices".

Change-Id: I1992ba1e65e7f488d331e175f5f12843f67c2faa
core/jni/android/graphics/TypefaceImpl.cpp