Gnuplot PDF Terminal Exhibits Font Issues on Mac

99封情书 提交于 2020-06-24 22:29:07

问题


Out of the blue, my Gnuplot has started having issues with the pdfcairo terminal. The font in the produced PDF files is jammed as if the width of the individual characters was set to zero. I am using Gnuplot 5.2.7 on Mac OS, installed via homebrew.

Here, a minimal not-working example:

reset
set terminal pdfcairo
set output "mnwe.pdf"
set xlabel "Time t"
set ylabel "sin(t)"
plot [0:2*pi] sin(x) with lines notitle

which produces the following output:

I suspect that the font issue occurred after a recent update to patchlevel 7. Gnuplot 5.2.2 on my Ubuntu machine works as expected and produces the following output for the same Gnuplot script:

Unfortunately, it does not seem to be possible to revert to the previous Gnuplot version with homebrew.

I confirmed that the epscairo and pngcairo terminals work as expected on my Mac with Gnuplot 5.2.7, so the issue is solely with the pdfcairo terminal.
Edit: In fact, the bug does affect the other Cairo-based terminals as well. Don't know what I did wrong when I checked first.

I would appreciate any pointers at how to fix this.


回答1:


For Homebrew, I changed the pango formula to stick to version 1.43

Until it gets fixed, this should solve the problem:

brew uninstall --ignore-dependencies pango
brew install iltommi/brews/pango

This will install this formula: https://github.com/iltommi/homebrew-brews/blob/master/pango.rb in which I replaced the v1.44 to 1.43



来源:https://stackoverflow.com/questions/57698204/gnuplot-pdf-terminal-exhibits-font-issues-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!