PDA

View Full Version : 3.0b2 Fonts


ftroop
03-28-2005, 10:14 PM
My fonts broke! The fonts in 2.2.1 looked so nice. I want 'em back. I understand that the 2 beta uses system defaults for fonts now (though I don't understand why?). I tried to override this using the following:

<canvas width="1000" height="532" bgcolor="gray">
<font name="default" src="verity/verityplus11.ttf"/>
</canvas>

But regardless of the font I specify, I still get the same crappy looking font. The release notes claim:

"The compiler uses the correct font when "default" font is redefined and canvas font is *not* redefined.

<canvas>
<font src="helmetr.ttf" name="default" />

<text>helmet</text>
</canvas>

Works as expected."

What exactly does this mean? Perhaps I did something incorrectly? I am not specifying a font anywhere except immediately following the canvas tag.

Is there a way I can get the nice 2.2.1 fonts back using the 3.0b2 framework?

TIA.

hqm
03-31-2005, 06:17 AM
I modified your example to say


<canvas width="1000" height="532" bgcolor="gray" font="default" fontsize="8">
<font name="default" src="verity/verityplus11.ttf"/>

<text >default Foobar the quick brown frotz jumped over the bad music</text>
<text font="default" fontsize='8'>Verity Foobar the quick brown frotz jumped over the bad music</text>
<simplelayout />
<text font="Verdana">Verdana Foobar the quick brown frotz jumped over the bad music</text>
</canvas>


And it seem to work. So for some reason you need to say font="default" on the canvas itself. I will check as to whether this is a bug (regression).

ftroop
04-02-2005, 08:10 PM
Thanks a bunch, hqm. That did the trick. You are the Laszlo man!

ftroop
04-04-2005, 06:51 AM
I noticed one other small thing difference in how 3.0b2 uses certain tags compared to 2.2-1.

For example, I had some code that looked something like the following:

<form>
<view>
<text><b>First Name: </b></text>
</view>
</form>

This would effectively create a bold label on my form in 2.2-1. However, 3.0b2 will not render the 'First Name: ' text at all. I had to use fontstyle="bold" inside the text tag.

This is probably the correct way to do it afterall - Just pointing out an observation.

hqm
04-04-2005, 07:16 AM
Are you saying that the example you gave above shows no text when you use the embedded verity font?

The reason it won't show bold text is that the compiler is not including the bold version of the embedded font automatically. You need to explicitly declare a font element to bake in the bold version of the font (and the same for italic if you want it).

ftroop
04-04-2005, 07:56 AM
Oh yes, that makes total sense.

Thanks.