0

After installing libgd on RedHat Linux, I found the path to .ttf fonts and used the full pathname to a DejaVu .ttf font (in 'set terminal gif font...") to create a .gif file from gnuplot. It looks good in a Firefox window, but when I change the size, it looks bad, as though the font is not scalable.

I am using the default binaries. Do I need to recompile gnuplot with different settings to make it scalable? I get no errors or msgs when the image is created from gnuplot (i.e. it finds and uses the .ttf file; I know because I tried several fonts and the image responded accordingly, with .pfa fonts also).

The gnuplot documentation says that TrueType fonts are fully scalable. Maybe I don't understand what scalable means. I had a similar problem with SUN OS, and my solution was to create a postscript (.eps) file from gnuplot and then convert it to .gif, and then it was scalable, but I don't have such a conversion utility on Linux (yet), and it seems like an unnecessary step.

I don't have the actual code/output in front of me, but I can add some if it would help. Also, I can't find any arial.ttf fonts on the system. Maybe that is a clue to the problem.

I heard good things about pngcairo (to avoid using gd), but 'set terminal' does not list it as an image type.

dnvrdave
  • 117
  • 2
  • 7

1 Answers1

0

This is not a definitive answer, but it allows to show me a picture of the situation on my machine. This plot was generated as gif using gnuplot 4.6p5 and Suse Linux 13.2.

The upper plot shows labels written in DejaVu, left using the full path to the TTF file, right using the name of the font. (DejaVu is an installed font here.)

The lower plot shows the same, the font is from the game Minecraft (i.e. very pixelated). I do not get any error message about missing fonts or similar, but gnuplot uses its default font here, but not what I want. More interesting: When I do not specify the font, I get Liberation Serif...

However, it seems my system ONLY uses fonts, regardless if referenced by name or path, when the font is correctly installed. Nevertheless, also the default font is smooth and scalable. (the gnuplot help says, gd has some not scalable build-in fonts, which may be used in your plot)

enter image description here

sweber
  • 2,916
  • 2
  • 15
  • 22