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

TextField font rendering issues #3456

Closed
Arcnor opened this issue Oct 4, 2015 · 3 comments
Closed

TextField font rendering issues #3456

Arcnor opened this issue Oct 4, 2015 · 3 comments
Labels

Comments

@Arcnor
Copy link
Contributor

@Arcnor Arcnor commented Oct 4, 2015

This is a screenshot of a button (top) and a textfield (bottom). As you can see, the text on the textfield looks as if some characters are moved a bit up (you can see the capital 'T' is cut at the top, for example)

textfield

I've done some testing, and overriding setStyle for the TextField and making the textHeight 1 pixel bigger fixes the issue. However, I've checked the text height for the button (it's a Label) and it's exactly the same as the one on the TextField (before doing my fix) so probably there is an underlying issue that needs fixing. Also, changing the height of the TextField itself doesn't fix the issue.

Does anyone have an idea of what might be happening? I'm happy to try fixing the issue myself if somebody can point at some probable cause (the code is a bit big) but if nobody can, I'll post an SSCCE

@NathanSweet
Copy link
Member

@NathanSweet NathanSweet commented Oct 5, 2015

Probably text rendering is drawn at a fractional position. Need SSCCE.

On Sat, Oct 3, 2015 at 9:15 PM, Edu Garcia notifications@github.com wrote:

This is a screenshot of a button (top) and a textfield (bottom). As you
can see, the text on the textfield looks as if some characters are moved a
bit up (you can see the capital 'T' is cut at the top, for example)

[image: textfield]
https://cloud.githubusercontent.com/assets/28616/10266389/bc611978-6aa9-11e5-9034-00dfb28dc682.png

I've done some testing, and overriding setStyle for the TextField and
making the textHeight 1 pixel bigger fixes the issue. However, I've
checked the text height for the button (it's a Label) and it's exactly
the same as the one on the TextField (before doing my fix) so probably
there is an underlying issue that needs fixing. Also, changing the height
of the TextField itself doesn't fix the issue.

Does anyone have an idea of what might be happening? I'm happy to try
fixing the issue myself if somebody can point at some probable cause (the
code is a bit big) but if nobody can, I'll post an SSCCE


Reply to this email directly or view it on GitHub
#3456.

@davebaol davebaol added the scene2d label Oct 6, 2015
@ghost
Copy link

@ghost ghost commented Oct 8, 2015

I just had this issue. If you're using FreeTypeFontGenerator you may want to generate your font with an even font size. The issue may also be fixed by setting the TextureFilter to Linear instead of the default Filter Nearest when a font is generated by the FreeTypeFontGenerator.

@NathanSweet
Copy link
Member

@NathanSweet NathanSweet commented Oct 30, 2015

25 days, no SSCCE.

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

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.