How to display emoji inside text (string)?

Emoji has many useful characters that can be used within our program to enhance its visual. Unfortunately, it seems PascalABC doesn’t supported it very well. The image below shows the emoji I selected through virtual keyboard is not displayed correctly in the editor. Instead of a real emoji, it’s displayed like a text version of the emoji which is too small and incorrect. (See the part that I marked with red line)

It shows the same during runtime as the image below.

Cuplikan layar 2020-09-22 121702

So, is there a way to display emoji correctly inside a text/string in PascalABC?

Thank you.

They are displayed correctly. Standard unicode symbols are defined as polygons and straight and curvy lines. Colors are added by program that draws these symbols for you.

If you want to have images with the same shape instead of what unicode characters looks like - you need to intercept the code that puts text content onto window and replace it with collection of text blocks and images.

Obviously, this wouldn’t work for MessageBox’es. They aren’t meant to display anything other than text.

I’m sorry, it’s my fault. I’m too long accustom to MacOS and Linux that implements emoji rendering correctly which is done by the system (unicode standard), not by the application itself. It turns out, Windows works differently. Delphi also behaves exactly like PascalABC regarding emoji rendering.

Here’s an example how emoji rendering works on MacOS, even on the console.

2 симпатии
 Институт математики, механики и компьютерных наук ЮФУ, 2005–2018
Администрация форума: В.Н. Брагилевский, С.С. Михалкович, А.М. Пеленицын