Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

TTF fonts


TTF fonts

Postby guynemer » Jan 19, 2007 @ 11:03am

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.
guynemer
pm Member
 
Posts: 56
Joined: Jan 18, 2007 @ 2:00pm


Postby edge » Jan 19, 2007 @ 11:08am

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
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby guynemer » Jan 28, 2007 @ 8:56pm

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
(38.55 KiB) Downloaded 19 times
guynemer
pm Member
 
Posts: 56
Joined: Jan 18, 2007 @ 2:00pm


Postby guynemer » Jan 28, 2007 @ 9:24pm

Oh BTW, the result I have is often a magenta square on the screen :?
guynemer
pm Member
 
Posts: 56
Joined: Jan 18, 2007 @ 2:00pm


Postby Dan East » Jan 28, 2007 @ 11:11pm

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
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby guynemer » Jan 29, 2007 @ 2:41am

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.
guynemer
pm Member
 
Posts: 56
Joined: Jan 18, 2007 @ 2:00pm


Postby Dan East » Jan 29, 2007 @ 4:59am

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
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby edge » Jan 29, 2007 @ 9:49am

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?
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


I have a similar problem

Postby gilad_no » Feb 17, 2007 @ 12:44am

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
(1.26 KiB) Downloaded 22 times
gilad_no
pm Member
 
Posts: 22
Joined: Feb 13, 2007 @ 5:50pm
Location: Montreal


Postby edge » Feb 19, 2007 @ 9:45am

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Thanks

Postby gilad_no » Feb 19, 2007 @ 5:41pm

'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.
gilad_no
pm Member
 
Posts: 22
Joined: Feb 13, 2007 @ 5:50pm
Location: Montreal


Postby edge » Feb 20, 2007 @ 9:35am

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
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Everything is fine now

Postby gilad_no » Feb 21, 2007 @ 1:00am

probably used the variable font without building the table first. Everything is working, thanks :D
gilad_no
pm Member
 
Posts: 22
Joined: Feb 13, 2007 @ 5:50pm
Location: Montreal


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron