Sign in to follow this  
Roof Top Pew Wee

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this