-
Notifications
You must be signed in to change notification settings - Fork 66
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
Discrepancy in leading space rendering of layoutText #19
Comments
My only initial problem with the included spacing preference is that typically a user will write bold HTML text as "here is a bunch of text, only some of which is bold." The bolded text in that example needs a little extra space around it than normal text, but the person writing the formatted text isn't going to be thinking about that, and you're going to end up with bold text snuggled up too close to normal text. |
Text layout and rendering is a morass of ill specified and dubiously implemented functionality (on every platform). There's nothing in PlayN's Java layout and rendering code that is stripping off whitespace. So something deep in the bowels of Java is doing it. PlayN can't fix that for you. |
I take that back. It looks like the code that PlayN uses to work around font rendering discrepancies is causing problems when you have leading whitespace. Yay Java. I'll see what I can do. |
This is pretty easy to observe in the demo. Choose "Text Test" and click to enter a string with leading and trailing spaces, like " A ". Under java, just the "A" is rendered. Under ios, the " A" is rendered. Is it possible to make this consistent? It's causing problems for me in a styled text renderer in my app.
I'd prefer to include spaces in all rendering since that would allow the best control. Otherwise, I'd need to somehow measure a space and do special extra stuff during laying out each chunk, not pretty.
The text was updated successfully, but these errors were encountered: