summaryrefslogtreecommitdiffstats
path: root/data/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'data/fonts')
-rw-r--r--data/fonts/fallback_fonts.xml4
-rw-r--r--data/fonts/fonts.xml24
2 files changed, 26 insertions, 2 deletions
diff --git a/data/fonts/fallback_fonts.xml b/data/fonts/fallback_fonts.xml
index 0f0281b..c4a949f 100644
--- a/data/fonts/fallback_fonts.xml
+++ b/data/fonts/fallback_fonts.xml
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
+ NOTE: this file is the legacy format, for compatibility with apps. The new,
+ more flexible format is fonts.xml. Please keep the two in sync until the legacy
+ format can be fully removed.
+
Fallback Fonts
This file specifies the fonts, and the priority order, that will be searched for any
diff --git a/data/fonts/fonts.xml b/data/fonts/fonts.xml
index a4d4906..04bc67a 100644
--- a/data/fonts/fonts.xml
+++ b/data/fonts/fonts.xml
@@ -1,4 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
+<!--
+ NOTE: this is the newer (L) version of the system font configuration,
+ supporting richer weight selection. Some apps will expect the older
+ version, so please keep system_fonts.xml and fallback_fonts.xml in sync
+ with any changes, even though framework will only read this file.
+
+ All fonts withohut 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
+ prefer the former when an 800 weight is requested. Since bold spans
+ effectively add 300 to the weight, this ensures that 900 is the bold
+ paired with the 500 weight, ensuring adequate contrast.
+-->
<familyset version="22">
<!-- first font is default -->
<family name="sans-serif">
@@ -10,15 +26,16 @@
<font weight="400" style="italic">Roboto-Italic.ttf</font>
<font weight="500" style="normal">Roboto-Medium.ttf</font>
<font weight="500" style="italic">Roboto-MediumItalic.ttf</font>
- <font weight="700" style="normal">Roboto-Bold.ttf</font>
- <font weight="700" style="italic">Roboto-BoldItalic.ttf</font>
<font weight="900" style="normal">Roboto-Black.ttf</font>
<font weight="900" style="italic">Roboto-BlackItalic.ttf</font>
+ <font weight="700" style="normal">Roboto-Bold.ttf</font>
+ <font weight="700" style="italic">Roboto-BoldItalic.ttf</font>
</family>
<!-- Note that aliases must come after the fonts they reference. -->
<alias name="sans-serif-thin" to="sans-serif" weight="100" />
<alias name="sans-serif-light" to="sans-serif" weight="300" />
+ <alias name="sans-serif-medium" to="sans-serif" weight="500" />
<alias name="sans-serif-black" to="sans-serif" weight="900" />
<alias name="arial" to="sans-serif" />
<alias name="helvetica" to="sans-serif" />
@@ -227,6 +244,9 @@
<family>
<font weight="400" style="normal">NotoColorEmoji.ttf</font>
</family>
+ <family>
+ <font weight="400" style="normal">DroidSansFallback.ttf</font>
+ </family>
<family lang="ja">
<font weight="400" style="normal">MTLmr3m.ttf</font>
</family>