Jump to content
  • Advertisement
Sign in to follow this  
omega237

BMFont question

This topic is 4324 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 all, first i want to mention that the BMFont generator is a great tool! It's easy to use and has a lot of options. But besides of that i have a question: i want to determine the total height of a font as describe in the win32 api reference, that means the distance between the top of a uppercase m and tho bottom of a lowercase g. I was wondering if the lineHeight parameter in the commonInfo tag would do this for me!? Would that mean that a char could maximum have (lineHeight-base) pixels below the baseline? Is the lineHeight in pixels equal to the font's size?? Greetings, omega237

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by omega237
first i want to mention that the BMFont generator is a great tool! It's easy to use and has a lot of options.


Thanks. :)

Quote:

I was wondering if the lineHeight parameter in the commonInfo tag would do this for me!?


The line height is the distance between one line and the other, i.e. how far down you should move the cursor when encountering a new-line. This is however not the same thing as the distance between the top of a uppercase M and the bottom of the lowercase g. It is usually slightly larger.

Quote:

Would that mean that a char could maximum have (lineHeight-base) pixels below the baseline?


Yes, it does.

Quote:

Is the lineHeight in pixels equal to the font's size??


Yes, it usually is. This depends on the true type font however. The size of the font is what I use when creating the font object with CreateFont(), and the lineHeight is taken from the GetTextMetrics() output. (if I remember correctly)

Regards,
Andreas

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!