如何安装在Android设备自定义字体 [英] How to install custom font in android device

查看:105
本文介绍了如何安装在Android设备自定义字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要安装自定义字体这是在Android设备上时,我的应用程序启动.TTF文件。其实我需要安装缅甸的字体在我的Andr​​oid设备,当我运行我的应用程序。可能吗 ?如果是的话怎么办?谢谢。 我不需要的字体..我想安装在系统中。

I want to install custom font which is .ttf file in android device when my application start. Actually i need to install burmese font in my android device when i run my application. is it possible ? if yes then how? Thanks. I don't need typeface.. i want to install in system.

推荐答案

请参阅这里 @CommonsWare的答案,你不能,或者可能通过生根设备添加字体到现有的设备,除了作为自定义固件构建的一部分。

See here @CommonsWare answer, You cannot add fonts to an existing device, except as part of a custom firmware build, or possibly by rooting the device.

但你可以在你的应用的新添加字体。这样的:

but you can add fonts in your appliction. like:

 TextView txtvw=(TextView)findViewById(R.id.textviewname);

 Typeface typface=Typeface.createFromAsset(getAssets(),"fonts/burmese.ttf");

  txtvw.setTypeface(typface);

注意:把你的字体,资产/字体项目目录

Note: put your font in assets/fonts dir in project

如果您的设备是植根然后看到这个TUTS安装的自定义字体在Android设备

OR if your device is rooted then see this tuts for installing Custom Fonts on Your Android Device

这篇关于如何安装在Android设备自定义字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆