Closed ghost closed 9 years ago
What specific information do you need in the public interface?
Height/width and x/y offset of a character.
Added SpriteFont::FindGlyph
and SpriteFont::GetSpriteSheet
Change 427ed0811d1f13607314d498aa057e6634d70338
I'm writing a framework based on DirectX which includes common UI controls such as buttons, labels, textboxes, etc. As you can imagine, the TextBox control required precise measurement of rendered fonts, which was only possible once I added a FindGlyph() wrapper to the SpriteFont class so that I could get offset information for characters. I could have possibly not required this if MeasureString() worked differently.
While ultimately I was able to complete the development of this control, my framework is now dependent on a custom, modified version of DirectXTK-- not a desirable thing, obviously.
If this change request is not feasible and there is a way to achieve precise font measurements through other means I would appreciate any assistance you could provide!
Thanks!