Skip to content

Emoji supportย #311

@cormullion

Description

@cormullion

I believe Cairo now supports emoji (https://www.phoronix.com/scan.php?page=news_item&px=Cairo-1.15.8-Colored-Emoji) as of 1.15.8. I think Cairo.jl is now based on 1.16.0. So I thought it should be possible to display emoji...

Changing sample_text.jl to contain this:

select_font_face(cr, "AppleColorEmoji", Cairo.FONT_SLANT_NORMAL,
                Cairo.FONT_WEIGHT_BOLD)
set_font_size(cr, 90.0)

move_to(cr, 10.0, 135.0)
show_text(cr, "๐Ÿ™ฉ๐Ÿ™ช๐Ÿ™ซ๐Ÿ™ฌ๐Ÿ™ญ๐Ÿ™ฎ๐Ÿ™ฏ๐Ÿ™ฐ๐Ÿ™ฑ๐Ÿ™ฒ๐Ÿ™ณ๐Ÿ™ด๐Ÿ™ต๐Ÿ™ถ๐Ÿ™ท๐Ÿ™ธ๐Ÿ™น๐Ÿ™บ๐Ÿ™ป๐Ÿ™ผ๐Ÿ™ฝ๐Ÿ™พ๐Ÿ™ฟ๐Ÿš€๐Ÿš") 

just produces empty boxes. Is there a trick to getting them showing? Perhaps it's a FontConfig/FreeType thing?

Edit: I see that on some devices Github canโ€™t display some of the emojis in that string either... But theyโ€™re rendered correctly in Julia (n the REPL and in my editor (Atom)).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions