Android: add custom fonts to system -


i know how use custom font in app, want adding custom fonts system-wide, adding new font on windows. if there's no official way, module of android source code should read? have change android source code , build support custom fonts.

here steps add custom font android build-in system:
+ copy custom font .ttf frameworks/base/data/fonts
+ modify framworks/base/data/fonts/android.mk
add custom font list of 'font_src_files'

font_src_files := \ roboto-regular.ttf \ .... androidclock_solid.ttf \ <custom_font>.ttf \  

+ modify frameworks/base/data/fonts/fonts.mk
add custom font list of product_packages

product_packages := \ droidsansfallback.ttf \ ... androidclock_solid.ttf \ <custom_font>.ttf \ 

+ rebuild
note: check if custom font exists in out/target/product/generic/system/fonts or not. if yes, custom font have included in system. if no, recheck modification.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -