Talk:How to use freely resizable font in in Java ME
This article demonstrates a Midlet which makes use of the new Nokia UI API 1.2, which allows for the resizing of fonts. Up until recently, Java ME programmers were only provided with three choices for font sizes - small, medium and large. This limitation could be very annoying in some cases, as it resulted in situations where text was either too big or too small. Since Java runtime 1.3, programmers finally have finer control over font size. The article shows how programmers can change the font size using the DirectUtils.getFont method. A call to the method of the Graphics class setFont then ensures that subsequent calls to getString draw text using the desired font size.
This article is useful as it highlights a useful recent addition to Java ME that many programmers may not be aware of. The only previous work-around for the limitations in terms of font-size was to manually create glyphs for each character as images and resize them as required - not a simple task!