diff options
author | Seigo Nonaka <nona@google.com> | 2017-03-28 16:16:41 -0700 |
---|---|---|
committer | Seigo Nonaka <nona@google.com> | 2017-04-03 13:55:07 -0700 |
commit | ff55115121a7a2753ba2265cb3201a3a14c0874d (patch) | |
tree | 151c60917705792e4afa5bfc5b7820228a72cc50 /data/fonts | |
parent | be436bdefe1947c01eb4b42bf1b864b1e86b7fb9 (diff) |
Reorganize font enumeration API.
This CL cleans up APIs around font variation settings.
- Remove FontConfig and FontManager public API.
- Remove FontManagerService from system service.
- Extract inner class FontConfig.Axis as top-level class FontVariationAxis.
This is used by Typeface.Builder public API to create new Typeface.
- Introduce and expose FontVariationAxis utility functions from/to string.
- Throws if the invalid font variation settings is passed.
Test: android.text.cts.FontVariationAxisTest passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.cts.PaintTest passes
Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
Diffstat (limited to 'data/fonts')
-rw-r--r-- | data/fonts/fonts.xml | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/data/fonts/fonts.xml b/data/fonts/fonts.xml index 76c29a9bf971..3dab1f7e20e1 100644 --- a/data/fonts/fonts.xml +++ b/data/fonts/fonts.xml @@ -3,15 +3,10 @@ WARNING: Parsing of this file by third-party apps is not supported. The file, and the font files it refers to, will be renamed and/or moved out from their respective location in the next Android release, and/or the - format or syntax of the file may change significantly. You must not - parse this file for information about system fonts. Instead, you must - call android.text.FontManager#getSystemFonts(). For example, it can be - called as context.getSystemService(FontManager.class).getSystemFonts(). - Note that the returned FontConfig includes data on all the defined font - families and all the details about weight, style, etc. It also provides - an open file descriptor to each font file. Note that callers of the API - should ensure they close the given file descriptors once they are done - using them. + format or syntax of the file may change significantly. If you parse this + file for information about system fonts, do it at your own risk. Your + application will almost certainly break with the next major Android + release. In this file, all fonts without names are added to the default list. Fonts are chosen based on a match: full BCP-47 language tag including |