问题描述
嗨我想开发一个我想使用旁遮普语文本的应用程序.但是我的模拟器没有显示旁遮普语文本.是否有任何 api 或其他东西,以便我的模拟器可以显示旁遮普语文本或建议我在我的应用程序中实现旁遮普语的任何其他方式.
hi i want to develop an application in which i Want to use punjabi text. But my emmulator does not show Punjabi text. Is there any api or something else so that my emulator can show the punjabi text or suggest me any other way to implement punjabi language in my application.
提前致谢.
推荐答案
您可以通过将 .ttf 文件复制到项目的资产"文件夹中来使用自定义 TrueType 字体.
You can use custom TrueType fonts by copying the .ttf file into your projects's 'assets' folder.
然后在你的应用程序中你可以使用这样的字体;
Then in your application you can use the font like this;
final Typeface customF = Typeface.createFromAsset(this.getAssets(), "custom.ttf");
final TextView textV = (TextView) findViewById(...);
textV.setTypeface(customF);
但是,我在尝试使用 TrueType 字体时遇到了很多问题,所以您可能想用您的 (pubjabi) 字体进行一些实际测试.
However i've had so many problems trying to use TrueType fonts so you might want to do some real life testing with your (pubjabi) font.
这篇关于如何在 android 应用程序中使用旁遮普字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!