Has anyone found a decent means of displaying images in TextFields?
Our original method was modifying certain unicode characters in our font to show those images as glyphs, but then we discovered there’s a nasty bug on Chromium-based browsers on Mac that will only render the font in black when we did that, no matter what color we set it to. Only Safari would render in the correct color. We figured it wouldn’t get fixed in a timely manner given Chromium’s massive bug log, so we looked at other solutions.
Our current method is to render the images as PNGs and place them on top of TextFields. Our game searches for tokens in the text, replaces them with non-breaking spaces, then grabs the appropriate bitmap to cover the empty area. This works fine for Flash and HTML5, but non-breaking spaces seem to render as full tabs when we tested on Windows builds and throws everything off.
I think my only other option may be to render the TextField to a Bitmap first and modify that as needed specifically for Windows builds. However, I’ve found this method tends to look quite ugly in HTML5 and Flash.
If anyone has any suggestions, I’m all ears.