PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

TTF fonts

Hey
I was wondering where it was possible to use those types of fonts with the edgelib ?

So far I've found nothing about that matter.
Hi Guynemer,

It's not possible to use truetype fonts with Edge directly. We recommend using the font tool and photoshop template to convert it to bitmap font.

The font tool tutorial is available here:
http://www.edgelib.com/index.php?node=472
After many tries , I just can't get to use the font I want correctly.

The text is like smashed. I've also tried with the sample code about "smooth fonts" in the tutorial section, but the resutls are really weird ...

Do you think you could try with this font. Maybe you could just make a little sample and test if it works fine for you.

If you don't , maybe the font I use isn't great for this technic.


Oh BTW if i have understood correctly, it's not possible to resize the text once the font file has been created with paint or else... ?
Attachments:
chocolate_muffin.zip (39 KB)
Oh BTW, the result I have is often a magenta square on the screen :?
Have you tried a variety of other fonts, and do they work properly? What does your call to CreateFont look like? Are you specifying the height as a negative value and zero for the width?

Dan East
I've tried with the samples given with the font tools. The result is the same : a magenta square :? .

Beside I've used the font file used with the Blastar sample, and it works with the same code.
Sorry, I thought you were rendering the fonts in your application via GDI. Obviously what I said doesn't apply to the tool that converts TTF to raster.

Dan East
Hi Guynemer,

Could you attach the rasterized font after processing it with the Edge font tool? Which options are you using and how many characters does the font have?
gilad_no · 16 Feb 2007, 23:44 UTC — I have a similar problem
I'm trying to use my own font, but I get the wrong characters. It works when I use the fixed font from the media folder, but I get the same problems when using the mini font.

Attached is my own font.
Attachments:
font_input.zip (2 KB)
Hi Gilad,

The font you've attached works fine, maybe you've attached the fixed font instead of the variable width font?

If you're using a font with variable width characters (with lines above them) you need to build a table. Call surface.BuildTableVwf() after setting the colorkey.
gilad_no · 19 Feb 2007, 16:41 UTC — Thanks
'BuildTableVwf' solved the problem. Do I need to call it for fixed font as well? Because when I've tried to use my font as a fixed font, it didn't work for me.
Hi Gilad,

No, there is no need to build a variable width font table for a fixed font. Maybe you're using a SetFontCharacters() function with incorrect parameters?

More information about the SetFontCharacters() function is located here:
http://www.edgelib.com/index.php?node=894
gilad_no · 21 Feb 2007, 00:00 UTC — Everything is fine now
probably used the variable font without building the table first. Everything is working, thanks :D