在 XeLaTeX 上使用 Graphite 字体

在 XeLaTeX 上使用 Graphite 字体

我想使用 Graphite 字体作为 XeLaTeX 文档中的主要字体,但 fontspec 尚不支持 Graphite 字体。目前,我正在使用 XeTeX 的原生方式更改字体,但这很麻烦,因为我必须为要使用的每个大小系列组合定义一种字体。是否有一些技巧可以让 fontspec 与 Graphite 字体配合使用,或者是否有其他方法可以更改整个默认系列,以便像\Large和这样的功能\emph可以正常工作™?

答案1

您说得对,fontspec 尚未正确支持 Graphite 字体。不过,我确实曾经添加过选择 Graphite 字体渲染器的选项。以下是示例:

\documentclass{article}
\usepackage{fontspec}
\begin{document}
\fontspec[
    Renderer=Graphite,
    RawFeature={
      Special=Hide tone contour staves
    }
  ]{Charis SIL}
foo
\end{document}

然而,我几乎没有使用过任何 Graphite 字体,而且我不知道这是否足够(就用户界面而言,它肯定不是最佳的)。

更新:这是一个实际的例子,显示了一些有用的东西:

\fontspec[Renderer=Graphite,RawFeature={1024=0}]{Charis SIL} Ŋ
\fontspec[Renderer=Graphite,RawFeature={1024=1}]{Charis SIL} Ŋ
\fontspec[Renderer=Graphite,RawFeature={Uppercase Eng alternatives=Large eng on baseline}]{Charis SIL} Ŋ
\fontspec[Renderer=Graphite,RawFeature={1024=2}]{Charis SIL} Ŋ
\fontspec[Renderer=Graphite,RawFeature={1024=3}]{Charis SIL} Ŋ

第 2 行和第 3 行是等效的。要获取可用字体功能的列表,您可以使用“aat-info.tex”文件并对前两行代码使用以下内容:

\def\myfontname{Charis SIL/GR}
\font\testfont="\myfontname" at 10pt

相关内容