SDL2 message boxes still display using unintelligible Tamil font because it is the default iso8859 font

SDL2 (Simple Directmedia Layer) is a popular cross platform library used by a lot of games to handle windowing and input.

There is some kind of Manjaro-specific font configuration problem that is causing it to display all messages in an unintelligible Tamil font, even when the message is in English.

There have been several previous posts about this issue but no one seems to know what is going on. I had

I dug into the source a bit (SDL/src/video/x11/SDL_x11messagebox.c) and basically it’s calling X11_XCreateFontSet( ..., "-*-*-medium-r-normal--0-120-*-*-p-0-iso8859-1")

If I run xlsfonts -llo -fn "-*-*-medium-r-normal--0-120-*-*-p-0-iso8859-1" it returns this iso8559 Tamil font “AkrutiTml2 Normal” aka "-misc-akrutitml2-medium-r-normal--17-120-100-100-p-0-iso8859-1".

xterm -font "-*-*-medium-r-normal--0-120-*-*-p-0-iso8859-1" also gets me this unintelligible Tamil font so I think it’s a font configuration problem not an SDL2 problem.

I’m glad we have Tamil fonts bundled by default but iso8859 is supposed to be an extended latin alphabet character encoding, it seems like the default font for that encoding should probably support latin characters.

I was able to “fix” the problem by removing the offending font from /usr/share/fonts/TTF/fonts.dir, which causes it to default to a DejaVu font instead. As far as I can tell fonts.dir is created automatically, and doesn’t seem to encode the priority information.

It would be nice to solve this more permanently though, any ideas?