First, we need to understand how emojis is implemented:
Apple PNG images (SBIX table)
Apple , TrueType/OpenType, PNG . PNG . Google , Apple.
Mozilla Adobes SVG ( SVG).
- : SVG OpenType. Unicode char SVG-. SVG, , . Firefox 26!
Microsoft COLR/CPAL
Segoe UI Emoji TrueType/OpenType. Unicode-, " ". : COLR . CPAL ( " " ) . ( .) , , .
GoogleGogles PNG ( CBDT/CBLC).
Google , PNG . . , , , . , . , , CSS. , , GLYF - , "" , - , , . FreeType, Android Linux, OpenType Windows Apple.
: 1 2
- , . , imagefttext - , PHP GD. GD FreeType .
Emojis FreeType 2.5. php -i, , FreeType. :
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.5.2
, , , PHP :
Warning: imagefttext(): Could not set character size
, GD- FT_LOAD_COLOR. . . FreeType:
2013-05-23 Behdad Esfahbod
Add support for color embedded bitmaps (eg. color emoji).
A new load flag, FT_LOAD_COLOR, makes FreeType load color
embedded-bitmaps, following this draft specification
https://color-emoji.googlecode.com/git/specification/v1.html
: , imagefttext. .
:
- GD. , GD 1-3 UTF-8. Emojis 4 UTF-8.
: https://github.com/libgd/libgd/blob/master/src/gdft.c#L341
Emojis UTF-8: http://apps.timwhitlock.info/emoji/tables/unicode