0
\$\begingroup\$

I use the following methods to rasterize font characters into a texture and then render them as a mesh :

It works great. I want to know font line height (the space between two lines).

That information exists in Font class : lineHeight. However (AFAIK) that information will use the font size as defined in Unity True Type Font Importer :

enter image description here

In my case I only know the font size at runtime (which I specify as a parameter in RequestCharacterInTexture() and GetCharacterInfo() methods).

Ideally, font class would have a method as such : GetLineHeight(int size).

I also took a look at CharacterInfo structure, which give some information about how to render a character (for a given size) but it does not have what I want (line height).

| improve this question | | | | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.