我正在gnuplot中使用pngcairo终端生成图像。指定终端时,将字体设置为“ sans,9”。如何得知选择了哪种特定字体进行渲染?
终端命令:设置终端pngcairo字体“ sans,9”,大小为1500,1000
(编辑)更多信息:安装在Windows 7 OS下。我只需要在gnuplot 4.4.4中查找给定语句使用的字体,该字体用于创建许多绘图。gnuplot 4.6.0为同一条语句决定了不同的字体,因此实际上不可能重新渲染所有较早的图形以进行匹配。
我创建了一个文件test.gp
set terminal pngcairo font "sans,9" size 1500,1000
set output "test.png"
plot sin(x)
Run Code Online (Sandbox Code Playgroud)
在下面运行 gnuplotstrace
strace -o st.out gnuplot test.gp
Run Code Online (Sandbox Code Playgroud)
grep
grep 'open.*/usr/share/font.*' st.out
Run Code Online (Sandbox Code Playgroud)
给我 (Linux 3.0.0-22-generic #36-Ubuntu)
open("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf", O_RDONLY) = 5
Run Code Online (Sandbox Code Playgroud)