本文介绍了-sSUBSTFONT, -sCIDFSubstFont, -sCIDFSubstPath 不替换 PDF 字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

in.pdf 有这些字体:

name                                 type              encoding         emb sub uni object ID
------------------------------------ ----------------- ---------------- --- --- --- ---------
XUBADJ+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    236  0
JZXXTO+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    232  0
NXIYZI+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    228  0
PQVSVF+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    224  0
TCZVSD+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    220  0
XQFVGO+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    216  0
RBABWN+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    212  0
VZZOSB+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    209  0
MIIWJT+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    204  0
POGIAG+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    200  0
XCWYMK+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    196  0
DYONOM+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    192  0
UAXGNC+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    188  0
SFJKWI+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    184  0
FNZBKK+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    180  0
HAZYJU+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    176  0
ZVQPUS+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    172  0
PQZKFS+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    168  0
PGOAHQ+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    164  0
XDOPUZ+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    160  0
RFWRSV+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    156  0
IANVPF+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    152  0
DSZVBD+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    148  0
LSDXRT+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    144  0
XIHSWO+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    141  0
TEWAEV+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    136  0
LYKOSV+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    132  0
BNAIKQ+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    128  0
ZNALBH+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    124  0
FFPURC+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    120  0
TAEOHD+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    116  0
RLNSOX+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    113  0
LKNUZY+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    108  0
RDFYMU+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    104  0
NXOHWC+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes    100  0
LUDJFV+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     96  0
RRUFPY+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     92  0
CDUACC+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     88  0
RNMQSS+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     85  0
PDSWJI+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     80  0
BHBSVQ+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     76  0
NNFGOY+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     72  0
LSTBQQ+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     68  0
XOTJDO+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     64  0
DQQCUP+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     61  0
DSVQZE+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     57  0
VSPFUZ+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     52  0
FVVDEA+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     48  0
NZFHZN+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     45  0
NJXGBN+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     41  0
DWTFYL+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     37  0
PKYUOD+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     33  0
LGBPPA+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     29  0
ROGTHG+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     25  0
ZBKUCS+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     20  0
ZBOPFI+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     17  0
RZCJNG+GlyphLessFont                 CID TrueType      Identity-H       yes yes yes     13  0

为什么不运行这个

gs -q -o out.pdf -sDEVICE=pdfwrite -sCIDFSubstPath=/usr/share/fonts/TTF/ -sCIDFSubstFont=LiberationSans-Regular.ttf -sSUBSTFONT=LiberationSans-Regular in.pdf

使用 LiberationSans-Regular 字体生成 out.pdf?相反,pdffonts out.pdf 提供与上面的 in.pdf 相同的输出.

produce an out.pdf with LiberationSans-Regular fonts? Instead, pdffonts out.pdf gives the same output as it did for in.pdf above.

推荐答案

CIDFont 替换参数影响替换 missing CIDFonts.您无法替换嵌入的 CIDFonts - 文件中列出的所有字体都已嵌入.在一般情况下,简单地放入不同的字体/CIDFont 是不可能的.

The CIDFont substitution parameters influence substituting missing CIDFonts. You can't replace embedded CIDFonts - and all the ones listed in your file are embedded. Simply dropping in a different font/CIDFont isn't really possible, in the general case.

这篇关于-sSUBSTFONT, -sCIDFSubstFont, -sCIDFSubstPath 不替换 PDF 字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-20 07:58