最近有篇論文中了 ACM MM 2020,不過在提交 Camera-Ready Paper 時,卻被告知論文中有使用 Type-3 字型,應該改為 Type-1。經過一番檢查,發現論文中所使用的部分插圖包含 Type-3 字型,而這是由於 Matplotlib 作圖預設使用 Type-3 字型所導致的。

1.什麼是 Type-1,Type-3,True Type 字型?其中又有何種區別?

按照我所找到的資料,

Type-1 和 True Type 都是向量字型,而 Type-3 並不是

(這也是為啥有時候雜誌編輯要求禁止使用 Type-3 字型)。此外,關於字型的一些背景知識可以看看這個回答:字型的 TrueType、OpenType、PostScript Type 1、Type 0 和 CID 等概念各是什麼意思?

[日常] Matplotlib 作圖字型預設為 Type-3,導致論文被駁回

[日常] Matplotlib 作圖字型預設為 Type-3,導致論文被駁回

這裡應該更正 True Type 由 Apple 率先開發,而後 Microsoft 加入,一起共同開發

[日常] Matplotlib 作圖字型預設為 Type-3,導致論文被駁回

這個解釋比較簡單易懂

2.如何檢視影象中所包含的字型?

按照參考資料,我們可以透過下載 Adobe Acrobat,利用其開啟對應的 PDF 檔案,然後開啟 檔案->屬性->字型,便可以檢視該檔案所嵌入的字型。(不過實測發現,有時候會看不見相應的字型資訊,但是匯入文件中,還是為提示包含 Type-3)

[日常] Matplotlib 作圖字型預設為 Type-3,導致論文被駁回

很明顯,這份檔案中包含 Type-3 字型

3.如何避免 Matplotlib 所作圖中包含 Type-3 字型?

第一種方法:使用 True Type 字型。

# Swtich to Type 42 Fonts。(A。K。A True Type)

plt

rcParams

‘pdf。fonttype’

=

42

plt

rcParams

‘ps。fonttype’

=

42

第二種方法:使用 Type-1 字型。

不過,這個方法我暫時還沒實驗成功,執行程式碼便會報錯:

FileNotFoundError: [Errno 2] No such file or directory: 'latex': 'latex'

。感興趣的同學可以看看這個連結:FileNotFoundError: [Errno 2] No such file or directory: ‘latex’: ‘latex’ (Python 3。6 issue)

# Switch to Type 1 Fonts。

matplotlib。rcParams[‘ps。useafm’] = True

matplotlib。rcParams[‘pdf。use14corefonts’] = True

matplotlib。rcParams[‘text。usetex’] = True

參考資料:

[Latex] 所有字型embedded: Type3 PDF文件處理 / True Type轉換為Type 1

用origin畫了個圖,似乎裡面有Type 3 字型,生成pdf以後,提交的時候通不過。

EDAS投稿系統格式檢查 —— 摘要不一致 —— Font font_1 is of type Type 3 問題解決

How to generate pdf without any Type3 fonts?

TrueType字型和Type-1字型有什麼區別?