Gnuplot PDF终端在Mac上显示字体问题 [英] Gnuplot PDF Terminal Exhibits Font Issues on Mac

查看:200
本文介绍了Gnuplot PDF终端在Mac上显示字体问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然,我的Gnuplot开始出现pdfcairo终端的问题.产生的PDF文件中的字体被卡住,就好像各个字符的宽度都设置为零一样.我在通过自制程序安装的Mac OS上使用Gnuplot 5.2.7.

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

产生以下输出:

我怀疑最近更新补丁程序级别7后出现了字体问题.我的Ubuntu机器上的Gnuplot 5.2.2可以按预期工作,并为相同的Gnuplot脚本产生以下输出:

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:

不幸的是,似乎无法通过自制软件恢复到以前的Gnuplot版本.

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

我确认epscairopngcairo终端在使用Gnuplot 5.2.7的Mac上可以正常使用,因此问题仅出在pdfcairo终端上.
实际上,该错误确实也会影响其他基于开罗的终端.不知道我第一次检查时做错了什么.

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.
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.

推荐答案

对于Homebrew,我将pango公式更改为坚持1.43版

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

这将安装以下公式: https://github.com/iltommi/homebrew-brews/blob/master/pango.rb 中,我将v1.44替换为1.43

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

这篇关于Gnuplot PDF终端在Mac上显示字体问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆