I am using gnuplot and get this warning everytime I generate a graph:
Could not find/open font when opening font “arial”, using internal non-scalable font
Is there a way to suppress the warning?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This warning is generated by the
gdbackend I believe. Suppressing it might be a little tricky (you could try redirectingstderrof the gnuplot process), butgnuplotseems to like to write useful things tostderr, so I don’t advise that … and the builtin (non-scalable) font looks like garbage. The easiest fix is to see if your gnuplot was built withpango-cairosupport. Just try:instead of:
In this case, the font subsystem of
cairowill take over rather than ofgd. As a side bonus, I’ve found that I’m much happier with thecairoplots.If that’s not an option, you can download/find a suitable font and put it in a directory somewhere. Then you can set an environment variable
GDFONTPATHto point to that directory. For example, find a truetype font that looks likeArialand put it in~/fonts/arial.ttf. Then set your environmentexport GDFONTPATH=${HOME}/fontsand all should work.If you’re willing to live with the ugly font that gd provides, you can use the builtin fonts explicitly:
or:
See
help fonts gdfor more information.