Skip to content

Commit

Permalink
vendor: Import Kai/Sam/Victor fonts for theme picker
Browse files Browse the repository at this point in the history
Change-Id: Iff9782578f7ec750ca892c7be78d0f0d2752ac39
  • Loading branch information
Dyneteve authored and jhenrique09 committed Nov 23, 2020
1 parent cf3342b commit 6696985
Show file tree
Hide file tree
Showing 14 changed files with 279 additions and 1 deletion.
23 changes: 22 additions & 1 deletion config/fonts.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,32 @@ PRODUCT_PACKAGES += \
ZillaSlab-SemiBoldItalic.ttf \
ZillaSlab-SemiBold.ttf

# Karla family
PRODUCT_PACKAGES += \
Karla-Regular.ttf

# Fraunces family
PRODUCT_PACKAGES += \
Fraunces-SemiBold.ttf

# BigShouldersText family
PRODUCT_PACKAGES += \
BigShouldersText-Bold.ttf \
BigShouldersText-ExtraBold.ttf

# Barlow family
PRODUCT_PACKAGES += \
Barlow-Bold.ttf \
Barlow-Medium.ttf

# Customization overlays
PRODUCT_PACKAGES += \
FontArbutusSourceOverlay \
FontArvoLatoOverlay \
FontRubikRubikOverlay
FontKaiOverlay \
FontRubikRubikOverlay \
FontSamOverlay \
FontVictorOverlay

PRODUCT_COPY_FILES += \
vendor/aosp/fonts/fonts_customization.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/fonts_customization.xml
26 changes: 26 additions & 0 deletions fonts/fonts_customization.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,30 @@
<font weight="600" style="italic">ZillaSlab-SemiBoldItalic.ttf</font>
</family>
<alias name="zilla-slab-semi-bold" to="zilla-slab-medium" weight="600" />

<family customizationType="new-named-family" name="karla">
<font weight="400" style="normal">Karla-Regular.ttf</font>
</family>
<alias name="karla" to="karla" weight="400"/>

<family customizationType="new-named-family" name="fraunces">
<font weight="400" style="normal">Fraunces-Regular.ttf</font>
<font weight="600" style="normal">Fraunces-SemiBold.ttf</font>
</family>
<alias name="fraunces" to="fraunces" weight="400"/>
<alias name="fraunces-semi-bold" to="fraunces" weight="600"/>

<family customizationType="new-named-family" name="big-shoulders-text">
<font weight="700" style="normal">BigShouldersText-Bold.ttf</font>
<font weight="800" style="normal">BigShouldersText-ExtraBold.ttf</font>
</family>
<alias name="big-shoulders-text-bold" to="big-shoulders-text" weight="700"/>
<alias name="big-shoulders-text-extra-bold" to="big-shoulders-text" weight="800"/>

<family customizationType="new-named-family" name="barlow">
<font weight="700" style="normal">Barlow-Bold.ttf</font>
<font weight="500" style="normal">Barlow-Medium.ttf</font>
</family>
<alias name="barlow-bold" to="barlow" weight="700"/>
<alias name="barlow-medium" to="barlow" weight="500"/>
</fonts-modification>
7 changes: 7 additions & 0 deletions rro_overlays/FontKaiOverlay/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
runtime_resource_overlay {
name: "FontKaiOverlay",
theme: "FontKai",
certificate: "platform",
sdk_version: "current",
product_specific: true
}
29 changes: 29 additions & 0 deletions rro_overlays/FontKaiOverlay/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.theme.font.kai"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
android:category="android.theme.customization.font"
android:priority="1"/>

<application android:label="@string/font_overlay" android:hasCode="false">
<meta-data
android:name="android.theme.customization.REQUIRED_SYSTEM_FONTS"
android:value="lustria,source-sans-pro,source-sans-pro-medium" />
</application>
</manifest>
24 changes: 24 additions & 0 deletions rro_overlays/FontKaiOverlay/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Name of a font family to use for body text. -->
<string name="config_bodyFontFamily" translatable="false">source-sans-pro</string>
<!-- Name of a font family to use for medium body text. -->
<string name="config_bodyFontFamilyMedium" translatable="false">source-sans-pro-semi-bold</string>
<!-- Name of a font family to use for headlines. If empty, falls back to platform default -->
<string name="config_headlineFontFamilyMedium" translatable="false">lustria</string>
<string name="config_headlineFontFamily" translatable="false">@string/config_headlineFontFamilyMedium</string>
</resources>
19 changes: 19 additions & 0 deletions rro_overlays/FontKaiOverlay/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Headline / Body font Noto Serif / Source Sans Pro overlay -->
<string name="font_overlay" translatable="false">Lustria</string>
</resources>
7 changes: 7 additions & 0 deletions rro_overlays/FontSamOverlay/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
runtime_resource_overlay {
name: "FontSamOverlay",
theme: "FontSam",
certificate: "platform",
sdk_version: "current",
product_specific: true
}
29 changes: 29 additions & 0 deletions rro_overlays/FontSamOverlay/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.theme.font.sam"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
android:category="android.theme.customization.font"
android:priority="1"/>

<application android:label="@string/font_overlay" android:hasCode="false">
<meta-data
android:name="android.theme.customization.REQUIRED_SYSTEM_FONTS"
android:value="fraunces,fraunces-semi-bold,karla,karla-bold" />
</application>
</manifest>
21 changes: 21 additions & 0 deletions rro_overlays/FontSamOverlay/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="config_bodyFontFamily" translatable="false">karla</string>
<string name="config_bodyFontFamilyMedium" translatable="false">karla-bold</string>
<string name="config_headlineFontFamily" translatable="false">fraunces</string>
<string name="config_headlineFontFamilyMedium" translatable="false">fraunces-semi-bold</string>
</resources>
19 changes: 19 additions & 0 deletions rro_overlays/FontSamOverlay/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Headline / Body font Noto Serif / Source Sans Pro overlay -->
<string name="font_overlay" translatable="false">Sam</string>
</resources>
7 changes: 7 additions & 0 deletions rro_overlays/FontVictorOverlay/Android.bp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
runtime_resource_overlay {
name: "FontVictorOverlay",
theme: "FontVictor",
certificate: "platform",
sdk_version: "current",
product_specific: true
}
29 changes: 29 additions & 0 deletions rro_overlays/FontVictorOverlay/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.theme.font.victor"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
android:category="android.theme.customization.font"
android:priority="1"/>

<application android:label="@string/font_overlay" android:hasCode="false">
<meta-data
android:name="android.theme.customization.REQUIRED_SYSTEM_FONTS"
android:value="barlow,barlow-medium,big-shoulders-text-bold,big-shoulders-text-extra-bold" />
</application>
</manifest>
21 changes: 21 additions & 0 deletions rro_overlays/FontVictorOverlay/res/values/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="config_bodyFontFamily" translatable="false">big-shoulders-text-bold</string>
<string name="config_bodyFontFamilyMedium" translatable="false">big-shoulders-text-extra-bold</string>
<string name="config_headlineFontFamily" translatable="false">barlow</string>
<string name="config_headlineFontFamilyMedium" translatable="false">barlow-medium</string>
</resources>
19 changes: 19 additions & 0 deletions rro_overlays/FontVictorOverlay/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
~ Copyright (C) 2020 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Headline / Body font Noto Serif / Source Sans Pro overlay -->
<string name="font_overlay" translatable="false">Victor</string>
</resources>

0 comments on commit 6696985

Please sign in to comment.