zenorogue / hyperrogue

A SDL roguelike in a non-euclidean world
GNU General Public License v2.0
569 stars 72 forks source link

Add optional fontconfig support. #300

Closed dulsi closed 1 year ago

dulsi commented 2 years ago

With fontconfig on linux it will automatically find the font. Right now the Fedora package is hard-coding the font path and if it is moved the game stops working.

zenorogue commented 1 year ago

Thanks! I have also edited a bit to better match the style and to add functionality (-find-font <name> to find the font by name).

(On my system it seems to find /usr/share/fonts/TTF/DejaVuSans.ttf not /usr/share/fonts/TTF/DejaVuSans-bold.ttf, though.)

dulsi commented 1 year ago

In working on shippy1984, I discovered that FcNameParse needs an argument like "LiberationSans:bold" so probably "DejaVuSans:bold" in hyperrogue.