From 76ee903d84d5b477016fb6ed6bdee1a21e237903 Mon Sep 17 00:00:00 2001 From: Vojtech Bocek Date: Sun, 7 Sep 2014 15:01:56 +0200 Subject: Add support for TrueType fonts * Keeps original font system in place * Uses the same API as original font system: - You can render only one line at a time - You can only use one font and color for one gr_text* call * Caches all rendered text, with a string cache limited to 400 entries, then it trucates to 250, which results in memory usage hovering around 5-10MB Change-Id: I36107b9dcd8d57bae4486fce8b8f64e49ef3d906 Signed-off-by: Vojtech Bocek --- gui/Android.mk | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gui/Android.mk') diff --git a/gui/Android.mk b/gui/Android.mk index 52d5f5573..baae3edf8 100644 --- a/gui/Android.mk +++ b/gui/Android.mk @@ -59,6 +59,9 @@ endif ifeq ($(TW_OEM_BUILD), true) LOCAL_CFLAGS += -DTW_OEM_BUILD endif +ifeq ($(TW_DISABLE_TTF), true) + LOCAL_CFLAGS += -DTW_DISABLE_TTF +endif ifeq ($(DEVICE_RESOLUTION),) $(warning ********************************************************************************) @@ -104,6 +107,13 @@ ifeq ($(TW_CUSTOM_THEME),) else TWRP_THEME_LOC := $(TW_CUSTOM_THEME) endif + +ifeq ($(TW_DISABLE_TTF), true) + TWRP_REMOVE_FONT := rm -f $(TARGET_RECOVERY_ROOT_OUT)/res/fonts/*.ttf +else + TWRP_REMOVE_FONT := rm -f $(TARGET_RECOVERY_ROOT_OUT)/res/fonts/*.dat +endif + TWRP_RES_GEN := $(intermediates)/twrp ifneq ($(TW_USE_TOOLBOX), true) TWRP_SH_TARGET := /sbin/busybox @@ -116,6 +126,7 @@ $(TWRP_RES_GEN): cp -fr $(TWRP_RES_LOC)/* $(TARGET_RECOVERY_ROOT_OUT)/res/ cp -fr $(TWRP_THEME_LOC)/* $(TARGET_RECOVERY_ROOT_OUT)/res/ $(TWRP_COMMON_XML) + $(TWRP_REMOVE_FONT) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/sbin/ ln -sf $(TWRP_SH_TARGET) $(TARGET_RECOVERY_ROOT_OUT)/sbin/sh ln -sf /sbin/pigz $(TARGET_RECOVERY_ROOT_OUT)/sbin/gzip -- cgit v1.2.3