It is currently Mon Dec 18, 2017 7:55 am

All times are UTC - 5 hours




 Page 1 of 1 [ 10 posts ] 
Author Message
 Post subject: GameDev VMK 20 - Font class
PostPosted: Fri Dec 01, 2006 7:09 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
The Font class allows you to print monospace and proportional spaced text onto the screen.

NOTE: VMK 20C is part 2 of 2. Part 1 of 2 is VMK 20B. If you are having troubles viewing VMK 20C, the best thing to do is to extract the VMK20C RAR into the same directory where VMK20B is on your hard drive. Now the complete video will play from start to finish.


Last edited by Marek on Wed Dec 31, 2008 7:31 pm, edited 1 time in total.

Offline
 Profile  
 
 Post subject: Re: GameDev VMK 20 - Font class
PostPosted: Tue Dec 05, 2006 7:50 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
I just noticed that if you crouch and look down then text located at the bottom of the screen may disappear because the ground will intersect it.

To fix this you can move the location of the text in the Z axis or you can limit how far down you are allowed to crouch. Both of these techniques will solve the problem.


Offline
 Profile  
 
 Post subject: Re: GameDev VMK 20 - Font class
PostPosted: Mon May 28, 2007 10:49 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
In the STORE I have added a software tool that you can use to make your life easier when creating the TGA file used by the font class. The Font Image Generator Software allows you to quickly space out all the characters in the font that you want to use. All fonts installed on your system will be available through this software. See the video for a demonstration of how the software works.


Last edited by Marek on Fri Apr 25, 2008 6:21 am, edited 1 time in total.

Offline
 Profile  
 
 Post subject:
PostPosted: Fri Apr 25, 2008 5:55 am 

Joined: Fri Jan 04, 2008 2:11 pm
Posts: 72
would u plz make a tutorial on how to use the fonts from windows\fonts directory..

ps:i use photoshop and don't know how to add a alpha channel mask , can anyone help me with this??


Offline
 Profile  
 
 Post subject:
PostPosted: Fri Apr 25, 2008 6:19 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
ir2pi wrote:
would u plz make a tutorial on how to use the fonts from windows\fonts directory..

ps:i use photoshop and don't know how to add a alpha channel mask , can anyone help me with this??


Have you watched the free demo video found here: http://www.marek-knows.com/store.php#Item_1

It shows you how to use the fonts installed on your computer.


Offline
 Profile  
 
 Post subject:
PostPosted: Sun Apr 27, 2008 4:37 pm 

Joined: Fri Jan 04, 2008 2:11 pm
Posts: 72
i think i found a bug , in

we create a glGelLists with size 100

m_uiListBase = glGenLists(100);


but never delete this list..we should use

glDeleteLists(m_uiListBase, 100);


in ~Font()


Offline
 Profile  
 
 Post subject:
PostPosted: Sun Apr 27, 2008 5:23 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
yup, you should have the following in your destructor:

Font::~Font() {
   //clean up memory allocated for proportional font
   if (m_piSpacing) {
      SAFE_DELETE_ARRAY(m_piSpacing);
   }

   //clean up memory used by display lists
   glDeleteLists(m_uiListBase, 100);

} //~Font


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Apr 28, 2008 11:00 am 

Joined: Fri Jan 04, 2008 2:11 pm
Posts: 72
when the text have light colors the fonts have black edges and makes it look ugly..i think this is because of the alpha mask is there any way to remove this ??


Offline
 Profile  
 
 Post subject:
PostPosted: Mon Apr 28, 2008 12:24 pm 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
The black edges are probably coming from your font image texture. Do you have a black background image with a mask on it in the shape of every letter? Change the font image to have a white background. That should fix the problem.


Offline
 Profile  
 
 Post subject:
PostPosted: Fri Jun 13, 2008 8:28 am 
Site Admin

Joined: Sun Feb 11, 2007 8:59 am
Posts: 1105
Location: Ontario Canada
for an optimization tip in the font class, see this post http://www.marek-knows.com/phpBB3/viewtopic.php?t=208


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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

Jump to:  

cron