So, today I decided to change my priorities lists to do the fontconfig support before trying to mess with xbindkeys/xvkbd. Why? Because xbindkeys’s code scared me, as it uses low-level libX11 and I’m pretty bad with it.
Unfortunately fontconfig’s documentation is just a mere reference, a bit ambiguous sometimes, too, so to actually be able to get something working I had to look at fc-match and pango sources.
At the end I refactored the whole loading function for xine-lib’s osd, breaking it up in two functions, one generic loading function, and a FreeType2 loading function. This way I don’t have to use nested and sub-nested if conditionals, and I can just load the font from different places till it hits.
I also changed the priority of FreeType2 over bitmap fonts, because by default it would have just hit bitmap fonts and be done with that, without even bothering with FreeType2, making the whole FontConfig support mostly useless.
Unfortunately, FreeType2 rendering it’s pretty ugly right now:
I’m not really sure what the cause is, but I’ll try to debug this until I find the cause and get a decent rendering. The pretty cool thing is that you can just write “Mikachan” after installing media-fonts/mikachan and have it used without further configuration 🙂
And fontconfig support is needed if I’m going to implement ASS subtitles support, as they can specify which font family to use.
Oh, and yes, I’m trying to bump ALSA, but their usual method is applied: they announced the release but didn’t actually upload the tarballs on the mirrors :/