thoppe/pixelhouse

Mention in the Readme that you need to install libraqm for proper kerning of text

Closed this issue · 3 comments

dwhit commented

I was messing around with some of the examples and I couldn't figure out why my name wasn't kerned properly, until I dug around enough and found out that Pillow requires a package called libraqm to be installed to use the kerning specified by the ttf and otf files. Once I installed it, the weird kerning between the A and V in my name was fixed, as seen below.

Bad Kerning:
no_kern

Proper Kerning:
proper_kerning

Relevant package: https://github.com/HOST-Oman/libraqm

If you wanted, you could even add an argument to the pixelhouse text class to turn kerning (or any TTF/OTF font feature on or off)

Oh gross, I didn't even notice that was an issue. Fonts are a complicated piece that I've really only laid the groundwork for. At them moment, I'll see if I can trigger a warning to the user that they should install it for better kerning.

Can I ask how you installed https://github.com/HOST-Oman/libraqm ? It doesn't look like there is anything simple in it w.r.t. a package manager (eg. it's not in Ubuntu's apt get). Asking users to install (and build!) another package is a bit much.

dwhit commented

Yeah it's a pain the in the butt to install. I just had to follow the instructions from the github page. I use a mac, so I installed the dependencies with homebrew, and then cloned the repo and built from source.

Alright, thanks for the info. I'll add some information in the README that highlights how to achieve better kerning with libraqm.