如何用旁遮普语字体在Android的应用程序?

如何用旁遮普语字体在Android的应用程序?

问题描述:

喜  我想开发中,我想用旁遮普语文字的应用程序。但我的emmulator没有显示旁遮普语文字。是否有任何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.