Problem viewing text in canvas

Good day.

I've tried to use Canvas for wiewing long text in midp application.

I'm using drawString() method of class Graphics.

For calculating the substring viewed horizontally a screen I'm using the method stringWidth() of class Font.

The font is:

Font f = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_MEDIUM);

In some phones the rows are clipped.

I've tried using Font.FACE_MONOSPACE and / or Font.SIZE_SMALL but with the same result.

Debuging code I've seen that the value calculate from stringWidth() method id less than the with of the screen, but really is clipped.

Why?

Best regards and good work.

Stefano Errani

[717 byte] By [erracid8a] at [2007-11-27 7:06:21]
# 1
sure you're not setting clipRect() anywhere? I've never seen what you're describing, and I've done LOTS of canvas/text work. hmm. i'm sure there's a good explanation
pandora_fooa at 2007-7-12 18:57:38 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
See at drawString method.. probably you set anchor point that cause the problem..
PeppeMEa at 2007-7-12 18:57:38 > top of Java-index,Java Mobility Forums,Java ME Technologies...