linebender / parley

Rich text layout library
Apache License 2.0
209 stars 24 forks source link

add emoji family for emoji clusters #56

Closed dfrg closed 4 months ago

dfrg commented 4 months ago

Quick and dirty fallback for emoji. This can be done more efficiently (and should be handled in fontique directly) but this should get us functioning emoji mapping for capable renderers.

nicoburns commented 4 months ago

Applying this on top of the tiny-skia example I get a blank space for the emoji (which is expected because the ColorPainter trait and associated function call aren't implemented):

Screenshot 2024-05-22 at 12 22 06

On top of the swash example I get "interesting" output:

Screenshot 2024-05-22 at 12 25 21

I'm assuming this is an issue with the example rather than this PR as it seems to selecting the correct font/glyph.

dfrg commented 4 months ago

Is it meaningful to have a test for this?

It is meaningful but the structure of this file makes unit testing difficult. I filed an issue for refactoring at #57