我如何才能知道哪些字体有格鲁吉亚字母?基本上,我想将我的序言规范替换DejaVuSerif
为其他内容,以便:
让我继续写英语和格鲁吉亚语(也许还有俄语)
给我小写字母
看起来不像青少年
DejaVuSerif
(其他信息。(a)我知道你可以通过缩小全大写字母来伪造小写字母,但我有理由避免这样做。(b)我是一个字体傻瓜。我下载并按照自述说明进行操作http://www.fonts2u.com/tinano.font但无法让 TeXShop 找到已安装的字体。DejaVuSerif 在我的设置中一定是免费提供的。)
我正在通过 XeLaTeX 在 TeXShop 中编译下面的代码。
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage[georgian]{babel}
\usepackage{fontspec}
\setmainfont
[Extension=.ttf,
UprightFont={*},
BoldFont={*-Bold},
ItalicFont={*-Italic},
BoldItalicFont={*-BoldItalic},]
{DejaVuSerif}
\begin{document}
თქვენ თაგვებს ჩვენ ბუები მოგიტყუებივართ
DejaVuSerif doesn't have \sc small caps
\end{document}
答案1
你应该将每种语言在其环境中分开。这样你也可以为格鲁吉亚语(也许还有俄语)选择不同的字体。
我提供\textgeorgian
(实际上babel
是提供,我只是对它进行修补以使用正确的字体)和georgian
;前者用于短语,后者用于块。俄语也类似。
\documentclass{book}
\usepackage[georgian,russian,english]{babel}
\usepackage{fontspec}
\usepackage{xpatch}
\setmainfont{Libertinus Serif} % or whatever you prefer
\newfontfamily{\georgianfont}[
Scale=MatchLowercase,
NFSSFamily=georgian,
Extension=.ttf,
UprightFont={*},
BoldFont={*-Bold},
ItalicFont={*-Italic},
BoldItalicFont={*-BoldItalic},
]{DejaVuSerif}
\xpatchcmd{\georgiantext}
{\selectfont}
{\fontfamily{georgian}\selectfont}
{}{}
\newenvironment{georgian}
{\begin{otherlanguage*}{georgian}}
{\end{otherlanguage*}}
\newcommand{\textrussian}[1]{\foreignlanguage{russian}{#1}}
\begin{document}
We can also have \textsc{Small Caps}
\textgeorgian{თქვენ თაგვებს ჩვენ ბუები მოგიტყუებივართ} and English.
We can also have \textsc{Small Caps}.
\textrussian{Этот текст написан на русском языке}
\begin{georgian}
თქვენ თაგვებს ჩვენ ბუები მოგიტყუებივართ
\end{georgian}
\end{document}