Jump to content
  • Advertisement
Sign in to follow this  
Roof Top Pew Wee

[.net] How is Mesh.TextFromFont size determined when the Mesh is initially created?

This topic is 4522 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

I've just started working with Mesh.TextFromFont and an pretty happy with it so far, but I'm a little confused as to how the size of the text is determined. I realize that I can make text larger or smaller throug matrix operations (already done that), and that I can find out the absolute size of any letter or the entire mesh by using a GlyphMetricsFloat array and traversing it. Why are the texts the sizes that they are? I tried priting out some text using Arial and expected to have some kind of "oh that makes sense" moment when looking at the sizes of the individual letters, but not so. I tried printing out some tall characters like { or [ or |, expecting to have the BlackBoxY be 1, but instead they were values around .8 - .9. Does anyone know why the text size is chosen as such? Are there letters that are exactly 1 unit tall and the rest of the character set is scaled down from there? Or is it all scaled in such a way that a 1 unit line feed will create nice spacing between lines? I googled and looked through the MDX docs, but couldn't find any info on it - any such questions were simply addressed with "just use a scaling matrix." Thanks for any input. --Vic--

Share this post


Link to post
Share on other sites
Advertisement
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!