![如何将 Modern Resume 中的字体更改为 Calibri 字体](https://linux22.com/image/434655/%E5%A6%82%E4%BD%95%E5%B0%86%20Modern%20Resume%20%E4%B8%AD%E7%9A%84%E5%AD%97%E4%BD%93%E6%9B%B4%E6%94%B9%E4%B8%BA%20Calibri%20%E5%AD%97%E4%BD%93.png)
我喜欢这种modern resume
风格。我想使用它,但我必须以Calibri
字体形式提交。如何更改文档中的所有字体?
恢复:https://www.overleaf.com/project/60b6e7918740f511dfa13e9b 代码:
\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman
\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage{color}
\usepackage[scale=0.79]{geometry} % Reduce document margins
\firstname{Shane} % Your first name
\familyname{Thirkell} % Your last name
% All information in this block is optional, comment out any lines you don't need
\title{Ocean Engineering}
\address{12 Chain Bridge Drive}{Newburyport, Massachusetts 01950}
\mobile{(978)-270-0371}
\email{$shane \textunderscore [email protected]$}
\begin{document}
\makecvtitle % Print the CV title
\section{Education}
\cventry{2015-2018}{Bachelor of Science}{University of Rhode Island}{Narragansett, RI}{\textit{GPA - 3.42}}{\bfseries Ocean Engineering, Renewable Energy Track} % Arguments not required can be left empty
%------------------------------------------------
\subsection{Junior Spring Semester Project}
\cventry{2018}{Flow Mapping (Particle Image Velocimetry)}{Research Experiment}{}{}{This was an experiment in fluid dynamics with respect to a cylinder subjected to a constant flow. The water is seeded with small particles that are illuminated by a powerful laser. A cylinder is moved mechanically in various patterns mimicking theoretical 'free vibration' due to vortex shedding. The images are processed and analyzed in MATLAB and the resulting turblence/vorticity can be visualized. The forces experienced by the body are widely applicable (energy generation, structural pile requirements). Results were used in graduate student Erdem Aktosun's research.}
\end{document}
我想将文档字体更改为calibri
。目前default fonts
是sans
或roman
。那么,我该如何calibri
在这里介绍?我尝试了以下操作,但字体没有变化。
\documentclass[11pt,a4paper,calibri]{moderncv}
答案1
由于 Calibri 字体未随标准 TeX 发行版一起发布,因此您需要将字体的副本上传到 Overleaf 中的项目文件夹。我的 Calibri 版本似乎有 4 个字体:Calibri.ttf
、Calibri Italic.ttf
和。您需要上传所有这些字体,并从名称中删除空格(如果它们在您的系统中显示为空格)。将字体上传到 Overleaf 是否违反字体的许可协议由您决定。Calibri Bold.ttf
Calibri Bold Italic.ttf
然后使用 LuaLaTeX 编译您的文档并使用fontspec
设置字体。您必须这样做后正在加载moderncvstyle
\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman
\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{black} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'
\usepackage{fontspec}
\setsansfont[BoldFont={CalibriBold.ttf},ItalicFont=CalibriItalic.ttf,BoldItalicFont=CalibriBoldItalic.ttf]{Calibri.ttf}
\usepackage{lipsum} % Used for inserting dummy 'Lorem ipsum' text into the template
\usepackage{color}
\usepackage[scale=0.79]{geometry} % Reduce document margins
\firstname{Shane} % Your first name
\familyname{Thirkell} % Your last name
% All information in this block is optional, comment out any lines you don't need
\title{Ocean Engineering}
\address{12 Chain Bridge Drive}{Newburyport, Massachusetts 01950}
\mobile{(978)-270-0371}
\email{shane\[email protected]}
\begin{document}
\makecvtitle % Print the CV title
\section{Education}
\cventry{2015-2018}{Bachelor of Science}{University of Rhode Island}{Narragansett, RI}{\textit{GPA - 3.42}}{\bfseries Ocean Engineering, Renewable Energy Track} % Arguments not required can be left empty
%------------------------------------------------
\subsection{Junior Spring Semester Project}
\cventry{2018}{Flow Mapping (Particle Image Velocimetry)}{Research Experiment}{}{}{This was an experiment in fluid dynamics with respect to a cylinder subjected to a constant flow. The water is seeded with small particles that are illuminated by a powerful laser. A cylinder is moved mechanically in various patterns mimicking theoretical 'free vibration' due to vortex shedding. The images are processed and analyzed in MATLAB and the resulting turblence/vorticity can be visualized. The forces experienced by the body are widely applicable (energy generation, structural pile requirements). Results were used in graduate student Erdem Aktosun's research.}
\end{document}