Browse Source

base: Add Fira Sans font [1/2]

Change-Id: I8c085b5a2d660e1c6831c0c635d3bed7aea6d324
Signed-off-by: NurKeinNeid <mralexman3000@gmail.com>
ten
Josh Chasky 1 year ago
parent
commit
b599013c26

+ 31
- 0
fonts/overlays/FontFiraSansSourceOverlay/Android.mk View File

@@ -0,0 +1,31 @@
#
# Copyright 2019, 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.
#

LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_RRO_THEME := FontFiraSansSourceOverlay
LOCAL_CERTIFICATE := platform
LOCAL_PRODUCT_MODULE := true

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res

LOCAL_PACKAGE_NAME := FontFiraSansSourceOverlay
LOCAL_SDK_VERSION := current

include $(BUILD_RRO_PACKAGE)

+ 31
- 0
fonts/overlays/FontFiraSansSourceOverlay/AndroidManifest.xml View File

@@ -0,0 +1,31 @@
<!--
/**
* Copyright (c) 2019, 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.firasans"
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_firasans_source_overlay" android:hasCode="false">
<meta-data
android:name="android.theme.customization.REQUIRED_SYSTEM_FONTS"
android:value="firasans,firasans-medium,firasans-semi-bold,firasans-bold" />
</application>
</manifest>

+ 29
- 0
fonts/overlays/FontFiraSansSourceOverlay/res/values/config.xml View File

@@ -0,0 +1,29 @@
<!--
/**
* Copyright (c) 2019, 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">firasans</string>
<!-- Name of a font family to use for medium body text. -->
<string name="config_bodyFontFamilyMedium" translatable="false">firasans-semi-bold</string>
<!-- Name of a font family to use for headlines. If empty, falls back to platform default -->
<string name="config_headlineFontFamily" translatable="false">firasans-medium</string>
<!-- Name of the font family used for system surfaces where the font should use medium weight -->
<string name="config_headlineFontFamilyMedium" translatable="false">firasans-bold</string>
<!-- Allows setting custom fontFeatureSettings on specific text. -->
<string name="config_headlineFontFeatureSettings">ss03</string>
</resources>

+ 21
- 0
fonts/overlays/FontFiraSansSourceOverlay/res/values/strings.xml View File

@@ -0,0 +1,21 @@
<!--
/**
* Copyright (c) 2019, 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 Comic Sans overlay -->
<string name="font_firasans_source_overlay" translatable="false">Fira Sans</string>
</resources>

+ 1
- 0
packages/overlays/Android.mk View File

@@ -38,6 +38,7 @@ LOCAL_REQUIRED_MODULES := \
FontBariolSourceOverlay \
FontCagliostroSourceOverlay \
FontCoolstorySourceOverlay \
FontFiraSansSourceOverlay \
FontLGSmartGothicSourceOverlay \
FontNotoSerifSourceOverlay \
FontRosemarySourceOverlay \

Loading…
Cancel
Save