Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to expose SpriteFont::Impl::FindGlyph() method to the toolkit's API #11

Closed
ghost opened this issue Jun 29, 2015 · 3 comments
Closed
Assignees

Comments

@ghost
Copy link

ghost commented Jun 29, 2015

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!

@walbourn
Copy link
Member

What specific information do you need in the public interface?

@ghost
Copy link
Author

ghost commented Jun 29, 2015

Height/width and x/y offset of a character.

@walbourn
Copy link
Member

Added SpriteFont::FindGlyph and SpriteFont::GetSpriteSheet

Change 427ed08

@walbourn walbourn self-assigned this Jun 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant