Re: [dev] [st] Colored glyphs

From: Gary Allen Vollink <gary_AT_vollink.com>
Date: Sun, 1 Oct 2017 09:37:17 -0400

Janne,

Most likely your report of no rendering is due to an attempt to use a
font type that isn't supported by the Xft library. I can reproduce
the blank space by trying to use Apple Emoji or Noto Color Emoji
fonts. I have had luck with Noto Emoji, Wingdings, Webdings, Symbol
and EmojiOne Color (OTF version that includes monochrome fallback, not
the TTF). Some have reported crash issues with Noto Emoji. All must
be properly configured in fontconfig (in the right order). All render
as monochrome under terminal applications.

Rendering full color emoji would not be trivial as these are literally
embedded SVG images within the font. This would require breaking the
terminal line (specs array), pulling out the image from the font,
drawing the image at the right cell, then drawing the rest of the
terminal line (up to the next SVG), making sure to get the drawing
alignment correct.

Not to discourage the attempt, just know that cracking open the OTFont
to render the SVG seems like a LOT of work. Maybe you can find a
slick library that does the hard parts or copy in the right code from
WebKit or Gecko; I haven't looked... Yet.

Not even the bloated Gnome terminal can do this yet. The only
terminal I've seen color emoji work in is Terminal.App on macOS -
which is proprietary and not even an X application..

Thank you,
Gary Allen


On Sat, Sep 30, 2017 at 5:52 PM, Janne Heß <jannehess_AT_gmail.com> wrote:
> Hello everyone,
>
> I was wondering if glyphs with an own color (namely emojis) are
> supported in st. With a default-ish config.h, they are not rendered at
> all (just black).
> Is there anything I can set (maybe in the font option) to enable this or
> does this require patching x.c?
>
> Regards
> Janne
>
Received on Sun Oct 01 2017 - 15:37:17 CEST

This archive was generated by hypermail 2.3.0 : Sun Oct 01 2017 - 15:48:16 CEST