我想将我的投影仪中的主字体设置为“Consolas”,我喜欢这样做:
\documentclass{beamer}
\usepackage{fontspec}
\usetheme{Warsaw}
\begin{document}
\setmainfont{Consolas}
\begin{frame}
we discuss the ambiguities of existing security definitions and then provide a general framework for defining AKE security when involve strong adversary capabilities
\end{frame}
\end{document}
但编译之后字体没有变化,和设置主字体之前一样,这是什么原因呢?
答案1
目前,您只设置了文档的主字体。您需要指定无衬线字体系列,因为这就是 »投影机« 类最终用途。
\documentclass{beamer}
\usepackage{fontspec}
\usetheme{Warsaw}
%\setmainfont{Consolas}
\setsansfont{Consolas}
\begin{document}
\begin{frame}
we discuss the ambiguities of existing security definitions and then provide a general framework for defining AKE security when involve strong adversary capabilities
\end{frame}
\end{document}
答案2
默认情况下beamer
使用无衬线字体。您可以直接设置,而\setsansfont
不是\setmainfont
,或者您可以继续\setmainfont
使用serif
字体主题beamer
。下面是后者:
\documentclass{beamer}
\usepackage{fontspec}
\setmainfont{Consolas}
\usetheme{Warsaw}
\usefonttheme{serif}
\begin{document}
\begin{frame}
We discuss the ambiguities of existing security definitions and then
provide a general framework for defining AKE security when involve
strong adversary capabilities.
\end{frame}
\end{document}