PostScript包含過程集(ProcSets)。 過程集是包含命名過程和操作符的字典。PostScript過程集和資源存儲在哪裏?
這些程序集按類別排列。 現在這些類別存儲在哪裏?
- 哪裏是(常規)資源存儲? (例如字體,CIDFont,CMap,ProcSet,...)
- ProcSet的類別存儲在哪裏?
你需要systemdict只是兩個額外的詞典
更新1(localDict和globalDict存儲資源,或者究竟是這些存儲?):
(KENS的答案後)好的,也許現在的第一個問題應該是。資源如何存儲在解釋器中。
從我的理解是,有可能是這樣的結構:
Resources (Dictionary ??? is this local or global or ...?)
- Font (Dictionary)
- CIDFont (Dictionary)
--- CIDFontType (integer)
--- CIDFontName (name)
--- CIDSystemInfo (dictionary)
--- FontBBox (array)
--- FontMatrix (array)
--- FontType (integer)
--- ...
--- ...
- CMap (Dictionary)
- FontSet (Dictionary)
- Encoding (Array)
- Form (Dictionary)
- Pattern (Dictionary)
- ProcSet (Dictionary)
--- BitmapFontInit (Dictionary)
--- CIDInit (Dictionary)
--- ColorRendering (Dictionary)
--- FontSetInit (Dictionary)
--- Trapping (Dictionary)
- ColorSpace (Array)
- ...
- ...
- Category (Dictionary)
--- Generic (Dictionary)
大多數是存儲在VM字典。在本地VM或全局VM中。
難道這些資源也加入了UserDict和globaldict,因爲:
- 如果存儲在本地虛擬機的東西是最有可能加入到了UserDict。
- 如果您在全局VM中存儲了某些內容,則很可能會將其添加到globaldict中。
看到PostScript語言參考手冊3(第66頁第3章):
的字典的UserDict和globaldict旨在是爲應用程序定義的詞典等 對象 主存儲庫。當PostScript程序在本地VM中創建字典時,它通常會將該字典與userdict中的名稱關聯起來。 同樣,當程序在全局VM中創建字典時,它通常會將該字典與globaldict中的名稱關聯起來。
所以最簡單的將創造200點字典:「MyLocalResources」,並在第一儲存在UserDict中,另一個在globaldict「MyGlobalResources」。 這兩個字典將包含類別(字體,CIDFont,ProcSet等)。
該查找資源運算符是一種機制,你必須實現自己將看看這兩個字典之一。
這是正確的嗎?
FontDirectory和GlobalFontDirectory是這些實際上是局部和全局的「字體」資源類的實現?