0
由于我是黑莓/ Java开发的新手,我不知道如何在我的黑莓应用程序中使用“telugu”字体。请举个例子。如何在黑莓应用程序中使用泰卢固语字体
看到三个模拟器 9300-OS6仅在本装置中不显示 9790-OS7显示器之间的差。 9900-os7甚至OS7它不显示。
由于我是黑莓/ Java开发的新手,我不知道如何在我的黑莓应用程序中使用“telugu”字体。请举个例子。如何在黑莓应用程序中使用泰卢固语字体
看到三个模拟器 9300-OS6仅在本装置中不显示 9790-OS7显示器之间的差。 9900-os7甚至OS7它不显示。
import net.rim.device.api.system.*;
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.ui.component.*;
import java.util.*;
public class FontLoadingDemo extends UiApplication
{
public static void main(String[] args)
{
FontLoadingDemo app = new FontLoadingDemo();
app.enterEventDispatcher();
}
public FontLoadingDemo()
{
pushScreen(new FontLoadingDemoScreen());
}
}
class FontLoadingDemoScreen extends MainScreen
{
public FontLoadingDemoScreen()
{
setTitle("Font Loading Demo");
LabelField helloWorld = new LabelField("Hello World");
if (FontManager.getInstance().load("Myfont.ttf", "MyFont", FontManager.APPLICATION_FONT) == FontManager.SUCCESS)
{
try
{
FontFamily typeface = FontFamily.forName("MyFont");
Font myFont = typeface.getFont(Font.PLAIN, 50);
helloWorld.setFont(myFont);
}
catch (ClassNotFoundException e)
{
System.out.println(e.getMessage());
}
}
add(helloWorld);
}
}
来源:http://docs.blackberry.com/en/developers/deliverables/11958/Load_and_use_a_custom_font_899948_11.jsp
我通过更换Myfont.ttf作为SHREE940.ttf试过这种.......乌拉圭回合样的信息,我已经把这个文件在myproject的“资源”文件夹中,仍然得到盒子 –
你能详细解释一下你目前的状态吗?还是你的意思是这解决了这个问题?如果它解决了,请将其推上并标记为解决方案,如果不给我提供更多详细信息,以便我可以帮助您....您是什么意思的“盒子”? –
是的,我改变了我的SDK和字体.....然后我的模拟器显示TELUGU(gouthami.ttf)font.but它只显示在9790模拟器在其他模拟器相同的以前的问题 –