What is the right way to display emoticons?

In your own application.

[edit]

Well, that's why I totally agree - more than you know, without the ambiguity that graphic emoticons are an abomination. But! It doesn’t help me when the project owners tell me that we need to support graphic emoticons.

[/ edit]

The problem is more complicated than it would initially seem, especially when you take into account editing, word wrapping, variable-width fonts and color emoticons.

So, my question is really for the people who did this, did you come up with a satisfactory way to create emoticons, which is not only one massive hack?

To start a discussion:

In two implementations, I tried the following approaches.

In a 3D application, where are lines of text where "textures" are displayed; I replaced the lines of emoticons with images corresponding to the type of text, so the emoticon will become just another element of the text.

In fact, the text processing mechanism had to be changed at the deepest levels. It gives good results, but very time-consuming and very difficult to get right (or at least for me anyway; P)

In the second approach (with a different language and platform), I decided to try a “fake” of a higher level, replacing the lines of emotions with one character and drawing emotions over the replaced character. This, of course, has many limitations, but it has the advantage of being fast enough to implement, and you can achieve a fairly stable state without unnecessary effort.

+4
source share
3 answers
  • Create a new font. This remains as an exercise for the reader.
  • Transcode your lines into the character set your new font.
  • Draw:
Make the callback function an operational environment for calculating Text Metrics - find the location of your emoticons. Draw emoticons before the text (if you use a font to enhance any background image - say the face, with glyphs of the font, black on the face) or after the text (in this case, the glyph for each smiley is controversial, and only the size of the glyphs is important).
+6
source

Is an acceptable response to the idea that you should not consider converting emoticons? The whole point of text emoticons is that they are recognizable ... in text form.

[edit] Please do not allow this opinion / proposal to discourage anyone from answering this question. Sometimes you can’t fight with customers, although it may be worth a few more attempts.

+5
source

Here is the idea: do not convert them in any way, but rotate them 90 degrees.

For example, you can visualize an emoticon image, and then rotate this image 90 degrees clockwise and display it.

0
source

Source: https://habr.com/ru/post/1277457/


All Articles