Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

J2me font sizes

Status
Not open for further replies.

voodoojon

Technical User
Dec 18, 2003
107
0
0
GB
Does any body know how to find out the size of fonts in J2me ie how high they are in pixels?

for example I have
Code:
Font f1 = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_LARGE);
in my midlet. there are three sizes avaliable.

I want to know how large the text is when I use it with graphics.drawstring, as I want to draw a box around it or have an image behind it.

I would guess that it is device dependent due to the difference in screen sizes between mobile devices, so I would have to query the device in some way

Jon

One day I will find a signature worthy of this space. That day has not yet come.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top