Jump to content
  • Advertisement
Sign in to follow this  
dev578

Font Helper Application

This topic is 4822 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone. I will start with the big picture. I am working on my GUI for a DirectX game. I am trying to make my own font system. I want to make my own custom font file format (.font), consisting of the ascii value of the character, width, height, and pixel data. That shouldn't be much of a problem. What I want to do is write a helper application for making the .font file. Here is the basic layout I had in mind for the helper application: 1. load a regular bitmap with all the characters on it 2. have a toolbar for each of the ascii characters, click on the button, then click and drag on the bitmap over the corresponding character. 3. do this for all the characters 4. export to a .font file So how would I go about doing something like this? I have started the MDI app in MFC. I guess I have three things that I need to figure out, the rest I know how to do: loading the bitmap, drawing over the bitmap, and getting the pixel data from each of the characters. If anyone would be willing to help me out, that would be greatly appreciated. -Dev578

Share this post


Link to post
Share on other sites
Advertisement
There is a program on FluidStudios. His "FontGen" towards the bottom of the page. Maybe it will help you get started.

It does something a little diferent than what you are looking for though :(
His takes a windows font(any one you like) and generates a custom font file of the type you describe.
The nice thing about this is that it takes care of all the positioning of the
charactors and gives you all the information you need. Font hieght/width plus the
individual charactors dimentions ( 'i' is thinner than 'H' ).

Though, it sound like you have a font bitmap you want to load as your font.

I sugest that you make things simple and use a mono-spaced font in your bitmap
(ie, each char takes up a 16x16 square) and that way your helper app
can just take the 16x16 blocks and assign them to the letters automatically.

Search here for .bmp and there you have
the bitmap format to load in. If you make the bitmap like I mention above, then you
don't even have to worry about displaying it, you can just work with the data.

[Edited by - KulSeran on September 4, 2005 1:28:33 PM]

Share this post


Link to post
Share on other sites
You can also use FreeType
The library is open source, cross platform and independent. Quality!!!
You can take a look at the source code proposed by NeHe for its OpenGL usage; apply the library for DX is straightforward because the code mainly shows the setup of the library. But it's simple and documented.
If interested go here

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!