diff --git a/google-fonts.xml b/google-fonts.xml new file mode 100644 index 0000000..411f1d1 --- /dev/null +++ b/google-fonts.xml @@ -0,0 +1,11 @@ + + GoogleSans-Regular.ttf + GoogleSans-Italic.ttf + GoogleSans-Medium.ttf + GoogleSans-MediumItalic.ttf + GoogleSans-Bold.ttf + GoogleSans-BoldItalic.ttf + + + + diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index 4f1a23e..05afc03 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -2,4 +2,8 @@ true M50 0C77.6 0 100 22.4 100 50C100 77.6 77.6 100 50 100C22.4 100 0 77.6 0 50C0 22.4 22.4 0 50 0Z + + google-sans + google-sans + ss03 diff --git a/overlay/frameworks/base/core/res/res/values/dimens.xml b/overlay/frameworks/base/core/res/res/values/dimens.xml new file mode 100644 index 0000000..6b5456c --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/dimens.xml @@ -0,0 +1,6 @@ + + + 8.0dip + 4.0dip + 1000.0dip + diff --git a/overlay/frameworks/base/core/res/res/values/donottranslate_material.xml b/overlay/frameworks/base/core/res/res/values/donottranslate_material.xml new file mode 100644 index 0000000..5211fb2 --- /dev/null +++ b/overlay/frameworks/base/core/res/res/values/donottranslate_material.xml @@ -0,0 +1,17 @@ + + + + google-sans-medium + diff --git a/pixel-theme/Android.mk b/pixel-theme/Android.mk index 12fe37f..a44a311 100644 --- a/pixel-theme/Android.mk +++ b/pixel-theme/Android.mk @@ -24,3 +24,32 @@ LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res # uicommon include $(BUILD_PACKAGE) + +GOOGLE_FONTS := \ + GoogleSans-Bold.ttf \ + GoogleSans-BoldItalic.ttf \ + GoogleSans-Italic.ttf \ + GoogleSans-Medium.ttf \ + GoogleSans-MediumItalic.ttf \ + GoogleSans-Regular.ttf + +define define-google-font +include $$(CLEAR_VARS) +LOCAL_MODULE := $1 +LOCAL_MODULE_OWNER := google +LOCAL_SRC_FILES := fonts/$1 +LOCAL_MODULE_CLASS := ETC +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_PATH := $(TARGET_OUT)/fonts +include $$(BUILD_PREBUILT) +endef + +$(foreach font,$(GOOGLE_FONTS),\ + $(eval $(call define-google-font,$(font)))) + +include $(CLEAR_VARS) +LOCAL_MODULE := GoogleFonts +LOCAL_MODULE_OWNER := google +LOCAL_MODULE_TAGS := optional +LOCAL_REQUIRED_MODULES := $(GOOGLE_FONTS) +include $(BUILD_PHONY_PACKAGE) diff --git a/pixel-theme/fonts/GoogleSans-Bold.ttf b/pixel-theme/fonts/GoogleSans-Bold.ttf new file mode 100644 index 0000000..ebe59de Binary files /dev/null and b/pixel-theme/fonts/GoogleSans-Bold.ttf differ diff --git a/pixel-theme/fonts/GoogleSans-BoldItalic.ttf b/pixel-theme/fonts/GoogleSans-BoldItalic.ttf new file mode 100644 index 0000000..b4f65cb Binary files /dev/null and b/pixel-theme/fonts/GoogleSans-BoldItalic.ttf differ diff --git a/pixel-theme/fonts/GoogleSans-Italic.ttf b/pixel-theme/fonts/GoogleSans-Italic.ttf new file mode 100644 index 0000000..30603de Binary files /dev/null and b/pixel-theme/fonts/GoogleSans-Italic.ttf differ diff --git a/pixel-theme/fonts/GoogleSans-Medium.ttf b/pixel-theme/fonts/GoogleSans-Medium.ttf new file mode 100644 index 0000000..289f0ff Binary files /dev/null and b/pixel-theme/fonts/GoogleSans-Medium.ttf differ diff --git a/pixel-theme/fonts/GoogleSans-MediumItalic.ttf b/pixel-theme/fonts/GoogleSans-MediumItalic.ttf new file mode 100644 index 0000000..5c92e81 Binary files /dev/null and b/pixel-theme/fonts/GoogleSans-MediumItalic.ttf differ diff --git a/pixel-theme/fonts/GoogleSans-Regular.ttf b/pixel-theme/fonts/GoogleSans-Regular.ttf new file mode 100644 index 0000000..41fbb8b Binary files /dev/null and b/pixel-theme/fonts/GoogleSans-Regular.ttf differ diff --git a/product.mk b/product.mk index 887d0b3..57cd9ce 100644 --- a/product.mk +++ b/product.mk @@ -31,8 +31,11 @@ DEVICE_PACKAGE_OVERLAYS += vendor/extra/overlay PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.boot.vendor.overlay.theme=com.google.android.theme.pixel PRODUCT_SYSTEM_DEFAULT_PROPERTIES += ro.com.google.ime.theme_id=5 PRODUCT_PACKAGES += \ + GoogleFonts \ PixelTheme +ADDITIONAL_FONTS_FILE += vendor/extra/google-fonts.xml + PRODUCT_SYSTEM_DEFAULT_PROPERTIES += \ ro.config.vc_call_vol_steps=7 \ ro.config.media_vol_steps=18