使用 LaTeX 的“字体形状未定义”-twentysecondcv.cls

Ana*_*sol 5 fonts xelatex

我正在使用 Texlive2016 使用 twentysecondcv.cls 做我的简历,但我的字体形状有问题。它显示了一个不太清楚的默认字体,并且无法识别此处的输入代码 ClearSan.sty,它在 .cls 文件中声明为提供包。我真的不知道如何让 XeLatex 运行它。我发现很多关于字体形状的页面未定义,但我还没有找到解决方案。请如果有人知道如何解决这个问题,我将不胜感激。对我来说不一定要使用 ClearSans,任何 sanserif 都应该比我的输出文件更好。

提前致谢

这里的文件

所有文件

在控制台中出现这个

 Some font shapes were not available, defaults substituted.
Run Code Online (Sandbox Code Playgroud)

作者的二十秒cv.cls 输出文件具有我想要的 cv sanserif 字体形状

Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2016basic/texmf-dist/tex/latex/base/size10.clo))

LaTeX Warning: You have requested document class `twentysecondcv',
               but the document class provides `ClearSans'.

Document Class: ClearSans 
(./ClearSans.sty



LaTeX Font Warning: Font shape `T1/ClearSans(0)/m/n' undefined
(Font)              using `T1/cmr/m/n' instead on input line 13.

LaTeX Font Warning: Font shape `T1/ClearSans(0)/m/sc' undefined
(Font)              using `T1/ClearSans(0)/m/n' instead on input line 56.

LaTeX Font Warning: Font shape `EU1/FontAwesome(0)/m/sc' undefined
(Font)              using `EU1/FontAwesome(0)/m/n' instead on input line 56.

LaTeX Font Warning: Font shape `T1/ClearSans(0)/m/it' undefined
(Font)              using `T1/ClearSans(0)/m/n' instead on input line 72.

LaTeX Font Warning: Some font shapes were not available, defaults substituted.
Run Code Online (Sandbox Code Playgroud)

Has*_*hes 5

你的字体包写错了\usepackage{fontspec}你应该把包称为\usepackage[T1]{fontenc},试试这个它应该将文档的字体更改为sanserif。此外,如果不需要,您也可以删除 setmainfont。

\documentclass[]{twentysecondcv}
 \usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
\renewcommand{\familydefault}{\sfdefault}
Run Code Online (Sandbox Code Playgroud)

这里是实现

\documentclass[]{twentysecondcv}
 \usepackage[utf8]{inputenc}
 \usepackage[T1]{fontenc}
\renewcommand{\familydefault}{\sfdefault}


\setmainfont[
   Path = /Library/Fonts/,
  UprightFont = ClearSans-Regular ,
  BoldFont = ClearSans-Bold ,
  ItalicFont = ClearSans-Italic ,
  Extension = .ttf
]{ClearSans.ttf}
\hyphenation{Geoscience behaviour surface des-truc-tor}
Run Code Online (Sandbox Code Playgroud)

我已经为你编译了文件,在这里你可以下载完整的 tex 简历,只需更改个人资料图片,解压缩文件和你的好去链接