using the g.drawText function (two calls one for each text) is it possible to write text in two different sizes?
g.drawText("abc",0,0);
//whatever code to change font goes here
g.drawText("def",30,30);
using the g.drawText function (two calls one for each text) is it possible to write text in two different sizes?
g.drawText("abc",0,0);
//whatever code to change font goes here
g.drawText("def",30,30);
Try:
g.setFont(font);
to get the font you want there is a static method in the Font class:
Font.getFont(int face, int style, int size);
EDIT:
you are right, I jumped to the wrong Font class in the API. Try this:
FontFamily ff = FontFamily.forName("family-name"); // e.g. serif
Font f = ff.getFont(style, height); // Use style bits from Font class, e.g. Font.BOLD
If you want to know which FontFamilies are available you can use:
FontFamily.getFontFamilies();