How to make a Unicode emoji font and modified text
The demo will show you how to make a Unicode emoji font and modified text from C-strings in 6 simple steps.
Emoji has 20-bit Unicode code points, but emojis in texts are written as a combination of two 16-bit surrogate characters. IconEdit can find 20-bit pseudo code for emojis in C-strings, make fonts with the emojis, and convert the 20-bit pseudo code to two 16-bit surrogate characters.
Original C-string with pseudo code for emojis:
Modified C-string with surrogate characters for emojis, only the C-strings are changed:
With this procedure you can make C-source code fonts and modified texts for any emoji supported by Unicode and Windows.
How to make the same font and modified text from the commandline
Start IconEdit:
C:\IconEdit\IconEdit.exe
First set up the parameters for the master font.
Specify the height of the Windows master font with :32, this have to be the first parameter:
C:\IconEdit\IconEdit.exe :32
Set 4 bit per pixel for anti-alias with :Z4:
C:\IconEdit\IconEdit.exe :32 :Z4
Choose a Windows font with :T, the names should be entered exactly as they are in IconEdit font selector, typical values are Times_New_Roman:18 serifed font or Arial:34 sans serif font:
C:\IconEdit\IconEdit.exe :32 :Z4 :TTimes_New_Roman:18
Choose between regular or bold with :W, here bold:
C:\IconEdit\IconEdit.exe :32 :Z4 :TTimes_New_Roman:18 :Wb
Setup of master font is finished.
Read the text for the optimized font with :O, IconEdit finds the C_Strings and makes a font for the texts in the C-Strings:
C:\IconEdit\IconEdit.exe :32 :Z4 :TTimes_New_Roman:18 :Wb :OC:\Text\Emoji.cpp
Set output font name with :F, the name should be related to the input text:
C:\IconEdit\IconEdit.exe :32 :Z4 :TTimes_New_Roman:18 :Wb :OC:\Text\Emoji.cpp :FC:\Font\Emoji_cpp.c
Set modified output text name with :J, the name should be related to the input text, and have the same type:
C:\IconEdit\IconEdit.exe :32 :Z4 :TTimes_New_Roman:18 :Wb :OC:\Text\Emoji.cpp :FC:\Font\Emoji_cpp.c :JC:\Text\Emoji__cpp.cpp
Set modified output text C-String type :U, use u for normal Unicode:
C:\IconEdit\IconEdit.exe :32 :Z4 :TTimes_New_Roman:18 :Wb :OC:\Text\Emoji.cpp :FC:\Font\Emoji_cpp.c :JC:\Text\Emoji__cpp.cpp :Uu
Show surrogate characters as normal high plane characters with :H, choose no hexadecimal n:
C:\IconEdit\IconEdit.exe :32 :Z4 :TTimes_New_Roman:18 :Wb :OC:\Text\Emoji.cpp :FC:\Font\Emoji_cpp.c :JC:\Text\Emoji__cpp.cpp :Uu :Hn
This generates the text optimized font Emoji_cpp.c and a modified text Emoji__cpp.cpp