Finally, some *visible* result from my #X11 / #xcb experimenting with #freetype and #harfbuzz for font rendering. π₯³
https://github.com/Zirias/xmoji/commit/80e953a98048419124f0a2ef72e9eaefb8812789
There are issues to fix:
* Sometimes, it renders nothing visible. I'm not sure where this indeterminism could come from π«€
* xcb/render.h offers a struct for color with fields for red, green, bue and alpha (in this order). If I use {0,0,0,1} here, I see nothing on a white background. {1,0,0,0} gives me black text. π€ Now either I'm doing something *completely* wrong, or there's some confusion somewhere whether colors are ARGB or RGBA format. Huh?
There's also an issue that probably doesn't have a fix. #harfbuzz shaping outputs rendering positions in fractional pixels. I *think* XRender only accepts whole pixels, so I have to round the position for every single glyph. I wonder whether this is a reason for many to use #cairo for rendering?
@thomasadam if you can shed some light on one of these issues, that would be awesome, but I guess I'm not exactly "stuck" here, need to do more research π
