Inconsistent handling of space before any color tag, even a [] tag with bitmapfonts.
See original GitHub issueVersions affected: master:1.6.6-SNAPSHOT and goes back to 1.5.0 (haven’t tested 1.4.x) I’m using color tags to emphasize keywords and f.draw handles spaces before tags poorly even in a single line string. I don’t know if spaces are skipped or if it’s a glyphrun bug.
I haven’t tried it with fixed width fonts.
f.draw(batch, "...blah blah[RED] BINGO[] blah blah... ",300,300);
f.draw(batch, "...blah blah [RED]BINGO []blah blah... ",300,270);
Adding 1 extra space seems to work but it’s not elegant.
f.draw(batch, "...blah blah [RED]BINGO []blah blah... ",300,240);
Edit: Provided test code & assets in my last comment. Please review.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Padded fonts have inconsistent space calculation around ...
Padded fonts have inconsistent space calculation around [] tags in ... more acceptable than color tags changing the spacing between glyphs.
Read more >In Win7 some fonts don't work like they did in Win2K/XP
My question is about how font handling needs to be changed in order to work correctly under Windows 7. I'm sure that I've...
Read more >CSS Fonts Module Level 4 - W3C
Abstract. This specification defines modifications to the existing CSS Fonts 3 specification along with additional features.
Read more >History of Ghostscript versions 5.n - MIT
(lib/pdf_font.ps) - ICCBased color spaces caused an error. ... didn't recognize TrueType fonts tagged as 'true' rather than 0x00010000.
Read more >escapee - PCL, HPGL, AFP, PDF and POSTSCRIPT conversion
Improved handling of text spacing in PDFs produced by the Tesseract OCR plugin. 10.60B: IDF files generated by EscapeE now contain a <INFO...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Works correctly with latest.
Ok, sorry for the long delay, here’s a minimal project:
MyGdxTest.java:
assets dir:
https://www.dropbox.com/s/a2t2yimx1xgb324/badlogic.jpg?dl=0 https://www.dropbox.com/s/n9ek0wy9omrnxzb/opti-30-b.fnt?dl=0 https://www.dropbox.com/s/15cr4beyzo7uyjs/opti-30-b.png?dl=0
Let me know if this needs more work.