答案1
使用支持希伯来语斜体字型的字体,例如 Culmus 字体:
\documentclass[12pt]{article}
\usepackage[bidi=default, english]{babel}
\usepackage{fontspec}
\usepackage{parskip}
\babelprovide[import, main]{hebrew}
\defaultfontfeatures{ Ligatures = TeX, Scale = MatchUppercase }
\babelfont{rm}[Scale = 1.0, Ligatures = Common, Language = Default]{TeX Gyre Bonum}
\babelfont{sf}[Ligatures = Common, Language = Default]{TeX Gyre Heros}
\babelfont{tt}[Language = Default]{Inconsolatazi4}
\babelfont[hebrew]{rm}[Language = Default]{David CLM}
\babelfont[hebrew]{sf}[Language = Default]{Miriam CLM}
\babelfont[hebrew]{tt}[Language = Default]{Miriam Mono CLM}
\begin{document}
שלום עולם
\textit{שלום עולם}
\end{document}
这种特殊的字体将其斜体从右向左倾斜。如果您希望从左向右倾斜(与拉丁文字和许多以色列文字处理器相匹配),请使用FakeSlant
。在这里,我将其定义为倾斜字体(\slshape
或\textsl
):
\documentclass[12pt]{article}
\usepackage[bidi=default, english]{babel}
\usepackage{fontspec}
\usepackage{parskip}
\babelprovide[import, main]{hebrew}
\defaultfontfeatures{ Ligatures = TeX, Scale = MatchUppercase }
\defaultfontfeatures[DavidCLM]{
UprightFont = {*-Medium},
BoldFont = {*-Bold},
SlantedFont = {*-Medium},
BoldSlantedFont = {*-Bold},
SlantedFeatures = {FakeSlant = 0.15},
Extension = {.otf}
}
\babelfont{rm}[Scale = 1.0, Ligatures = Common, Language = Default]{TeX Gyre Bonum}
\babelfont{sf}[Ligatures = Common, Language = Default]{TeX Gyre Heros}
\babelfont{tt}[Language = Default]{Inconsolatazi4}
\babelfont[hebrew]{rm}[Language = Default]{DavidCLM}
\babelfont[hebrew]{sf}[Language = Default]{Miriam CLM}
\babelfont[hebrew]{tt}[Language = Default]{Miriam Mono CLM}
\begin{document}
שלום עולם
\textsl{שלום עולם}
\end{document}
答案2
这在稳定的 Debian 系统上可以正常工作 - 尽管我不得不使用\setmainfont{David CLM}
( Debian 中\setmainfont{David}
没有David
可用的字体,只有David CLM
)