字体功能 +frac 未应用于 EBGaramond italic

字体功能 +frac 未应用于 EBGaramond italic

我在使用斜体文本功能时遇到了问题+frac,尽管我觉得它应该可以工作。除非我强制将文本转换为 ,否则该功能似乎无法正确应用\upshape

它对某些分数(1/2)有效,但对其他分数(7/8)无效。

r

梅威瑟:

\documentclass{article}

\usepackage{ebgaramond}

\newcommand\fracA[1]{{\addfontfeatures{RawFeature=+frac}#1}}
\newcommand\fracB[1]{{\upshape\addfontfeatures{RawFeature=+frac}#1}}

\begin{document}

fracA doesn't change font shape:

\begin{enumerate}
\item Some regular text with a fraction: \fracA{7/8}
\item \emph{Some text in italics with a fraction: \fracA{7/8}} --- this doesn't seem to apply the +frac feature?
\item Some regular text with a fraction: \fracA{1/2}
\item \emph{Some text in italics with a fraction: \fracA{1/2}} --- this does work, the fraction is italic.
\end{enumerate}

fracB forces upshape, which makes the frac work but loses the italics:

\begin{enumerate}
\item Some regular text with a fraction: \fracB{7/8}
\item \emph{Some text in italics with a fraction: \fracB{7/8}}
\item Some regular text with a fraction: \fracB{1/2}
\item \emph{Some text in italics with a fraction: \fracB{1/2}}
\end{enumerate}

\end{document}

该功能确实适用于所有版本,包括斜体:

/usr/local/texlive/2019/texmf-dist/fonts/opentype/public/ebgaramond $ otfinfo -f * | ack frac
EBGaramond-Bold.otf:frac    Fractions
EBGaramond-BoldItalic.otf:frac  Fractions
EBGaramond-ExtraBold.otf:frac   Fractions
EBGaramond-ExtraBoldItalic.otf:frac Fractions
EBGaramond-Italic.otf:frac  Fractions
EBGaramond-Medium.otf:frac  Fractions
EBGaramond-MediumItalic.otf:frac    Fractions
EBGaramond-Regular.otf:frac Fractions
EBGaramond-SemiBold.otf:frac    Fractions
EBGaramond-SemiBoldItalic.otf:frac  Fractions

答案1

尽管 Georg Duffner 的 EB Garamond 支持斜体中的任意分数,但 Octavio Pardo 在 TeX Live 中对其进行的重新制作仅支持少数预制分数(½、¼ 和 ¾)。

相关内容