Add Google Sans fonts

cm-14.1
Rashed Abdel-Tawab 6 years ago
parent 9c3f8b0f7b
commit c8762607d6
No known key found for this signature in database
GPG Key ID: 87867AAE006CB094
  1. 11
      google-fonts.xml
  2. 4
      overlay/frameworks/base/core/res/res/values/config.xml
  3. 6
      overlay/frameworks/base/core/res/res/values/dimens.xml
  4. 17
      overlay/frameworks/base/core/res/res/values/donottranslate_material.xml
  5. 29
      pixel-theme/Android.mk
  6. BIN
      pixel-theme/fonts/GoogleSans-Bold.ttf
  7. BIN
      pixel-theme/fonts/GoogleSans-BoldItalic.ttf
  8. BIN
      pixel-theme/fonts/GoogleSans-Italic.ttf
  9. BIN
      pixel-theme/fonts/GoogleSans-Medium.ttf
  10. BIN
      pixel-theme/fonts/GoogleSans-MediumItalic.ttf
  11. BIN
      pixel-theme/fonts/GoogleSans-Regular.ttf
  12. 3
      product.mk

@ -0,0 +1,11 @@
<family name="google-sans">
<font weight="400" style="normal">GoogleSans-Regular.ttf</font>
<font weight="400" style="italic">GoogleSans-Italic.ttf</font>
<font weight="500" style="normal">GoogleSans-Medium.ttf</font>
<font weight="500" style="italic">GoogleSans-MediumItalic.ttf</font>
<font weight="700" style="normal">GoogleSans-Bold.ttf</font>
<font weight="700" style="italic">GoogleSans-BoldItalic.ttf</font>
</family>
<alias name="google-sans-medium" to="google-sans" weight="500" />

@ -2,4 +2,8 @@
<resources>
<bool name="config_useRoundIcon">true</bool>
<string name="config_icon_mask">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</string>
<string name="config_headlineFontFamily">google-sans</string>
<string name="config_headlineFontFamilyLight">google-sans</string>
<string name="config_headlineFontFeatureSettings">ss03</string>
</resources>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="config_dialogCornerRadius">8.0dip</dimen>
<dimen name="config_buttonCornerRadius">4.0dip</dimen>
<dimen name="config_progressBarCornerRadius">1000.0dip</dimen>
</resources>

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
<string name="font_family_display_4_material">sans-serif-light</string>
<string name="font_family_display_3_material">sans-serif</string>
<string name="font_family_display_2_material">sans-serif</string>
<string name="font_family_display_1_material">sans-serif</string>
<string name="font_family_headline_material">sans-serif</string>
<string name="font_family_title_material">sans-serif-medium</string>
<string name="font_family_subhead_material">sans-serif</string>
<string name="font_family_menu_material">sans-serif</string>
<string name="font_family_body_2_material">sans-serif-medium</string>
<string name="font_family_body_1_material">sans-serif</string>
<string name="font_family_caption_material">sans-serif</string>
-->
<string name="font_family_button_material">google-sans-medium</string>
</resources>

@ -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)

@ -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

Loading…
Cancel
Save