Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions data/fonts/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ filegroup {
],
}

filegroup {
name: "GoogleSansFlex",
srcs: ["google_sans_flex_font_config.json"],
required: [
"GoogleSansFlex-Regular.ttf",
"Roboto-Regular.ttf",
],
}

genrule {
name: "generate_font_fallback",
tools: [":generate_fonts_xml"],
Expand All @@ -89,8 +98,7 @@ genrule {
":ComingSoon",
":CutiveMono",
":DancingScript",
":Roboto",
":RobotoFlex",
":GoogleSansFlex",
":SourceSansPro",
":noto-fonts",
] + select(release_flag("RELEASE_USE_ROBOTO_MONO_FONT"), {
Expand Down
1 change: 1 addition & 0 deletions data/fonts/fallback_order.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
{ "id": "RobotoFallback" },
{ "lang": "und-Arab" },
{ "lang": "und-Ethi" },
{ "lang": "und-Hebr" },
Expand Down
3 changes: 2 additions & 1 deletion data/fonts/fonts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
PRODUCT_PACKAGES := \
AndroidClock.ttf \
font_fallback.xml \
fonts.xml
fonts.xml \
GoogleSansFlex-Regular.ttf

ifneq ($(RELEASE_USE_ROBOTO_MONO_FONT),true)
PRODUCT_PACKAGES += DroidSansMono.ttf
Expand Down
50 changes: 31 additions & 19 deletions data/fonts/fonts.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@
<familyset version="23">
<!-- first font is default -->
<family name="sans-serif">
<font style="normal" supportedAxes="wght">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
</font>
<font style="italic" supportedAxes="wght">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
</font>
</family>

<!-- Keep Roboto as the first fallback for glyphs not provided by Google Sans Flex. -->
<family>
<font weight="100" style="normal">Roboto-Regular.ttf
<axis tag="ital" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
Expand Down Expand Up @@ -289,93 +301,93 @@
</family>
<alias name="source-sans-pro-semi-bold" to="source-sans-pro" weight="600"/>

<family name="roboto-flex">
<font weight="100" style="normal">RobotoFlex-Regular.ttf
<family name="google-sans-flex">
<font weight="100" style="normal">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="100" />
</font>
<font weight="200" style="normal">RobotoFlex-Regular.ttf
<font weight="200" style="normal">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="200" />
</font>
<font weight="300" style="normal">RobotoFlex-Regular.ttf
<font weight="300" style="normal">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="300" />
</font>
<font weight="400" style="normal">RobotoFlex-Regular.ttf
<font weight="400" style="normal">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="400" />
</font>
<font weight="500" style="normal">RobotoFlex-Regular.ttf
<font weight="500" style="normal">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="500" />
</font>
<font weight="600" style="normal">RobotoFlex-Regular.ttf
<font weight="600" style="normal">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="600" />
</font>
<font weight="700" style="normal">RobotoFlex-Regular.ttf
<font weight="700" style="normal">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="700" />
</font>
<font weight="800" style="normal">RobotoFlex-Regular.ttf
<font weight="800" style="normal">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="800" />
</font>
<font weight="900" style="normal">RobotoFlex-Regular.ttf
<font weight="900" style="normal">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="0" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="900" />
</font>
<font weight="100" style="italic">RobotoFlex-Regular.ttf
<font weight="100" style="italic">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="100" />
</font>
<font weight="200" style="italic">RobotoFlex-Regular.ttf
<font weight="200" style="italic">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="200" />
</font>
<font weight="300" style="italic">RobotoFlex-Regular.ttf
<font weight="300" style="italic">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="300" />
</font>
<font weight="400" style="italic">RobotoFlex-Regular.ttf
<font weight="400" style="italic">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="400" />
</font>
<font weight="500" style="italic">RobotoFlex-Regular.ttf
<font weight="500" style="italic">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="500" />
</font>
<font weight="600" style="italic">RobotoFlex-Regular.ttf
<font weight="600" style="italic">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="600" />
</font>
<font weight="700" style="italic">RobotoFlex-Regular.ttf
<font weight="700" style="italic">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="700" />
</font>
<font weight="800" style="italic">RobotoFlex-Regular.ttf
<font weight="800" style="italic">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="800" />
</font>
<font weight="900" style="italic">RobotoFlex-Regular.ttf
<font weight="900" style="italic">GoogleSansFlex-Regular.ttf
<axis tag="slnt" stylevalue="-10" />
<axis tag="wdth" stylevalue="100" />
<axis tag="wght" stylevalue="900" />
Expand Down
84 changes: 84 additions & 0 deletions data/fonts/google_sans_flex_font_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[
{
"name": "sans-serif",
"fonts": [
{
"file": "GoogleSansFlex-Regular.ttf",
"style": "normal",
"supportedAxes": "wght",
"axes": {
"slnt": 0,
"wdth": 100
}
},
{
"file": "GoogleSansFlex-Regular.ttf",
"style": "italic",
"supportedAxes": "wght",
"axes": {
"slnt": -10,
"wdth": 100
}
}
]
},
{
"name": "sans-serif-condensed",
"fonts": [
{
"file": "Roboto-Regular.ttf",
"supportedAxes": "wght,ital",
"axes": {
"wdth": 75
}
}
]
},
{
"name": "roboto",
"fonts": [
{
"file": "Roboto-Regular.ttf",
"supportedAxes": "wght,ital",
"axes": {
"wdth": 100
}
}
]
},
{
"name": "google-sans-flex",
"fonts": [
{
"file": "GoogleSansFlex-Regular.ttf",
"style": "normal",
"supportedAxes": "wght",
"axes": {
"slnt": 0,
"wdth": 100
}
},
{
"file": "GoogleSansFlex-Regular.ttf",
"style": "italic",
"supportedAxes": "wght",
"axes": {
"slnt": -10,
"wdth": 100
}
}
]
},
{
"id": "RobotoFallback",
"fonts": [
{
"file": "Roboto-Regular.ttf",
"supportedAxes": "wght,ital",
"axes": {
"wdth": 100
}
}
]
}
]
2 changes: 1 addition & 1 deletion ravenwood/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,8 @@ filegroup {
":NotoSerifThai-Regular.ttf",
":NotoSerifTibetan-VF.ttf",
":NotoSerifYezidi-VF.ttf",
":GoogleSansFlex-Regular.ttf",
":Roboto-Regular.ttf",
":RobotoFlex-Regular.ttf",
":RobotoStatic-Regular.ttf",
":SourceSansPro-Bold.ttf",
":SourceSansPro-BoldItalic.ttf",
Expand Down