We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Font
There is a discrepancy in how the size of Font text is calculated between the Font class and the RendererOpenGL class.
RendererOpenGL
The Font class calculates width of text using:
width += gml[glyph].advance + gml[glyph].minX;
This appears to give a larger width than is actually displayed.
width
Meanwhile, the RendererOpenGL class advances Font position using:
offset += gm.advance;
These two should match up.
SDL TTF documentation:
The most relevant section appears to be for TTF_GlyphMetrics:
TTF_GlyphMetrics
Related:
Here it was noted the Button font text didn't look very centered
Button
The text was updated successfully, but these errors were encountered:
test-graphics
Font::null()
drawText
Font::size
No branches or pull requests
There is a discrepancy in how the size of
Font
text is calculated between theFont
class and theRendererOpenGL
class.The
Font
class calculates width of text using:This appears to give a larger
width
than is actually displayed.Meanwhile, the
RendererOpenGL
class advancesFont
position using:These two should match up.
SDL TTF documentation:
The most relevant section appears to be for
TTF_GlyphMetrics
:Related:
Here it was noted the
Button
font text didn't look very centeredThe text was updated successfully, but these errors were encountered: