diff --git a/google-fonts/Android.mk b/google-fonts/Android.mk index bc6f362..ae4ca12 100644 --- a/google-fonts/Android.mk +++ b/google-fonts/Android.mk @@ -1,4 +1,4 @@ -LOCAL_PATH:= $(call my-dir) +LOCAL_PATH := $(call my-dir) GOOGLE_FONTS := \ GoogleSans-Bold.ttf \ diff --git a/google-fonts/FontGoogleSansOverlay/Android.mk b/google-fonts/FontGoogleSansOverlay/Android.mk deleted file mode 100644 index 513c151..0000000 --- a/google-fonts/FontGoogleSansOverlay/Android.mk +++ /dev/null @@ -1,31 +0,0 @@ -# -# 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 := FontGoogleSans - -LOCAL_PRODUCT_MODULE := true - -LOCAL_SRC_FILES := $(call all-subdir-java-files) - -LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res - -LOCAL_PACKAGE_NAME := FontGoogleSansOverlay -LOCAL_SDK_VERSION := current - -include $(BUILD_RRO_PACKAGE) diff --git a/google-fonts/fonts_customization.xml b/google-fonts/fonts_customization.xml new file mode 100644 index 0000000..be59c35 --- /dev/null +++ b/google-fonts/fonts_customization.xml @@ -0,0 +1,12 @@ + + + + GoogleSans-Regular.ttf + GoogleSans-Italic.ttf + GoogleSans-Medium.ttf + GoogleSans-MediumItalic.ttf + GoogleSans-Bold.ttf + GoogleSans-BoldItalic.ttf + + + diff --git a/google-fonts/google-fonts.xml b/google-fonts/google-fonts.xml deleted file mode 100644 index 5d93dc1..0000000 --- a/google-fonts/google-fonts.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - GoogleSans-Regular.ttf - - - - - GoogleSans-Regular.ttf - - - - - GoogleSans-Regular.ttf - - - - - GoogleSans-Regular.ttf - - - - - GoogleSans-Italic.ttf - - - - - GoogleSans-Italic.ttf - - - - - GoogleSans-Italic.ttf - - - - - GoogleSans-Italic.ttf - - - - - - - - GoogleSans-Regular.ttf - - - - - - - - GoogleSans-Regular.ttf - - - - - - - - GoogleSans-Regular.ttf - - - - - GoogleSans-Regular.ttf - - - - - GoogleSans-Regular.ttf - - - - - GoogleSans-Regular.ttf - - - - - GoogleSans-Italic.ttf - - - - - GoogleSans-Italic.ttf - - - - - GoogleSans-Italic.ttf - - - - - GoogleSans-Italic.ttf - - - - - - - - GoogleSans-Regular.ttf - - - - - - - - GoogleSans-Regular.ttf - - - - - - - - GoogleSans-Italic.ttf - - - - - - - - GoogleSans-Italic.ttf - - - - - - - - GoogleSans-Italic.ttf - - - - - - - - ArbutusSlab-Regular.ttf - - - - Lato-Regular.ttf - Lato-Italic.ttf - Lato-Bold.ttf - Lato-BoldItalic.ttf - - - - - Rubik-Regular.ttf - Rubik-Italic.ttf - Rubik-Medium.ttf - Rubik-MediumItalic.ttf - Rubik-Bold.ttf - Rubik-BoldItalic.ttf - - - - - ZillaSlab-Medium.ttf - ZillaSlab-MediumItalic.ttf - ZillaSlab-SemiBold.ttf - ZillaSlab-SemiBoldItalic.ttf - - - - --> - Lustria-Regular.ttf - - - - - Karla-Regular.ttf - - - - - Fraunces-Regular.ttf - Fraunces-SemiBold.ttf - - - - - - BigShouldersText-Bold.ttf - BigShouldersText-ExtraBold.ttf - - - - - - Barlow-Bold.ttf - Barlow-Medium.ttf - - - - diff --git a/overlays/FontGoogleSansOverlay/Android.bp b/overlays/FontGoogleSansOverlay/Android.bp new file mode 100644 index 0000000..466a786 --- /dev/null +++ b/overlays/FontGoogleSansOverlay/Android.bp @@ -0,0 +1,25 @@ +// +// Copyright (c) 2020,2022 The LineageOS 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. +// + +package { + default_applicable_licenses: ["Android-Apache-2.0"], +} + +runtime_resource_overlay { + name: "FontGoogleSansOverlay", + theme: "FontGoogleSans", + product_specific: true, +} diff --git a/google-fonts/FontGoogleSansOverlay/AndroidManifest.xml b/overlays/FontGoogleSansOverlay/AndroidManifest.xml similarity index 99% rename from google-fonts/FontGoogleSansOverlay/AndroidManifest.xml rename to overlays/FontGoogleSansOverlay/AndroidManifest.xml index 7cf6f76..8da34b2 100644 --- a/google-fonts/FontGoogleSansOverlay/AndroidManifest.xml +++ b/overlays/FontGoogleSansOverlay/AndroidManifest.xml @@ -19,6 +19,7 @@ package="com.android.theme.font.googlesans" android:versionCode="1" android:versionName="1.0"> + diff --git a/google-fonts/FontGoogleSansOverlay/res/values/config.xml b/overlays/FontGoogleSansOverlay/res/values/config.xml similarity index 100% rename from google-fonts/FontGoogleSansOverlay/res/values/config.xml rename to overlays/FontGoogleSansOverlay/res/values/config.xml diff --git a/google-fonts/FontGoogleSansOverlay/res/values/strings.xml b/overlays/FontGoogleSansOverlay/res/values/strings.xml similarity index 100% rename from google-fonts/FontGoogleSansOverlay/res/values/strings.xml rename to overlays/FontGoogleSansOverlay/res/values/strings.xml diff --git a/product.mk b/product.mk index 5e61ced..74184d7 100644 --- a/product.mk +++ b/product.mk @@ -1,10 +1,10 @@ include vendor/google_pixel/codenames.mk ## Google Fonts -#PRODUCT_COPY_FILES += \ -# vendor/google_pixel/google-fonts/google-fonts.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/fonts_customization.xml +ADDITIONAL_FONTS_FILE := vendor/google_pixel/google-fonts/fonts_customization.xml PRODUCT_PACKAGES += \ + FontGoogleSansOverlay \ GoogleFonts ## Pixel Apps