2012-07-23 24 views
2

我在gnuplot中使用pngcairo終端來生成圖像。指定終端時,字體設置爲「sans,9」。我怎麼知道哪些特定的字體被選中進行渲染?當只指定家庭時,如何找出gnuplot選擇哪種字體?

終端命令: 設定終端pngcairo字體 「SANS,9」 尺寸1500,1000

(編輯)更多信息:在Windows 7 OS安裝 。 我只需要在gnuplot 4.4.4中找到用於給定語句的字體,該字體用於創建許多圖。 gnuplot 4.6.0爲同一個語句決定了一個不同的字體,並且實際上不可能重新渲染所有較早的地塊以匹配。

回答

1

我創建了一個文件test.gp

set terminal pngcairo font "sans,9" size 1500,1000 
set output "test.png" 
plot sin(x) 

而下strace

strace -o st.out gnuplot test.gp 

裏grep

grep 'open.*/usr/share/font.*' st.out 

GNUPLOT跑過來給我(Linux 3.0.0-22-generiC#36-Ubuntu

open("/usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf", O_RDONLY) = 5 
+0

哇。不會想到這一點。很好的答案。 (從我+1) – mgilson 2012-07-23 20:57:15

+0

任何想法如何做到這一點的Windows安裝? – Parallax 2012-07-23 21:28:03

+0

@Parallax - 也許'straceNT'(http://www.intellectualheaven.com/default.asp?BH=projects&H=strace.htm)?我從來沒有用過它,我只是用'strace for windows'這就是我想出來的。祝你好運。 – mgilson 2012-07-24 12:19:51