PDA

View Full Version : Jagged text


jpan
07-07-2004, 06:56 AM
Hi,

I have this piece of code:


<canvas>
<view x="0" y="5" width="100" height="60" bgcolor="0x808080">
<text fontsize="24" fontstyle="bold" fgcolor="0xffffff" x="0" y="0">127</text>
<text fontsize="12" fontstyle="bold" fgcolor="0xffffff" x="65" y="10">km</text>
<text fontsize="12" fontstyle="bold" fgcolor="0xffffff" x="65" y="25">h</text>
<text fontsize="20" fontstyle="bold" fgcolor="0xffffff" x="10" y="30">NE</text>
</view>
</canvas>


Now, why does the text look jagged? How can I correct this??

Thanks,

James

antun
07-07-2004, 09:29 AM
The default font for a Laszlo Application is Verity11, which is designed to be used at its default size. It's optimized for viewing at 11px.

If you want flexible font sizes, you need to declare a font of your choice. TrueType fonts can be used at any size; it's just the Verity and LzTahoe series that are designed for a specific size. See here for how to do that:

http://www.laszlosystems.com/lps-2.1.2/docs/lzx-reference/font.html

You can see the different fonts that the LPS ships in your installation:

WEB-INF\lps\fonts\verity

Take care,

Antun

jpan
07-07-2004, 12:38 PM
thanks a lot! Got it working great now!