01-15-2010 11:43 PM
How to specify that a particular RichTextField should use a specific font (such as BBAlpha Serif) instead of the Default Font? Thanx.
Solved! Go to Solution.
01-16-2010 07:00 PM
Hi,
you create aRichTextField object
RichTextField rtf = new RichTextField();
The you create a font object like
Font font = Font.getDefault();
try{
FontFamily ff = FontFamily.forName("BBAlpha Serif");
font = ff.getFont(Font.BOLD, 18);
}catch(Exception e){}
Then all you need to do is set the font for the rtf field
rtf.setFont(font);
Hope this helps....
01-16-2010 11:55 PM
Thank you Paul (a) It worked perfectly, (b) The code was straightforward, (c) The code was self-documenting.