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

Fix extra 0.5f pixel offset #3

Closed
wants to merge 5 commits into from
Closed

Conversation

SimDietrich
Copy link

This was causing the text have the right side of each char cut off in opengl. Sorry for the messy commit structure ( new to github ), but the idea is simple, add a setting to imgui::imguistyle that has the offset. default to 0.0f, and change it to 0.5f in <= d3d9, leave 0.0f for ogl & d3d10+.

@ocornut
Copy link
Owner

ocornut commented Aug 11, 2014

Thanks, I will integrate a similar change but I think the offset should be applied to UV coordinates in the ImBitmapFont::RenderText function?

@ocornut
Copy link
Owner

ocornut commented Aug 11, 2014

Hello, I have merged in a change based on your patch. The field has been moved out of the Style structure into the IO structure and applies to UV coordinates (so the 0.0/0.5 values are backward). Sorry I am not sure how to treat a pull request with changes, this is the first pull request I get and I am new to Git :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants