Re: [HarfBuzz] Emoticons support

2017-11-13 Thread Behdad Esfahbod
Hi Sebastien,

Sorry for not replying before.

In short, HarfBuzz doesn't need any modifications as long as you you don't
use hb-ft.h (which is tracked at
https://github.com/behdad/harfbuzz/issues/489 ).

What you do need is:

  - In your graphics subsystem you need to pass FT_LOAD_COLOR to FreeType
and handle color glyphs loaded.  Look in cairo-ft-font.c.  The images come
back BGRA32 pre-multiplied.  Most graphics libraries know how to handle
that.  Also, the CBDT/CBLC and sbix formats implemented by FreeType are
bitmap formats.  So your font code needs to support scaling bitmap fonts
correctly,

  - You also need something called an emoji-itemizer, which you run on the
input text to identify sequences that need to be rendered as color emoji.
See pango-emoji.c for that.  That code also needs some updating for latest
version of Unicode: https://bugzilla.gnome.org/show_bug.cgi?id=789978

  - When you do identify such sequences, you should then ask for "emoji"
font family from Fontconfig.  That also would mean that users of your
library would not be able to select different emoji font.  We are
discussing that at https://bugzilla.gnome.org/show_bug.cgi?id=787365

That's the gist of it.  I'd be happy to dig deeper.

Cheers,
behdad

On Tue, Aug 1, 2017 at 5:06 PM, Sebastien Metrot  wrote:

> Hi,
>
> I just this tweet https://twitter.com/behdadesfahbod/status/
> 892235143599063040 and wondered how I could add support for colored
> emoticons to my open UI library that already uses harfbuz (albeit an old
> version of the API…).
>
> Very interesting in learning about this so any pointer is welcome!
>
> Thanks!
>
> S.
>
> ___
> HarfBuzz mailing list
> HarfBuzz@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/harfbuzz
>
>


-- 
behdad
http://behdad.org/
___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz


[HarfBuzz] Emoticons support

2017-08-01 Thread Sebastien Metrot
Hi,

I just this tweet https://twitter.com/behdadesfahbod/status/892235143599063040 
 and wondered how 
I could add support for colored emoticons to my open UI library that already 
uses harfbuz (albeit an old version of the API…).

Very interesting in learning about this so any pointer is welcome!

Thanks!

S.___
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz