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