【问题标题】:Gnuplot pngcairo arial-bold font Pango-WARNINGGnuplot pngcairo arial-bold 字体 Pango-WARNING
【发布时间】:2014-07-28 19:35:27
【问题描述】:

我在 Windows 中使用带有 pngcairo 终端的 Gnuplot 4.6 来绘制一些东西。如果我尝试使用 arial-bold 字体,我会收到以下错误:

Pango-WARNING **: couldn't load font "arial-bold, Not-Rotated 360", falling back to "Sans Not-Rotated 360", expect ugly output.

这与没有- 时相同,并且当我使用指定大小时(添加 ,x)。这很奇怪,因为我从来没有指定这个 'Not-Rotated' 业务,当我只使用 arialarial,x 时,它没有被提及(并且脚本运行顺利)。有没有我可以使用的其他字体,或者其他方式告诉它使字体变粗?

这是我脚本的主要部分(省略线型定义和其他修饰):

set output "./Paired CDFvsdRd Graph #17.png
set title "Effect of IRSS LWIR @ 10m (15kts, φ=all°)" offset 0,1 font 'arial-bold,30'
set term pngcairo dashed size 1280,960
set key font "arial,14"
set xlabel "dRd [AU]" offset 0,-1 font "arial-bold,18"
set ylabel "CDF" offset -1,0 font "arial-bold,18"
set mxtics 5 ; set mytics 5
set grid xtics mxtics ytics mytics ls 6, ls 5
set xrange [-0.612187:0.421873]       # Change [min:max] to desired x range

plot './Paired CDFvsdRd Graph #17.csv' u 1:2 title "IRSS, 15kts, θ=30°" w l ls 1,\
'./Paired CDFvsdRd Graph #17.csv' u 5:6 title "IRSS + HFC, 15kts, θ=30°" w l ls 2,\
'./Paired CDFvsdRd Graph #17.csv' u 9:10 title "IRSS, 15kts, no-sun" w l ls 3

我正在使用 Gnuplot 4.6 补丁级别 5

【问题讨论】:

  • 请添加一个给出错误的最小文档。并指定您使用的 4.6 补丁级别。对我来说,以下最小文档可以正常工作:set terminal pdfcairo font "Arial-Bold"; set output "foobar.pdf"; plot xpngcairo 也可以正常工作,但 pdfcairo 终端允许您查看是否实际使用了所需的字体。
  • 编辑添加更多细节。我也在 Windows 中做这一切。它在 Linux 中运行良好。
  • 我恢复了您对标题的更改,因为要表明问题已得到回答,您应该接受答案,而不是将其写在问题的其他地方:)
  • 我想这样做,但由于我的帐户太新,或者时间太短,我无法接受我的答复,直到明天。

标签: fonts gnuplot pango


【解决方案1】:

好的,显然 arial-bold 和 Arial-Bold 之间存在足够显着的差异。这就是全部了 -。- 这很奇怪,因为我确信我是从使用大写字体名称开始的,最终在网上看到许多使用小写名称的示例和一个小时的试错测试后,我不再为大写而烦恼。

【讨论】:

  • 有趣的是,只有 Windows 在这里有所作为 ;)
猜你喜欢
  • 1970-01-01
  • 2019-11-28
  • 2012-05-16
  • 1970-01-01
  • 2011-07-11
  • 2016-06-28
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多