From c8f060c93854883d5d7a825b11b18c7f4e76e2b0 Mon Sep 17 00:00:00 2001 From: Chet Haase Date: Wed, 6 Jul 2011 11:17:26 -0700 Subject: Read font info from system config files This change adds new files in /system/etc: system_fonts.xml and fallback_fonts.xml. The change also allows a third file to be added by vendors in /vendor/etc/fallback_fonts.xml. These files, loaded at boot time, mimic the logic that used to be in code, but which is now configurable through editing these files, making the system more flexible and easy to work with for us and vendors as future fonts are added to the system. Change-Id: I209f1ef08a5279b376b89a880241906387efd576 --- data/fonts/fallback_fonts.xml | 47 ++++++++++++++++++++++++++++++ data/fonts/fonts.mk | 4 ++- data/fonts/system_fonts.xml | 68 +++++++++++++++++++++++++++++++++++++++++++ data/fonts/vendor_fonts.xml | 51 ++++++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 1 deletion(-) create mode 100644 data/fonts/fallback_fonts.xml create mode 100644 data/fonts/system_fonts.xml create mode 100644 data/fonts/vendor_fonts.xml (limited to 'data') diff --git a/data/fonts/fallback_fonts.xml b/data/fonts/fallback_fonts.xml new file mode 100644 index 0000000..c0d9153 --- /dev/null +++ b/data/fonts/fallback_fonts.xml @@ -0,0 +1,47 @@ + + + + + + DroidSansArabic.ttf + + + + + DroidSansHebrew-Regular.ttf + DroidSansHebrew-Bold.ttf + + + + + DroidSansThai.ttf + + + + + DroidSansFallback.ttf + + + diff --git a/data/fonts/fonts.mk b/data/fonts/fonts.mk index d222c0b..57a1bab 100644 --- a/data/fonts/fonts.mk +++ b/data/fonts/fonts.mk @@ -30,4 +30,6 @@ PRODUCT_COPY_FILES := \ frameworks/base/data/fonts/DroidSansFallback.ttf:system/fonts/DroidSansFallback.ttf \ frameworks/base/data/fonts/AndroidClock.ttf:system/fonts/AndroidClock.ttf \ frameworks/base/data/fonts/AndroidClock_Highlight.ttf:system/fonts/AndroidClock_Highlight.ttf \ - frameworks/base/data/fonts/AndroidClock_Solid.ttf:system/fonts/AndroidClock_Solid.ttf + frameworks/base/data/fonts/AndroidClock_Solid.ttf:system/fonts/AndroidClock_Solid.ttf \ + frameworks/base/data/fonts/system_fonts.xml:system/etc/system_fonts.xml \ + frameworks/base/data/fonts/fallback_fonts.xml:system/etc/fallback_fonts.xml diff --git a/data/fonts/system_fonts.xml b/data/fonts/system_fonts.xml new file mode 100644 index 0000000..8d8d020 --- /dev/null +++ b/data/fonts/system_fonts.xml @@ -0,0 +1,68 @@ + + + + + + + sans-serif + arial + helvetica + tahoma + verdana + + + DroidSans.ttf + DroidSans-Bold.ttf + + + + + + serif + times + times new roman + palatino + georgia + baskerville + goudy + fantasy + cursive + ITC Stone Serif + + + DroidSerif-Regular.ttf + DroidSerif-Bold.ttf + DroidSerif-Italic.ttf + DroidSerif-BoldItalic.ttf + + + + + + monospace + courier + courier new + monaco + + + DroidSansMono.ttf + + + + diff --git a/data/fonts/vendor_fonts.xml b/data/fonts/vendor_fonts.xml new file mode 100644 index 0000000..fe51fd2 --- /dev/null +++ b/data/fonts/vendor_fonts.xml @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file -- cgit v1.1