Merge "Remove font symlinks hack"

This commit is contained in:
Yo Chiang
2020-06-02 10:38:16 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 24 deletions

View File

@@ -16,8 +16,10 @@ prebuilt_font {
name: "DroidSansMono.ttf",
src: "DroidSansMono.ttf",
required: [
"DroidSans.ttf",
"DroidSans-Bold.ttf",
// Roboto-Regular.ttf provides DroidSans.ttf as a symlink to itself
"Roboto-Regular.ttf",
// Roboto-Bold.ttf provides DroidSans-Bold.ttf as a symlink to itself
"Roboto-Bold.ttf",
],
}

View File

@@ -14,28 +14,6 @@
LOCAL_PATH := $(call my-dir)
##########################################
# create symlink for given font
# $(1): new font $(2): link target
# should be used with eval: $(eval $(call ...))
define create-font-symlink
$(PRODUCT_OUT)/system/fonts/$(1) : $(PRODUCT_OUT)/system/fonts/$(2)
@echo "Symlink: $$@ -> $$<"
@mkdir -p $$(dir $$@)
@rm -rf $$@
$(hide) ln -sf $$(notdir $$<) $$@
# this magic makes LOCAL_REQUIRED_MODULES work
ALL_MODULES.$(1).INSTALLED := \
$(ALL_MODULES.$(1).INSTALLED) $(PRODUCT_OUT)/system/fonts/$(1)
endef
##########################################
# The following fonts are just symlinks, for backward compatibility.
##########################################
$(eval $(call create-font-symlink,DroidSans.ttf,Roboto-Regular.ttf))
$(eval $(call create-font-symlink,DroidSans-Bold.ttf,Roboto-Bold.ttf))
# Run sanity tests on fonts on checkbuild
checkbuild: fontchain_lint