Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3412b42a authored by Deepanshu Gupta's avatar Deepanshu Gupta Committed by Android (Google) Code Review
Browse files

Merge "Skip extra fonts if not an extended font build." into lmp-dev

parents e29069dc f0adf87d
Loading
Loading
Loading
Loading
+20 −15
Original line number Original line Diff line number Diff line
@@ -41,21 +41,26 @@ $(sdk_fonts_device): $(SDK_FONT_TEMP)/%.ttf: $(TARGET_OUT)/fonts/%.ttf \
	$(hide) mkdir -p $(dir $@)
	$(hide) mkdir -p $(dir $@)
	$(hide) $(call sdk_rename_font,$<,$@)
	$(hide) $(call sdk_rename_font,$<,$@)


# Extra fonts that are not part of the device build. These are used as a
# List of all dependencies - all fonts and configuration files.
# replacement for the OpenType fonts.
SDK_FONT_DEPS := $(sdk_fonts_device) $(sdk_font_config)
sdk_fonts_extra := NanumGothic.ttf DroidSansFallback.ttf
sdk_fonts_extra := $(addprefix $(SDK_FONT_TEMP)/, $(sdk_fonts_extra))


$(SDK_FONT_TEMP)/NanumGothic.ttf: external/naver-fonts/NanumGothic.ttf \
# Define a macro to create rule for addititional fonts that we want to include
			$(sdk_font_rename_script)
# in the SDK.
	$(hide) mkdir -p $(dir $@)
# $1 Output font name
	$(hide) $(call sdk_rename_font,$<,$@)
# $2 Source font path
define sdk-extra-font-rule
fontfullname := $$(SDK_FONT_TEMP)/$1
ifeq ($$(filter $(fontfullname),$$(sdk_fonts_device)),)
SDK_FONT_DEPS += $$(fontfullname)
$$(fontfullname): $2 $(sdk_font_rename_script)
	$$(hide) mkdir -p $$(dir $$@)
	$$(hide) $$(call sdk_rename_font,$$<,$$@)
endif
fontfullname :=
endef


$(SDK_FONT_TEMP)/DroidSansFallback.ttf: frameworks/base/data/fonts/DroidSansFallbackFull.ttf \
# These extra fonts are used as a replacement for OpenType fonts.
			$(sdk_font_rename_script)
$(eval $(call sdk-extra-font-rule,NanumGothic.ttf,external/naver-fonts/NanumGothic.ttf))
	$(hide) mkdir -p $(dir $@)
$(eval $(call sdk-extra-font-rule,DroidSansFallback.ttf,frameworks/base/data/fonts/DroidSansFallbackFull.ttf))
	$(hide) $(call sdk_rename_font,$<,$@)

# List of all dependencies - all fonts and configuration files.
SDK_FONT_DEPS := $(sdk_fonts_device) $(sdk_fonts_extra) $(sdk_font_config)


sdk-extra-font-rule :=