在 Latex 中使用标准 PostScript 字体:Helvetica,而不是 NimbusSans

在 Latex 中使用标准 PostScript 字体:Helvetica,而不是 NimbusSans

让我们开始说明我的用例,因为它可能有点不典型。我想从网站提供按需生成的 PDF 格式的图纸。(*)这些 PDF 是使用 Python“Pyx”包生成的,该包使用 (La)Tex 生成 PDF。

由于结果可能被图形设计师使用,我希望文档可以在 Adob​​e Illustrator 中编辑。我在图形中添加了少量文本,排版不必太精美。因此,我希望 PDF 使用标准字体之一:Helvetica、Times、Courier。

我设法获取了带有 Times 或 Helvetica 等字体的 PDF,但当我在 Illustrator 中打开它时,程序告诉我“文档使用了您计算机上当前不可用的字体”。在对话框中,它显示它一直在使用“CMSY10”和“NimbusSanL-Regu”。因此,我的问题是:

是否可以让 LaTex 使用 Helvetica 或 Times 而不将其嵌入到文档中?

现在,我首先尝试使用 test.tex 文件和 xelatex 命令来使其正确运行。如果这可行,那么我可以尝试让它在 Pyx 中运行。

到目前为止,我尝试的是:

% Preamble
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\renewcommand\familydefault{\sfdefault}
\usepackage{helvet}

% Packages
\usepackage{a4wide}

% Document
\begin{document}

It is only with the heart that one can see rightly; what is essential is invisible to the eye.

\end{document}

结果看起来像 Helvetica,但是当我在 Illustrator 中打开它时,我看到:

Adobe Illustrator 的屏幕截图,显示了 PDF 中使用的字体

答案1

根据 David Carliisle 和 Ulrike Fischer 的评论:要使用 Helvetica 字体而不将其嵌入到文档中:

% Preamble
\documentclass{article}
\usepackage[utf8]{inputenc}
\renewcommand\familydefault{\sfdefault}
\pdfmapline{=phvr8r Helvetica}
\usepackage{helvet}

% Packages
\usepackage{a4wide}

% Document
\begin{document}

It is only with the heart that one can see rightly; what is essential is invisible to the eye.

\end{document}

(与我原来的方法相比,这意味着删除该行\usepackage[T1]{fontenc}并添加该行\pdfmapline{=phvr8r Helvetica}。)

此外,我使用命令pdflatex而不是xelatex

所有这些步骤都是必要的。

答案2

使用答案找到表意文字,我不得不改变路线

\pdfmapline{=phvr8r Helvetica}

\pdfmapline{=phvr8r Helvetica 32 " TeXBase1Encoding ReEncodeFont " <8r.enc}

可能是因为 pdflatex 版本较新。我根据另一个回答

相关内容