Commit Graph

12 Commits

Author SHA1 Message Date
bungeman
3d47e2133c Labels when dumping fonts in Android parser test.
When the FontConfigParserAndroid test runs, it optionally dumps the
configurations it creates for manual inspection. This is useful, but
since three different configurations exist, it can be difficult to tell
them apart. This simply prints a short header before each dump so that
the dump can be identified.

Review URL: https://codereview.chromium.org/927533004
2015-02-13 18:30:11 -08:00
bungeman
9a0808fd8e Verify all parsed test font files start with cap.
All of the Android test font configuration files have file names which
start with a capital latin letter. Verify this is true of the parsed file
names. This would have caught previous issues with slicing, and will
hopefully prevent such issues going unnoticed in the future.

Review URL: https://codereview.chromium.org/925933003
2015-02-13 08:55:16 -08:00
bungeman
c3c694342a Fix append_fallback_font_families_for_locale.
The language was being set to garbage, now set to part of the file name.
Add a test to ensure we continue to parse fallback directories correctly.

BUG=chromium:422180

Review URL: https://codereview.chromium.org/912053003
2015-02-11 07:18:51 -08:00
bungeman
eb2be7fa44 Additional cleanups to Android config parsing.
Properly labels several methods as static.
Use XML_GetBuffer to avoid an extra copy.
Set the memory allocators to Skia's.
Set define in 'defines' instead of cflags.
Update debug dumper.

Review URL: https://codereview.chromium.org/915443002
2015-02-10 07:51:12 -08:00
bungeman
7fa87cd09f Add factory for Android font manager.
This allows users to create an Android font manager with their own set
of fonts, or augment the system set. This will allow for removal of
the current globals which are used for a similar, but more constained,
purpose.

BUG=skia:2817,skia:3314,chromium:407340

Review URL: https://codereview.chromium.org/887113002
2015-02-06 07:59:19 -08:00
bungeman
a44e9b9842 Update dump code in FontConfigParser test.
This code is still quite useful for debugging, but has bit rotted.
Update to match current structure of code.

Review URL: https://codereview.chromium.org/890073002
2015-01-30 19:58:19 -08:00
bungeman
4b86bacb04 Allow all font weights on Android and respect overrides.
This removes the code which forces 400 and 700 weights only,
and also overrides the font weight with the configured weight.

Review URL: https://codereview.chromium.org/694533006
2014-11-04 10:54:32 -08:00
tomhudson
2ed49a492b Mark fallback fonts in new Android font config parser
The new Android fonts.xml format doesn't explicitly tag fallback
fonts, or separate them from system fonts by putting them in a
separate file. We're assuming that any nameless font is a fallback
font.

Adds a unit test to track that we see as many fallback fonts as
expected when parsing a file.

BUG=chromium:400801
R=bungeman@google.com, djsollen@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/468893002
2014-08-13 07:53:49 -07:00
tomhudson
d3ddea284e Parses sample code provided by Android project. Attempts to keep FontFamily data structures produced consistent with expectations of previous versions of Skia.
R=bungeman@google.com, djsollen@google.com, palmer@chromium.org, reed@google.com, hcm@google.com, tomhudson@google.com
BUG=400801

Committed: https://skia.googlesource.com/skia/+/07544757c9fcf0f359f1686a3779eb2e75dd5b36

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/446473003
2014-08-11 11:28:01 -07:00
tomhudson
8aed3c151f Don't fail unit test if resources not found on device.
Not 100% sure about the right thing to do here; looks like some other
tests warn but don't officially fail.

R=djsollen@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/451703004
2014-08-07 10:20:51 -07:00
tomhudson
07544757c9 Parses sample code provided by Android project. Attempts to keep FontFamily data structures produced consistent with expectations of previous versions of Skia.
R=bungeman@google.com, djsollen@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/446473003
2014-08-05 13:35:02 -07:00
tomhudson
f79673bbae Test and generalize font configuration parser
Add a basic unit test for the Android font configuration parser.
Add a check for the new LMP file format; on detection, switch to a new
(as-yet unwritten) parser.

R=bungeman@google.com, djsollen@google.com, tomhudson@google.com

Author: tomhudson@chromium.org

Review URL: https://codereview.chromium.org/439813002
2014-08-05 06:36:14 -07:00