Color Emojis (COLRv1)#49
Conversation
|
Could you add some info about what these emoji capabilities consist of? Is this all that's needed to draw any emoji out there or is this only one type of them? The tests are not sufficient as they are now, as you're not comparing any outputs with expected ones. It would make sense I think to extract a couple of emoji as color pngs and save them in the test folder. Then you can reference test against them. Otherwise we don't know if the routines just return garbage pixels, skewed images, or something like that. Also, you're converting to grayscale for some reason but you'd want to check that the colors come out right. I also like it better if no resources have to be downloaded during testing. If you can, use some font tool to make a font with only a couple emoji in it, that should be sufficiently small to not matter for repo size and so it can be committed. Needs to be a font whose license allows that though. |
|
Hi @jkrumbiegel. Thanks for taking the time to look at the PR :) This is not all that is necessary to draw all emoji formats, only ones in COLRv1 format. Users should read the FreeType documentation regarding FreeType capabilities with different font formats. The FreeType bindings are not enough to draw the COLRv1 emojis alone. One also need to use a drawing package, like Cairo. From the FreeType docs:
The test don't compare anything, but they do ensure no call returns an error. The emoji-tests are intended to aid users in implementing their abstraction and use the bindings. The responsibility of the tests in this package is just to ensure the bindings are true to underlying c-library. The grayscale conversion is in the The reason i download the font, is to not have to deal with the font licencing. Here's what i suggest:
|
Upgrades FreeType2_jll to 2.13.4, which supports COLRv1.
Add bindings necessary for drawing COLRv1 emojis, and adds a working example.
Julia version of CI is bumped to support test dependency
Images.jlwhich is used in two tests/examples.The COLRv1 test generates the following using
Noto-COLRV1.ttffont,FreeType.jlandCairo.jl(packages).Noto-COLRV1.ttffont is downloaded during the test.Closes #48
Related FreeType documentation can be found here here.