Skip to main content

How to make a larger font in J2ME?

5 replies [Last post]
jtl
Offline
Joined: 2007-08-20
Points: 0

the MIDP2 have a "SIZE_LARGE" font. but can I make a larger font than that? how can I do that?
Thank you very much.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
terrencebarr
Offline
Joined: 2004-03-04
Points: 0

I was under the impression TrueType is a scalable font format ... my font experience is limited.

-- Terrence

terrencebarr
Offline
Joined: 2004-03-04
Points: 0

jtl,

Font support on MIDP has always been a bit underwhelming, to say the least ;-)

Basically, fonts vary between devices and support for difference font sizes and typefaces might be minimal. Sophisticated apps need to include their own or third-part font support.

However, as Shawn mentions, LWUIT http://lwuit.dev.java.net/ may be an option for you - it contains support for scalable and custom fonts.

-- Terrence

Andrew Girow

Hi Terrence,

Small correction:
LWUIT http://lwuit.dev.java.net/ supports custom
(bitmap) fonts. It does not support scalable fonts.

Andrew

--- meinterest@mobileandembedded.org wrote:

> jtl,
>
> Font support on MIDP has always been a bit
> underwhelming, to say the least ;-)
>
> Basically, fonts vary between devices and support
> for difference font sizes and typefaces might be
> minimal. Sophisticated apps need to include their
> own or third-part font support.
>
> However, as Shawn mentions, LWUIT
> http://lwuit.dev.java.net/ may be an option for you
> - it contains support for scalable and custom fonts.
>
> -- Terrence
> [Message sent by forum member 'terrencebarr'
> (terrencebarr)]
>
>
http://forums.java.net/jive/thread.jspa?messageID=279076
>
>
===========================================================================
> To unsubscribe, send email to listserv@java.sun.com
> and include in the body
> of the message "signoff KVM-INTEREST". For general
> help, send email to
> listserv@java.sun.com and include in the body of the
> message "help".
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

dohyung
Offline
Joined: 2008-06-09
Points: 0

Dear Andrew,

LWUIT runtime supports custom fonts of bitmap formats only. But the accompanying tool for the creation of the bitmap fonts supports the rasterization of TrueType fonts (even with antialiasing on). I guess Terrence mentioned the tool support.

BR,
DH

sfitzjava
Offline
Joined: 2003-06-15
Points: 0

You may be able to by using the LWUIT package. I've not worked with the Font system, but I understand you are able to load your own bitmap fonts, and I think there are some built in one that you can adjust the font point size.

In addition a similar functionality exists on the BlackBerry, I know you can set your fonts using the RIM APIs in your MIDlet to give you better font control. However then your code is not portable.

Regards,
-Shawn