LuaLaTeX + fontspec + IM FELL 不提供长 s

LuaLaTeX + fontspec + IM FELL 不提供长 s

我正在尝试获取字体(任何字体) 会自动将单词中间的 s 替换为 ſ。数字 我在 StackExchange 上找到的建议,我正在使用 IM FELL DW Pica PRO(来自这里)我目前在MikTeX下使用LuaLaTeX。

基于示例这里,这里是 MWE:

\documentclass{article}
\usepackage{fontspec}


\begin{document}
\font\1="IM FELL DW Pica PRO:mapping=tex-text,+dlig,+hlig,+hist" at 12pt
\1 Associated facts stray speciously.

1234567890
\end{document}

对我来说,输出如下:

不成功的图像

然而,在原始帖子,它旨在输出:

在此处输入图片描述

这是 LuaLaTeX 的一个缺陷吗(如建议的那样)这里)? 使用这个问题,我列出了 IM FELL DW Pica PRO 的所有字体特性,但没有提到 hlig,尽管它在上面的代码中使用了它。

任何帮助都将非常感激。

答案1

对于 OpenType 字体,功能的可用性和行为hist取决于脚本和语言。

默认情况下,LuaLaTeX 使用默认脚本 ( DFLT) 和默认语言 ( dflt)。出于某种原因,“IM FELL DW Pica PRO”中不存在此脚本,因此不存在任何功能。恕我直言,这是字体中的一个错误,但问题不大:您只需latn通过添加选项来指定使用拉丁脚本 ( ) script=latn

此外,如果您不使用它,您可以将其删除fontspec,并且hlig可以省略,因为字体中没有这样的功能。

剩下的就是:

\documentclass{article}

\begin{document}
\font\IMFell="IM FELL DW Pica PRO:script=latn,+tlig,+dlig,+hist" at 12pt
% Or, if you prefer filenames
%\font\IMFell="[IMFePIrm29C.otf]:script=latn,+tlig,+dlig,+hist" at 12pt
\IMFell Associated facts stray speciously.

1234567890
\end{document}

在此处输入图片描述

答案2

您可能想要使用 中的字体加载命令fontspec。具体来说, 可启用 中的长 s (ſ) 。 您可以通过从 中Style = Historic删除 来关闭连字 ss → ſs → ß 。如果您想自动将 oe → œ 和 ae → æ,还可以使用几种不同的样式集。DiscretionaryLigatures

如果您使用 LuaLaTeX 进行编译,microtype将启用字体扩展并大大减少所需的连字符数量。我曾遇到过不喜欢激光打印机上显示效果的人,但这对于在屏幕上阅读来说是一个很大的优势。

我选择了一个略显不合时宜的段落来说明字体特征,来自伦敦季刊1839 年 6 月。

\documentclass[varwidth=10cm, preview]{standalone}
\usepackage{fontspec}
\usepackage{microtype}

\defaultfontfeatures{Scale = MatchUppercase, Ligatures = TeX}
\setmainfont{IMFePI}[
  Scale = 1.0 ,
  Ligatures = { Common, Discretionary } ,
  UprightFont = *rm29C ,
  UprightFeatures = { Style = Historic } ,
  ItalicFont = *it29C ,
  ItalicFeatures = { Style = {Historic, Swash} } ,
  Extension = .otf ]

\begin{document}

\textit{Oliver Twist}, again, is directed against the poor-law and work-house systems, and in our opinion with much unfairness.  The abuses which he ridicules are not only much exaggerated, but in nineteen cases out of twenty do not at all exist.  Boz so rarely mixes up politics, or panders to vulgar prejudices about serious things, that we reget to see him participate in an outcry which is partly factious, partly sentimental, partly interested.  The besetting sin of `white-waistcoated' guardians is profusion, not parsimony; and this always must be the case where persons have to be generous out of funds to which individually they are small contributors.  After all, the proof of the pudding is in the eating: one week's poorhouse pot-luck fattens a pauper brat up to such a sucking-pig nicety, that its own parent, like Saturn, longs to eat it up with more than kisses.

\end{document}

字体示例

答案3

要使用 IM Fell 类型,您可以设置 fontspec 不仅使用其额外的连字符,还可以使用其光学尺寸:

\documentclass{article}
\usepackage{fontspec,microtype}

\setmainfont{IMFe}[%
  UprightFont = *PIrm29C,
  ItalicFont = *PIit29C,
  Extension = .otf,
  Ligatures = {Common, Rare},
  Style = {Historic, Swash},
  UprightFeatures={
    SizeFeatures={
      {Size={-12.59},     Font=*PIrm29C}, % De Walpergen Pica = 12.5pt
      {Size={12.6-15.25}, Font=*ENrm29C}, % English = 13.5pt
      {Size={15.26-18.99},Font=*GPrm29C}, % Great Primer = 17pt
      {Size={19-29.99},   Font=*DPrm29C}, % Double Pica = 21pt
      {Size={30-43.49},   Font=*FCrm29C}, % French Canon = 39pt
      {Size={43.5-},      Font=*TLrm29C}, % Three Line Pica = 48pt
    },
  },
  ItalicFeatures={
    SizeFeatures={
      {Size={-12.59},     Font=*PIit29C}, % De Walpergen Pica = 12.5pt
      {Size={12.6-15.25}, Font=*ENit29C}, % English = 13.5pt
      {Size={15.26-18.99},Font=*GPit29C}, % Great Primer = 17pt
      {Size={19-29.99},   Font=*DPit29C}, % Double Pica = 21pt
      {Size={30-},        Font=*FCit29C}, % French Canon = 39pt
    },
  },
]

\begin{document}

Associated facts stray speciously.

1234567890

\end{document}

如果你正在寻找其他提供长 ſ 的字体,Junicode是另一个候选,具有大量可选连字符:

\documentclass{article}
\usepackage{fontspec,microtype}

\setmainfont{Junicode}[
  Ligatures = {Common, Rare, Historic},
  Style = {Historic},
  Numbers = {Lowercase, Proportional}
]

\begin{document}

Associated facts stray speciously.

1234567890

\end{document}

Junicode 示例

相关内容