开发者

Blackberry (Java) - drawing text in two different fonts

using the g.drawText function (two calls one for each text) is it pos开发者_如何学运维sible to write text in two different sizes?

g.drawText("abc",0,0);

//whatever code to change font goes here

g.drawText("def",30,30);


The BlackBerry has it's own font classes. Try this:

// e.g. serif
FontFamily ff = FontFamily.forName("family-name");

// Use style bits from Font class, e.g. Font.BOLD
Font f = ff.getFont(style, height);

If you want to know which FontFamilies are available you can use:

FontFamily.getFontFamilies();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜