> hi
>
[quoted text clipped - 5 lines]
> drawString method to display text in the exact same relative position on
> each respective phone.
Then we can safely assume that the two handsets are not using the same
font. There's no requirement in the MIDP specification that platforms
use fonts with exactly the same metrics for FACE_MONOSPACE,
FACE_PROPORTIONAL or FACE_SYSTEM. You have to adapt your application so
that it will create its display without depend on any specific font
metrics value.
here's what i'm trying to do ...
> Font font = Font.getFont (Font.FACE_MONOSPACE, Font.STYLE_BOLD,
> Font.SIZE_SMALL) ;
[quoted text clipped - 23 lines]
> in the same relative position to the 'reference' line draw above on all
> phones.
Then you need to set the value for refY programmatically rather than
statically. As you can see, the fonts are different on each handset, so
you'll have to change your code for drawing the line.

Signature
Darryl L. Pierce <mcpierce@gmail.com>
Visit my homepage: http://mcpierce.multiply.com
"By doubting we come to inquiry, through inquiry truth." - Peter Abelard
Dave Ekhaus - 09 May 2005 06:24 GMT
>> hi
>>
[quoted text clipped - 12 lines]
> that it will create its display without depend on any specific font
> metrics value.
i am aware that the two phones are using different fonts.
using the 'baseline position' of the font is an attempt to adapt the
app to each phone.
> here's what i'm trying to do ...
>>
[quoted text clipped - 29 lines]
> statically. As you can see, the fonts are different on each handset, so
> you'll have to change your code for drawing the line.
i am changing the 'y offset' used and making it sensitive to the font
used on each respective phone by using the 'baseline position' of each
font. 'refY' is a reference and should not have to change to
accomodate the differences of one font to another.
Darryl Pierce - 10 May 2005 12:41 GMT
>>> i'm trying to write a J2ME app and i'm having some trouble
>>> placing text precisely. the problem is that the font and subsequent
[quoted text clipped - 15 lines]
> using the 'baseline position' of the font is an attempt to adapt the app
> to each phone.
What I'm saying is that you should adjust the location where you want
the baseline, basing it on the phone's font rather than on a static value.
>>> my goal is to have the text drawn by the 'drawString' method above
>>> drawn in the same relative position to the 'reference' line draw
[quoted text clipped - 8 lines]
> font. 'refY' is a reference and should not have to change to
> accomodate the differences of one font to another.
What if the font is taller than 15 pixels?

Signature
Darryl L. Pierce <mcpierce@gmail.com>
Visit my homepage: http://mcpierce.multiply.com
"By doubting we come to inquiry, through inquiry truth." - Peter Abelard