Unicode weirdness...
-
So... a while ago I noticed that the gamepad added to the title of "Game gifting area" topic was green for some reason. Wasn't for me. I think I found a repro:
onyx î‚° ~ î‚° vim
Anyone more familiar with dark arts of Unicode can try and guess what the hell I just copied that causes this?
Just in case it renders differently for people:
Also, this was copied from a terminal using this:
-
It looks like it is in the Private Use Area…
-
Ah, so it might be Ruby / Ember / Discourse dickery?
Oh, just to illustrate what this actually does to my bash:
-
The green in this case is syntax highlighting.
a ~ b
-
-
That's due to ANSI escape codes. The kind that go ^[[31m when your terminal doesn't interpret them.
-
Crap! Haven't considered that! nginx? How is that nginx?
No closer to solution then... I saw that damned green gamepad on someone's screenshot, I swear!
-
No closer to solution then... I saw that damned green gamepad on someone's screenshot, I swear!
OK, it's a Private Use Area character, which means it might be any old thing. Characters in the PUA can mean absolutely anything at all as they have no standard meaning at all (

is a certain computer manufacturer's logo for me, and probably nothing for you) and that's by design. That explains the gamepad symbol.The colour here is just Discourse's highlighting. Here it is with no non-ASCII characters at all.
abc ~ x def
The
~
is important, as are the spaces on either side of it. I wonder what on earth it thinks it is doing.
-
Unicode weirdness
Tautology.
-
The ~ is important, as are the spaces on either side of it. I wonder what on earth it thinks it is doing.
It thinks it's nginx syntax:
<code class="lang-auto hljs nginx">
Didn't know that we have that enabled tbh.
Characters in the PUA can mean absolutely anything at all as they have no standard meaning at all
I'm fine with that. The weird thing is that there should be no colour information in it, should there? And it's black for me, meaning I have a font capable of displaying it, but it's not picking up on whatever made it green in that case.
I'd cautiously say it was @RaceProUK's screenshot, but it's a shot into the dark recesses of my scrambled memory.
(sorry for the mention ping if I was wrong)
-
@Onyx has summoned me, and therefore I recall posting a screenshot of a thread who's title had a green... controller I think, and someone asked why it was green for me but black for them.
We never did figure out exactly why...
-
[Reply to @RaceProUK]
Now you got me curious.
Shot in the dark - bug in cleartype font rendering in your browser?
-
-
🎮
U+1F3AE VIDEO GAME
-
🎮
Huh. Broken in Chrome on Windows. Working in Chrome on Android...
-
Why isn't there a font that includes every Unicode 8 character that gets distributed with Chrome? Even if it was a shitty font, it'd be better than having tofu everywhere.
-
Have you ever considered that the glyph might just be colored in some fonts?
-
Yeeeeppp, @aliceif has it...
Consider the following:
- Unicode emoji are not colored on my desktop
- Unicode emoji are colored on iPhone and Android
-
Unicode emoji are not colored on my desktop
So they're all the same color. That's racist. Unless they're all black - then it's not racist.
-
Fun.
Have you ever considered that the glyph might just be colored in some fonts?
Yes. Then I rejected it because it sounded like crazy talk. Fonts are just a collection of glyphs in a vector format. It's just the shapes, the colour is something you define in whatever application you're using them in, not in the font itself!
Well, at least that's how it used to be, it seems. What is this shit? It's like the ability to use JavaScript in PDF files. Ok, that's cool. BUT WHY?
Filed under: "Because it's cool" is not an acceptable answer
-
That's a nice prompt... explain!
-
-
Could it be because desktop Firefox now renders emoji characters as images?
-
Fonts are just a collection of glyphs in a vector format. It's just the shapes, the colour is something you define in whatever application you're using them in, not in the font itself!
That's not how they are right now, but damnit!, that's how they should be. I can't draw anything that isn't an out-and-out diagram without embarrassing myself (things just come out weirdly wrong) or I'd be trying to fix it by creating a proper font…
-
Could it be because desktop Firefox now renders emoji characters as images?
Maybe, but then the emoji look different on Win7 and Win8.1, despite the same browser, so…