The letter kerning for vertical text in wxt and pngcairo (not pdfcairo) looks broken. The effect varies a bit when changing the terminal size, some letters are too close to each other, sometimes the upward stroke of a capital "N" vanishes completely. And it happens independent of the selected font.
Everything looks totally fine for horizontal text, text in odd angles can look really weird:
set xlabel 'Next N n M|M| N|N| (N/N)' set ylabel 'Next n N M|M| N|N| (N/N)' set label 1 at -9,-8 "Textexample with four words" rotate by 90 set label 2 at -9,8 "Textexample with four words" rotate by 325 set label 3 at -8,-9 "Textexample with four words" set label 4 at -6,-5 "N NN N M MM MM NN4" rotate by 90 set label 5 at -5,-6 "N NN N M MM MM NN5" set label 6 at -5,-5 "N NN N M MM MM NN6" rotate by 15 set label 7 at -3,-2 "NNNNN PPPPP plplppp nininnn" rotate by 90 set label 8 at -2,-3 "NNNNN PPPPP plplppp nininnn" plot -x
This looks the same in gp5.0pl6 and 5.2pl3, official windows build.
I also tried 5.0pl5 on linux (debian stretch stock build), pdfcairo OK, pngcairo distorted.
(see also https://stackoverflow.com/questions/50466261/part-of-capital-letter-n-is-missing-in-ylabel-in-pngcairo-format-in-gnuplot)
So far as gnuplot is concerned, all of the cairo terminals are the same. The choice of output to pdf or png or svg or wxt is made at the very end after the entire plot has been constructed. So any difference you see is due to processing by the corresponding output modules in cairo (cairo calls the output mode a "surface"). In other words, It is not clear that we can do anything about this in the gnuplot code, it's all internal to the cairo libraries, or possibly libfreetype. Or I could believe there is a bad font, but that seems unlikely since you say the problem is not dependent on the chosen font.
For what it's worth I can't reproduce the problem here in either wxt or pngcairo.
I tried two machines, one with cairo 1.14.10 and one with cairo 1.10.0
Anyhow, I suggest browsing for relevant bugs reported against cairo or freetype
See also #2052
I tested on 5.2.6a on windows 64. (cairo 1.16.0, pango 1.43.0, freetype 22.1.16)
If I do not specify font as
set terminal pngcairo
, the result outpuit is gp526awin_defaultfont.png.If I specify font a as
set terminal pngcairo font 'Arial'
, the result outpuit is gp526awin_Arial.png.The different behaviour in default perpahs relies on Japanese locale.
Last edit: Tatsuro MATSUOKA 2019-01-03
Both look broken in a similar way like what I get on my machine (win7, 5.2pl6a binary from sf.net). Also I think there is sth wrong with Ethan's output above, look at the letters x and a in the word "example" printed diagonally, they don't look right. It's just not so obvious as in the output with the Arial font.
But, as the output from pdfcairo looks perfect, I assume Ethan is right that this is a bug in cairo/pango, only it has probably never been found/fixed.
And from what it looks to me, it's a rounding error in the calculation of positions of rotated letters. Becomes more obvious at smaller font sizes.
I have tested on gnuplot 4.6.7 for windows. The results are similar to thoes on gnuplot 5.2.6 for windows. As you said, this has been long stanfdinf issue.
Last edit: Tatsuro MATSUOKA 2019-01-06
I have tesed on gnuplot 5.3 (Visual C build (vc 2019-01-02 [1], MinGW build (mgw) 2019-01-03 [2]). Small differences are fount between results of 5.2.6 and those of 5.3 but are the almost the same. I cannot find any differences between build environments (vc and mgw).
[1] http://ctan.ijs.si/mirror/w32tex/w32/
[2] http://tmacchant3.starfree.jp/gnuplot/Eng/winbin/
Last edit: Tatsuro MATSUOKA 2019-01-06
Cygwin and Ubuntu 18 on wsl on my PC can handle windows system fonts using fontconfig settig.
Snapshots on cygwin and Ubuntu 18.04 on wsl is the almost are the same.
As Bastian wrore in
https://sourceforge.net/p/gnuplot/bugs/2121/#a5bb/3758/355d
you can choice font handling system: win32 (windows font system) or fc (fontconfig system) in
cairo based terminals by setteing "PANGOCAIRO_BACKEND" environments variable.
If you set, PANGOCAIRO_BACKEND=fc, behaviors are almost the same as in those in linux.
Last edit: Tatsuro MATSUOKA 2019-02-09