Hi @dnkl, for a project (#X11 with #XRender using #xcb, still in experimentation phase), I was looking for a sane way to render #SVG fonts with #freetype. Looking for a sane library to do the rasterizing, I finally found the solution (#nanosvg 👍) in your #fcft project (thanks!).
I tried to "steal" your metrics calculations at first, but the result was completely broken with the "Twitter Color Emoji" font, so I started over (meanwhile ditching most floating-point stuff in favor of freetype's fixed-point formats), and now the result looks sane. In case you're interested, here's my nanosvg/freetype adapter:
https://github.com/Zirias/xmoji/blob/master/src/bin/xmoji/svghooks.c
But of course I have doubts now, maybe the font I'm testing with is "unusual"? Which fonts do you test with? Thanks!


