overlay: Add Google Sans / Lato font

Change-Id: Iaffe92b708af5e364ee446c7477e56f70bc67395
This commit is contained in:
Adithya R 2022-05-19 15:31:10 +05:30 committed by Omkar Chandorkar
parent 78ab31bd87
commit 289566c93f
No known key found for this signature in database
GPG Key ID: 95A33FD984777F70
7 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1,20 @@
// Copyright (C) 2020 Paranoid Android
//
// 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.
runtime_resource_overlay {
name: "FontGoogleSansLatoOverlay",
product_specific: true,
sdk_version: "current",
theme: "FontGoogleSansLato",
}

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 Paranoid Android
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="co.aospa.theme.font.googlesanslato">
<overlay
android:category="android.theme.customization.font"
android:priority="600"
android:targetPackage="android" />
<application
android:label="@string/font_google_sans_lato_overlay">
<meta-data
android:name="android.theme.customization.REQUIRED_SYSTEM_FONTS"
android:value="google-sans,google-sans-medium,lato,lato-medium" />
</application>
</manifest>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2019-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>
<!-- Name of a font family to use for body text. -->
<string name="config_bodyFontFamily" translatable="false">lato</string>
<!-- Name of a font family to use for medium body text. -->
<string name="config_bodyFontFamilyMedium" translatable="false">lato-medium</string>
<!-- Name of a font family to use for headlines. If empty, falls back to platform default -->
<string name="config_headlineFontFamily" translatable="false">google-sans</string>
<!-- Name of the font family used for system surfaces where the font should use medium weight -->
<string name="config_headlineFontFamilyMedium" translatable="false">google-sans-medium</string>
</resources>

View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2019-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>
<!-- Google Sans / Lato font overlay -->
<string name="font_google_sans_lato_overlay" translatable="false">Google Sans / Lato</string>
</resources>

View File

@ -19,6 +19,7 @@ PRODUCT_PACKAGES += \
AOSPASettingsOverlay \
AOSPASettingsProviderOverlay \
AOSPASystemUIOverlay \
FontGoogleSansLatoOverlay \
FontInterOverlay \
FontManropeOverlay \
FontRobotoOverlay \

View File

@ -141,6 +141,17 @@
</font>
</family>
<family customizationType="new-named-family" name="lato">
<font weight="400" style="normal">Lato-Regular.ttf</font>
<font weight="400" style="italic">Lato-Italic.ttf</font>
<font weight="500" style="normal">Lato-Medium.ttf</font>
<font weight="500" style="italic">Lato-MediumItalic.ttf</font>
<font weight="700" style="normal">Lato-Bold.ttf</font>
<font weight="700" style="italic">Lato-BoldItalic.ttf</font>
</family>
<alias name="lato-medium" to="lato" weight="500" />
<alias name="lato-bold" to="lato" weight="700" />
<family customizationType="new-named-family" name="manrope">
<font weight="500" style="normal">Manrope-VF.ttf
<axis tag="wght" stylevalue="500"/>

View File

@ -29,6 +29,8 @@ PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,vendor/aospa/prebuilts/fonts/,$(TARGET_COPY_OUT_PRODUCT)/fonts) \
vendor/aospa/target/config/fonts_customization.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/fonts_customization.xml
$(call inherit-product, external/google-fonts/lato/fonts.mk)
# HIDL
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE += \
vendor/aospa/target/config/aospa_vendor_framework_compatibility_matrix.xml