如何安装新创建的字体?

如何安装新创建的字体?

我在 Ubuntu 14.04 上使用texlive2015。发行版归 拥有root,我必须使用它sudo来做诸如 之类的事情updmap。[我有另一台计算机,我将所有权更改为我,但那里存在以下类似问题。] 我正在使用pdftex输出dvi,然后pdf通过转换为dvipdfmx。(这是出于历史原因:20 年前我开始写这本 700 页的书。它很简单,tex有很多我自己的宏和 100 个eps图形。)我现在想启用字体扩展(这是使用 的原因pdftex,除了字符突出。)但是,我无法可靠地使新字体工作,特别是如果我使用多种字体。这是一个简单的例子。

\pdfoutput=0 
\font\tenrm=ntx-Regular-tlf-ot1
\font\tenit=ntx-Italic-tlf-ot1
\hsize=5truein
\tenrm

\pdffontexpand\tenrm 20 20 5
\pdffontexpand\tenit 20 20 5
\pdfadjustspacing=2

Our {\it major topics} include random walks and their intimate connection to
electrical networks; uniform spanning trees, their limiting forests, and
their marvelous relationships with random walks and electrical networks;
branching processes; percolation and the powerful, elegant mass-transport
technique; isoperimetric inequalities and how they relate to both random
walks and percolation; minimal spanning trees and forests, and their
connections to percolation; Hausdorff dimension, capacity, and how to
understand them via trees; and random walks on Galton-Watson trees.
Connections among our topics are pervasive and rich, making for surprising
and enjoyable proofs.

\bye

我按照以下说明进行操作如何制作扩展字体并安装它们?,但它们从未完全发挥作用。我将上述文件与地图文件和新字体放在同一目录中。xdvi即使只有罗马字体,我也无法正常工作。错误包括

kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 ntx-Regular-tlf-ot1+15
mktexpk: don't know how to create bitmap font for ntx-Regular-tlf-ot1+15.
mktexpk: perhaps ntx-Regular-tlf-ot1+15 is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.

dvipdfmx很相似:

kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600
ntx-Regular-tlf-ot1+10
mktexpk: don't know how to create bitmap font for ntx-Regular-tlf-ot1+10.
mktexpk: perhaps ntx-Regular-tlf-ot1+10 is missing from the map file.
kpathsea: Appending font creation commands to missfont.log.

dvipdfmx:warning: Could not locate a virtual/physical font for TFM
"ntx-Regular-tlf-ot1+10".
dvipdfmx:warning: >> There are no valid font mapping entry for this font.
dvipdfmx:warning: >> Font file name "ntx-Regular-tlf-ot1+10" was assumed
but failed to locate that font.
dvipdfmx:fatal: Cannot proceed without .vf or "physical" font for PDF
output...

Output file removed.

如果我运行dvipdfmx -f newtx-ext.map,那么我将得到输出。但是,斜体会导致间距和缩放失真(在较长的文件中更为明显,尤其是ntxmi混入未展开的数学字体时):

pdf 输出

类似地,如果我只使用斜体,则pdf没问题,但如果我混合rm,则会出现类似的扭曲。此外,如果我只扩展\tenrm,而不扩展\tenit,则结果同样糟糕。dvips无法找到正确的字体,但dvips -u+newtx-ext.map会产生完美的输出:

dvips 输出

然而,我需要一个合适的 dvi 文件才能使用dvipdfmx(用于我的书的正确 pdf 文件,而不是这个测试文件)。

kpsewhich ntx-Regular-tlf-ot1+20.tfm报告./ntx-Regular-tlf-ot1+20.tfmkpsewhich ntx-Italic-tlf-ot1+20.tfm报告./ntx-Italic-tlf-ot1+20.tfm、还是kpsewhich newtx-ext.map报告./newtx-ext.map

这是地图文件:

ntx-Regular-tlf-ot1+20 TeXGyreTermes-Regular " 1.020 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmr.pfb
ntx-Regular-tlf-ot1+15 TeXGyreTermes-Regular " 1.015 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmr.pfb
ntx-Regular-tlf-ot1+10 TeXGyreTermes-Regular " 1.010 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmr.pfb
ntx-Regular-tlf-ot1+5 TeXGyreTermes-Regular " 1.005 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmr.pfb
ntx-Regular-tlf-ot1-20 TeXGyreTermes-Regular " 0.980 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmr.pfb
ntx-Regular-tlf-ot1-15 TeXGyreTermes-Regular " 0.985 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmr.pfb
ntx-Regular-tlf-ot1-10 TeXGyreTermes-Regular " 0.990 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmr.pfb
ntx-Regular-tlf-ot1-5 TeXGyreTermes-Regular " 0.995 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmr.pfb
ntx-Italic-tlf-ot1+20 TeXGyreTermes-Italic " 1.020 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmri.pfb
ntx-Italic-tlf-ot1+15 TeXGyreTermes-Italic " 1.015 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmri.pfb
ntx-Italic-tlf-ot1+10 TeXGyreTermes-Italic " 1.010 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmri.pfb
ntx-Italic-tlf-ot1+5 TeXGyreTermes-Italic " 1.005 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmri.pfb
ntx-Italic-tlf-ot1-20 TeXGyreTermes-Italic " 0.980 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmri.pfb
ntx-Italic-tlf-ot1-15 TeXGyreTermes-Italic " 0.985 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmri.pfb
ntx-Italic-tlf-ot1-10 TeXGyreTermes-Italic " 0.990 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmri.pfb
ntx-Italic-tlf-ot1-5 TeXGyreTermes-Italic " 0.995 ExtendFont encntx-ot1-tlf ReEncodeFont " <ntx-ot1-tlf.enc <[ntx-ot1-tlf.enc <qtmri.pfb

我相信,该地图文件已正确合并到和/root/.texmf-var/fonts/map/pdftex/updmap/pdftex_dl14.map/root/.texmf-var/fonts/map/dvips/updmap/psfonts_t1.map

的输出sudo -H updmap --force --enable Map=newtx-ext.map

updmap is using the following updmap.cfg files (in precedence order):
  /root/.texmf-config/web2c/updmap.cfg
  /etc/texmf/web2c/updmap.cfg
  /usr/share/texmf/web2c/updmap.cfg
  /usr/share/texlive/texmf-dist/web2c/updmap.cfg
updmap is using the following updmap.cfg file for writing changes:
  /root/.texmf-config/web2c/updmap.cfg
dvips output dir: "/root/.texmf-var/fonts/map/dvips/updmap"
pdftex output dir: "/root/.texmf-var/fonts/map/pdftex/updmap"
dvipdfmx output dir: "/root/.texmf-var/fonts/map/dvipdfmx/updmap"

updmap is creating new map files
using the following configuration:
  LW35 font names                  : URWkb (default)
  prefer outlines                  : true (default)
  texhash enabled                  : true
  download standard fonts (dvips)  : true (default)
  download standard fonts (pdftex) : true (default)
  kanjiEmbed replacement string    : noEmbed (default)
  kanjiVariant replacement string  :  (default)
  create a mapfile for pxdvi       : false (default)

Scanning for LW35 support files  [  3 files]
Scanning for MixedMap entries    [ 49 files]
Scanning for KanjiMap entries    [  6 files]
Scanning for Map entries         [209 files]

Generating output for dvipdfmx...
Generating output for ps2pk...
Generating output for dvips...
Generating output for pdftex...

Files generated:
  /root/.texmf-var/fonts/map/dvips/updmap:
       15762 2016-01-09 15:56:43 builtin35.map
       21235 2016-01-09 15:56:43 download35.map
     1093081 2016-01-09 15:56:43 psfonts_pk.map
     1353946 2016-01-09 15:56:43 psfonts_t1.map
     1348439 2016-01-09 15:56:43 ps2pk.map
          14 2016-01-09 15:56:44 psfonts.map -> psfonts_t1.map
  /root/.texmf-var/fonts/map/pdftex/updmap:
     1348446 2016-01-09 15:56:44 pdftex_dl14.map
     1346781 2016-01-09 15:56:44 pdftex_ndl14.map
          15 2016-01-09 15:56:44 pdftex.map -> pdftex_dl14.map
  /root/.texmf-var/fonts/map/dvipdfmx/updmap:
        6109 2016-01-09 15:56:43 kanjix.map

Transcript written on "/root/.texmf-var/web2c/updmap.log".
updmap: Updating ls-R files.

我真的希望有人能帮助我。过去一个月我花了很多令人沮丧的时间,但我知道如果我能让它发挥作用,这将是值得的。谢谢!

编辑:

update在清理了(没有)的结果后-sys,我运行了sudo updmap-sys --enable Map=newtx-ext.map;它几乎没有什么作用,所以我运行了sudo updmap-sys --force --enable Map=newtx-ext.map。它给出了与上面相同的结果,但有以下例外:第一行是,updmap: resetting $HOME value (was /home/rdlyons) to root's actual home (/root).结尾是

WARNING: updmap has found mismatched files!

The following files have been generated as listed above,
but will not be found because overriding files exist, listed below.
 builtin35.map: /root/.texmf-var/fonts/map/dvips/updmap/builtin35.map
 download35.map: /root/.texmf-var/fonts/map/dvips/updmap/download35.map
 kanjix.map: /root/.texmf-var/fonts/map/dvipdfmx/updmap/kanjix.map
 pdftex.map: /root/.texmf-var/fonts/map/pdftex/updmap/pdftex.map
 pdftex_dl14.map: /root/.texmf-var/fonts/map/pdftex/updmap/pdftex_dl14.map
 pdftex_ndl14.map: /root/.texmf-var/fonts/map/pdftex/updmap/pdftex_ndl14.map
 ps2pk.map: /root/.texmf-var/fonts/map/dvips/updmap/ps2pk.map
 psfonts.map: /root/.texmf-var/fonts/map/dvips/updmap/psfonts.map
 psfonts_pk.map: /root/.texmf-var/fonts/map/dvips/updmap/psfonts_pk.map
 psfonts_t1.map: /root/.texmf-var/fonts/map/dvips/updmap/psfonts_t1.map
(Run updmap --help for full documentation of updmap.)

Transcript written on "/var/lib/texmf/web2c/updmap.log".
updmap: Updating ls-R files.

于是我移动了那个目录/root/.texmf-var/fonts/map,然后最后一个问题就消失了。然而,什么都没有解决:同样的问题又出现了。

相关内容