Overleaf 加载自定义字体
fontspec
-
上传字体到 Overleaf 项目。
- 如果字体有 static 和 variable 两种版本,上传 static 版本。
- 建议按照字体系列创建字体目录。
-
配置 fontspec:
\usepackage{fontspec} \setmainfont{Brygada1918}[ Path=./BrygadaFontFiles/, Extension = .ttf, UprightFont=*-Regular, BoldFont=*-Bold, ItalicFont=*-Italic, BoldItalicFont=*-BoldItalic ] % \setsansfont{xxx}[xxx] % \setmonofont{xxx}[xxx]
参考:Using fonts not installed on Overleaf's servers: Google Fonts example | Overleaf
ctex
需要设置 ctex-fontset-xxx.def 文件指向本地字体。
参见:

浙公网安备 33010602011771号