[RESOLVED] fenggui change text size

Hi all,

I'm using fenggui for my GUI. I would like to change/switch the font size of my labels (if I consider it as a title or not).

I'm using the XMLThemes and I did create different textRenderer.

I don't know how to use one or the other.

If you have any idea, please let me know.



I think you've seen this at some point in the past (or I may have found it and tried to do it) but the FengGUI example uses ImageFont even for system fonts:


(I work with Caroline on the Betaville project :))

Here is the solution :

lbl_address.getAppearance().addRenderer("default", theme.getTr_font14());

theme.getTr_font14() return a TextRenderer as define below:

TextRenderer tr_font14 = new DirectTextRenderer();

Font font14 = FontFactory.renderStandardFont(new java.awt.Font("Verdana", java.awt.Font.PLAIN, 14), true, Alphabet.ENGLISH);


Have fun!