summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2017-02-24 10:16:40 -0800
committerRoozbeh Pournader <roozbeh@google.com>2017-02-27 08:32:41 -0800
commit19b05500b7ecc3998b77e1d03f36a73fe0531a9f (patch)
tree70aaf6aaaba4ec4b42016198c0f3a8b8c96e5879
parent0c6d24f736c1b7d5e8b3c698d2e25d90203431f2 (diff)
Document future removal or move of fonts.xml
Users are referred to alternative ways to find the data. Test: not needed Change-Id: I399b3aed8d04b0eecf163f61faba8fd5babc74de
-rw-r--r--data/fonts/fonts.xml20
1 files changed, 17 insertions, 3 deletions
diff --git a/data/fonts/fonts.xml b/data/fonts/fonts.xml
index d8e6db7e35a4..76598a06c165 100644
--- a/data/fonts/fonts.xml
+++ b/data/fonts/fonts.xml
@@ -1,8 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- All fonts without names are added to the default list. Fonts are chosen
- based on a match: full BCP-47 language tag including script, then just
- language, and finally order (the first font containing the glyph).
+ 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.
+
+ 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
+ script, then just language, and finally order (the first font containing
+ the glyph).
Order of appearance is also the tiebreaker for weight matching. This is
the reason why the 900 weights of Roboto precede the 700 weights - we