Respect declared font style on Android.
authorbungeman <bungeman@google.com>
Fri, 17 Apr 2015 20:51:08 +0000 (13:51 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 17 Apr 2015 20:51:08 +0000 (13:51 -0700)
commite85a754a4ce9b279159270faa6717932f7a8548f
tree6d378ab2768b94de77753f17e7589b8e0fe907bf
parent21d3ed52e5eecc41f0ed05acdd3c5ff1189fed75
Respect declared font style on Android.

Previously the normal/italic style bit was obtained from scanning the
font file. With the new format the style may be stated explicitly, and
this explicit value in the configuration file should override any
information obtained from the font data itself.

This change allows the font element's style attribute to override the
font's style, but retains the default 'auto' setting for backwards
compatibility. Repecting the style bit may become more important with
variation fonts, because it will be up to the configuration writer to
determine what values of the 'slnt' variation should be considered
'normal' or 'italic'.

DOCS_PREVIEW= https://skia.org/?cl=1092093002

Committed: https://skia.googlesource.com/skia/+/673e902c9b9982a167f54f1cc175d8d9cab8bcaf

Review URL: https://codereview.chromium.org/1092093002
site/dev/contrib/style.md
src/ports/SkFontConfigParser_android.cpp
src/ports/SkFontConfigParser_android.h
src/ports/SkFontMgr_android.cpp