[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.



Thanks.

Caroline.

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:



http://fenggui.svn.sourceforge.net/viewvc/fenggui/test/org/fenggui/example/FontExample.java?view=markup



(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);

tr_font14.setFont(font14);



Have fun!