-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hello,
Running gsl-shell failed with "cannot find a suitable truetype font". (note: this is a very confusing error message)
Looking around, I found that gsl-shell look for fonts in several hard coded paths listed in
agg-plot/support_x11.cpp.
const char *ttf_names[] = {
"ubuntu-font-family/Ubuntu-R.ttf",
"freefont/FreeSans.ttf", "freefont-ttf/FreeSans.ttf", "FreeSans.ttf",
"ttf-dejavu/DejaVuSans.ttf", "dejavu/DejaVuSans.ttf", "DejaVuSans.ttf",
"liberation/LiberationSans-Regular.ttf", 0};
const char *ttf_system_dir[] = {"/usr/share/fonts/truetype", "/usr/share/fonts", "/usr/share/fonts/TTF", 0};
I would suggest using fontconfig font discovery methods instead of hardcoding the paths directly.
In my case was that I have the fonts, but they are in a different path than what was hardcoded.
Other approach is by allowing runtime configuration for the font path.
This is not really severe, but causes confusion, since the INSTALL did not mention the need to have the fonts on that exact paths.
Regards,
Metadata
Metadata
Assignees
Labels
No labels