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();
精彩评论