XeLaTeX 未找到字体

XeLaTeX 未找到字体

各位 LaTeX 专家们,大家好。

我知道你可以使用 XeLaTeX 来使用任何系统字体。最近,我从http://www.latextemplates.com 该模板使用了此处的 Fontin 字体:http://www.exljbris.com/fontin.html

然而,当我尝试使用 XeLaTeX 编译文档时,出现了以下错误,并且没有生成 pdf 文件:

.................................................
. fontspec info: "no-scripts"
. 
. Font Fontin does not contain any OpenType `Script' information.
.................................................
\g_fontspec_family_Fontin_int=\count167
.................................................
. fontspec info: "no-font-shape"
. 
. Could not resolve font Fontin/B (it probably doesn't exist).
.................................................
.................................................
. fontspec info: "no-font-shape"
. 
. Could not resolve font Fontin/I (it probably doesn't exist).
.................................................
.................................................
. fontspec info: "no-font-shape"
. 
. Could not resolve font Fontin/BI (it probably doesn't exist).
.................................................
.................................................
. fontspec info: "defining-font"
. 
. Font family 'Fontin(0)' created for font 'Fontin' with options
. [Mapping=tex-text,SmallCapsFont = Fontin SmallCaps].
. 
. This font family consists of the following shapes:
. 
. * 'normal' with NFSS spec.:
. <->"Fontin/AAT:mapping=tex-text;"
. 
. * 'small caps' with NFSS spec.:
. <->"Fontin SmallCaps/AAT:mapping=tex-text;"
.................................................

所以我不知道问题是什么。我安装了字体,因为我可以看到它们,/Library/Fonts/并且可以在文本编辑器中使用它们。

这是一个小的工作示例:

\documentclass[a4paper,10pt]{article} % Default font size and paper size

\usepackage{fontspec} % For loading fonts
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin} % Main document font

\usepackage{xunicode,xltxtra,url,parskip} % Formatting packages

\usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom colors

\usepackage[big]{layaureo} % Margin formatting of the A4 page, an alternative to layaureo can be \usepackage{fullpage}
% To reduce the height of the top margin uncomment: \addtolength{\voffset}{-1.3cm}

\usepackage{hyperref} % Required for adding links   and customizing them
\definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour} % Set link colors throughout the document

\usepackage{titlesec} % Used to customize the \section command
\titleformat{\section}{\Large\scshape\raggedright}{}{0em}{}[\titlerule] % Text formatting of sections
\titlespacing{\section}{0pt}{3pt}{3pt} % Spacing around sections

\begin{document}


testing Fontin fonts.
\end{document}

有人能告诉我这里出了什么问题吗?

答案1

可能是您从中下载的 Fontin 字体系列的版本http://www.exljbris.com/fontin.html与 XeLaTeX(和 LuaLaTeX)的字体加载机制不完全兼容。在该网站上,有一个下载这些字体的 OpenType 版本的选项。顺便说一句,Opentype 选项的标题表明它适用于 PC;您可以忽略该限制:这些字体在 MacOSX 系统上也应该能正常工作。

无论如何,在下载并安装 Opentype 版本的 Fontin 文件后,我没有遇到您所描述的问题。您可能想尝试一下这些.otf文件。

相关内容