xpdf字型缺失,新增外界新字型步驟

2021-10-08 22:12:02 字數 4466 閱讀 7516

背景:xpdf自帶字型不完整,部分字型顯示syntax error: couldn』t find a font for '***x』的問題

(windows)在xpdf檔案下找到xpdfrc檔案,並在其中新增缺失字型配置

fontfile stsong

-light

-unigb

-ucs2-

h./fonts/

stsong

-light

-unigb

-ucs2-

h.ttf

(linux)在xpdf檔案下找到xpdfrc檔案,並在其中新增缺失字型配置

#fontfile times

-roman

/usr/local/share/ghostscript/fonts/n021003l.pfb

#fontfile times

-italic

/usr/local/share/ghostscript/fonts/n021023l.pfb

#fontfile times

-bold

/usr/local/share/ghostscript/fonts/n021004l.pfb

#fontfile times

-bolditalic

/usr/local/share/ghostscript/fonts/n021024l.pfb

#fontfile helvetica

/usr/local/share/ghostscript/fonts/n019003l.pfb

#fontfile helvetica

-oblique

/usr/local/share/ghostscript/fonts/n019023l.pfb

#fontfile helvetica

-bold

/usr/local/share/ghostscript/fonts/n019004l.pfb

#fontfile helvetica

-boldoblique

/usr/local/share/ghostscript/fonts/n019024l.pfb

#fontfile courier

/usr/local/share/ghostscript/fonts/n022003l.pfb

#fontfile courier

-oblique

/usr/local/share/ghostscript/fonts/n022023l.pfb

#fontfile courier

-bold

/usr/local/share/ghostscript/fonts/n022004l.pfb

#fontfile courier

-boldoblique

/usr/local/share/ghostscript/fonts/n022024l.pfb

fontfile symbol

./fonts/s050000l.pfb

fontfile zapfdingbats

./fonts/d050000l.pfb

#你缺失的字型的檔案路徑

fontdir ./fonts/generalfonts

#----

- begin chinese

simplified support package

(2011

-sep-02)

cidtounicode adobe

-gb1 ./xpdf-chinese-simplified/

adobe

-gb1.cidtounicode

unicodemap iso-

2022

-cn ./xpdf-chinese-simplified/iso-

2022

-cn.unicodemap

unicodemap euc-cn ./xpdf-chinese-simplified/euc-cn.unicodemap

unicodemap gbk ./xpdf-chinese-simplified/gbk.unicodemap

cmapdir adobe

-gb1 ./xpdf-chinese-simplified/

cmap

tounicodedir ./xpdf-chinese-simplified/

cmap

#displaycidfonttt adobe

-gb1 ./xpdf-chinese-simplified/

cmap

/gkai00mp.ttf

#fontfilecc adobe

-gb1 /usr/..

../gkai00mp.ttf

#----

- end chinese

simplified support package

#----

- begin chinese

traditional support package

(2011

-sep-02)

cidtounicode adobe

-cns1 ./xpdf-chinese-traditional/

adobe

-cns1.cidtounicode

unicodemap big5

./xpdf-chinese-traditional/

big5

.unicodemap

unicodemap big5ascii

./xpdf-chinese-traditional/

big5ascii

.unicodemap

cmapdir adobe

-cns1 ./xpdf-chinese-traditional/

cmap

tounicodedir ./xpdf-chinese-traditional/

cmap

#fontfilecc adobe

-cns1 /usr/..

../notosanscjktc

-regular

.otf"

#----

- end chinese

traditional support package

#----

- begin arabic support package

(2011

-aug-15)

unicodemap iso-

8859-6

./xpdf-arabic/iso-

8859

-6.unicodemap

#----

- end arabic support package

#----

- begin greek support package

(2011

-aug-15)

nametounicode ./xpdf-greek/

greek

.nametounicode

unicodemap iso-

8859-7

./xpdf-greek/iso-

8859

-7.unicodemap

#----

- end greek support package

#----

- begin japanese support package

(2011

-sep-02)

cidtounicode adobe

-japan1

./xpdf-japanese/

adobe

-japan1

.cidtounicode

unicodemap iso-

2022

-jp ./xpdf-japanese/iso-

2022

-jp.unicodemap

unicodemap euc-jp ./xpdf-japanese/euc-jp.unicodemap

unicodemap shift

-jis ./xpdf-japanese/

shift

-jis.unicodemap

cmapdir adobe

-japan1

./xpdf-japanese/

cmap

tounicodedir ./xpdf-japanese/

cmap

#fontfilecc adobe

-japan1

/usr/..

../notosanscjkjp

-regular

.otf

#----

- end japanese support package

由於新增字型前,需要知道xpdf所缺失字型名稱,因此不能提前預配,轉成一定程度上的麻煩。

c 新增 使用新字型

c 動態載入和解除安裝字型 以檔案的方式 2009 07 01 17 18 因為是在ce裡,所以是用coredll pc機用的不是這個,可查msdn dllimport coredll entrypoint addfontresource private static extern int addf...

給app新增新字型

在開發中,有時系統預設的字型不能滿足我們的需求,那麼我們就需要自己新增新的字型,字型可以在網上搜到很多,格式一般為 ttf 或者 ttf.uilabel label uilabel alloc initwithframe cgrectmake 0,40,300,300 label.text 我就是測...

Android7 0 新增新字型

1.拷貝要新增的字型 frameworks base data fonts 把要新增的字型拷貝到這裡。2.修改android.mk 把要新增的字型加到這個下面font src files font src files androidclock.ttf notosanscjkjp black.otf ...