lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Logic Glyphs maybe is the correct term so. Think about the many existing Android's software keyboard. They don't know what is the font the app is rendering, but when you press the "virtual backspace" button to delete a emoji from content, they understand that the glyph you are trying to delete occupies more than 1 UTF-16 Java char.

Even without the information about font, the virtual keyboard send commands to delete many utf-16 Java chars at once just to delete a glyph.

So, the concept of glyph in unicode exists without the font. Maybe the term should be something like logic glyph, or well known glyphs sequences... 

Em Qua, 11 de jul de 2018 02:14, Axel Kittenberger <axkibe@gmail.com> escreveu:
I think utf8.len() returns the quantity of Unicode Code Points, not glyphs...

It simply cannot be glyphs, since ligatures are part of the font used, len() without a specific font cannot know the number of glyphs. "fi" for example is a very common ligature being two characters but one glyph. Also one character can be encoded as union of two glyphs. Like in many fonts ö is o plus ". etc.