我正在寻找支持字距调整的西里尔文 ttf/otf 字体。以下是 XeLaTeX 示例文档:
\documentclass{article}
\usepackage{fontspec} % enagles loading of OpenType fonts
\usepackage{polyglossia} % support for languages
% fonts:
\defaultfontfeatures{Scale=MatchLowercase,Mapping=tex-text} % without this XeLaTeX won't turn "--" into dashes
% Russian/English document:
\usepackage{xecyr}
\newfontfamily\cyrillicfont{NotoSans}
\setmainlanguage{russian} % \setdefaultlanguage{russian} is obsolete and not needed
\setotherlanguage[variant=american]{english}
\setlength{\parindent}{0pt}
\setcounter{secnumdepth}{-1}
\usepackage[dvipsnames]{xcolor}
\usepackage{titlesec}
\titleformat{\section}[block]{\color{Blue}\Large\bfseries}{}{1em}{}
\begin{document}
\section{Sans-serif}
\setmainfont{NotoSans}
\newfontfamily\cyrillicfont{NotoSans}
\textbf{NotoSans}:\\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\setmainfont{Linux Biolinum O}
\newfontfamily\cyrillicfont{Linux Biolinum O}
\textbf{Linux Biolinum O}: \\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\setmainfont{DejaVu Sans}
\newfontfamily\cyrillicfont{DejaVu Sans}
\textbf{DejaVu Sans}: \\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\setmainfont{Arial}
\newfontfamily\cyrillicfont{Arial}
\textbf{Arial}: \\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\setmainfont{PT Sans}
\newfontfamily\cyrillicfont{PT Sans}
\textbf{PT Sans}: \\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\setmainfont{Trebuchet MS}
\newfontfamily\cyrillicfont{Trebuchet MS}
\textbf{Trebouchet MS}: \\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\setmainfont{FreeSans}
\newfontfamily\cyrillicfont{FreeSans}
\textbf{FreeSans}: \\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\section{Serif}
\setmainfont{Linux Libertine O}
\newfontfamily\cyrillicfont{Linux Libertine O}
\textbf{Linux Libertine O}: \\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\setmainfont{DejaVu Serif}
\newfontfamily\cyrillicfont{DejaVu Serif}
\textbf{DejaVu Serif}: \\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\setmainfont{Minion Pro}
\newfontfamily\cyrillicfont{Minion Pro}
\textbf{Minion Pro}: \\
\underline{Ta}ble? \\
\underline{Та}блица?
\medskip
\end{document}
结果是:
所以看起来只Trebouchet MS
支持俄语的字距调整。怎么会这样?我做错了什么吗?
答案1
这是我的测试:
\documentclass{article}
\usepackage[a4paper,margin=1cm]{geometry}
\usepackage{fontspec} % enagles loading of OpenType fonts
\usepackage{polyglossia} % support for languages
\setmainlanguage{russian}
% default font to keep fontspec happy
\setmainfont{PT Sans}
\newfontfamily\cyrillicfont{PT Sans}
\setlength{\parindent}{0pt}
\setcounter{secnumdepth}{-1}
\newcommand{\testTa}[1]{%
\par\let\cyrillicfont\relax
\newfontfamily\cyrillicfont{#1}\cyrillicfont
#1 (\fontname\font)\par
\sbox0{Та}Kerned width=\the\wd0\par
\sbox0{\mbox{Т}\mbox{а}}Unkerned width=\the\wd0\par
Та\par
\mbox{Т}\mbox{а}\par\medskip}
\begin{document}
\section{Sans serif}
\testTa{Linux Biolinum O}
\testTa{DejaVu Sans}
\testTa{Arial}
\testTa{PT Sans}
\testTa{FreeSans}
\section{Serif}
\testTa{Linux Libertine O}
\testTa{DejaVu Serif}
\testTa{Minion Pro}
\end{document}
您会看到,在无衬线字体中,Arial 和 PT Sans 字距是相同的。对于衬线字体,使用 Minion Pro 来调整字距。
使用 Trebuchet MS 进行的进一步测试(未显示)表明此字体不会调整该对的字距。应测试其他字符对以获得更显著的结果。