About Store Forum Documentation Contact



Post Reply 
Font Make.cpp
Author Message
LINOGE Offline
Member

Post: #1
Font Make.cpp
The tutorial file Font Make.cpp dont work for me. Its dont save the font (as .font file), dont load the font (the times new roman font at local data folder) and dont display it on screen too. The tutorial run but nothing hapens with fonts or fonts files.

Any clue about this issue?
11-17-2011 11:02 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Font Make.cpp
I've just tested it on DX9 and DX10 and it works fine.
Are you on windows or mac?
11-17-2011 11:38 PM
Find all posts by this user Quote this message in a reply
LINOGE Offline
Member

Post: #3
RE: Font Make.cpp
Thanks for reply. I'm on windows 7. I tested it with others fonts i have on windows/fonts folder and nothing hapen too.

I was taking a look at the font.h header, I'm not sure but maybe something in the characters order on my fonts file can be diferent:

Code:
struct Font
{
   // manage
   Bool create(Image &src, Str characters, Bool smooth, C FontCreateParams &params); // create from 1-row characters 'src' image, 'characters'=characters included in the font (they must be exactly in the same order as the ones used in FontMake function), 'smooth'=if 'src' image was generated with the smooth option enabled, false on fail

Here it says "characters included in the font (they must be exactly in the same order as the ones used in FontMake function".

At font make.cpp the characters are like this "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()[]<>{}`~_-+=;:,.?/|\\'\"" and at my times new roman font like this "abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890.:,;'"(!?)+-*/="

I already did try change the line 29 at fontmake.cpp to match the characters order on my font file, but nothing happens too. Not sure but before the character " i have to include a \ cause the compiler recognize it as the end of string. I'm on the right way?
11-18-2011 02:34 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Font Make.cpp
can you run the tutorial unmodified (as from SDK)
and check the return value of:
FontMake function (which is Bool)

also, does creating fonts in the Editor work? (top left button)
11-20-2011 04:21 PM
Find all posts by this user Quote this message in a reply
LINOGE Offline
Member

Post: #5
RE: Font Make.cpp
Got it working...

Thanks.
11-24-2011 02:35 AM
Find all posts by this user Quote this message in a reply
Post Reply