Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Emojis map to the wrong glyphs #27

Open
tobiasvl opened this issue Aug 9, 2018 · 2 comments
Open

Emojis map to the wrong glyphs #27

tobiasvl opened this issue Aug 9, 2018 · 2 comments

Comments

@tobiasvl
Copy link

tobiasvl commented Aug 9, 2018

In the PICO-8 editor, you can insert glyphs directly by "writing" uppercase letters. For example, pressing shifth inserts the heart glyph. These glyphs are actually emojis – the heart glyph is represented in the .p8 file as ♥.

Note that you can also insert glyphs in strings with an escape sequence, and that seems to work fine. For example, you can insert the heart glyph with the escape sequence \135, which renders correctly in picolove.

However, when loading a PICO-8 cartridge file that has emojis in it, the emojis will display as the wrong glyph. For example, the heart emoji will be displayed as the \153 glyph, which you normally get with shiftz or ▥.

As far as I can see none of the emojis map to their correct glyph, and some of them map to multiple glyphs, probably because of multi-byte emojis.

Quick and simple test:

picolove glyphs

First column is just the escape sequence, second column is the key that (together with shift) inserts the glyph in the editor, third column is the result of the escape sequence and fourth column is the result of the emoji.

Compare to PICO-8's output:

pico-8 glyphs

@x2nie
Copy link

x2nie commented Oct 17, 2020

@tobiasvl , can you show the code to test with glyphs above?

@tobiasvl
Copy link
Author

tobiasvl commented Oct 18, 2020

@x2nie Had to dig around a bit to find it, but here's the code I used back then:

function _draw()
  cls()
  print("144 q \144")
  print("150 w \150")
  print("132 e \132")
  print("145 r \145➡️")
  print("147 t \147")
  print("152 y \152")
  print("148 u \148⬆️")
  print("136 i \136")
  print("142 o \142🅾️ ")
  print("143 p \143")
  print("128 a \128")
  print("146 s \146")
  print("131 d \131⬇️")
  print("133 f \133")
  print("134 g \134")
  print("135 h \135")
  print("137 j \137")
  print("138 k \138")
  cursor(64,0)
  print("139 l \139⬅️")
  print("153 z \153")
  print("151 x \151")
  print("130 c \130🐱")
  print("149 v \149ˇ")
  print("129 b \129")
  print("141 n \141")
  print("140 m \140😐")
end

ie. nothing fancy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants