qpixel
qpixel copied to clipboard
Community ads sometimes show ?? for non-UTF8 characters
https://meta.codidact.com/posts/280879
A picture is worth a thousand words:

A commenter suggests a UTF8 encoding/decoding hiccup.
Nothing to do with encoding/decoding - it's the same problem we had with Hebrew characters. The font we're using doesn't include them, and because it's in an image there's no way to fall back to an alternative font for unsupported characters.
It's possible to sort of graft those extra characters on as we did for Hebrew, but where do you draw the line? I'm not about to start sourcing and merging every possible Unicode character - let alone licensing issues.
Oh, I didn't realize it was a font problem. (I'd forgotten how you'd solved this for Hebrew.) I take it there's no font out there that's more inclusive (and licensable)? For ads, it doesn't matter as much if it's a little more ugly, while we would care about that for a body font used all over the site.
Do the community ads that are generated from questions have to be images? I'm sure I have seen this bug recently.
The font we use to generate the Ad images is Roboto?
A recent Meta post popped up. Somehow, it's gotten worse (or maybe it hadn't hit this edge case?); some characters are not shown at all
The community ad is supposed to read "What is ทำดีได้อย่าเด่นจะเป็นภัย in Thai?", but instead, completely removes the Thai characters, not even leaving the user any indication that something was there.
I raised the priority because this is impeding community promotion and keeps popping up. That said, I see the "hard" label. Priority, not urgency.
Art mentioned in an earlier comment that we can't use a fallback font for unsupported characters because it's an image. Just wondering if there is a way to generate the text up front, with a fallback font for the unsupported characters, and only then convert to an image?
When I say "a way" I mean a straightforward way, preferably short of using a browser to generate the rendered text and then taking an automated screenshot. If we can find a way, then hopefully future missing characters will just require adding a new fallback font rather than manually merging.