xeCJK 使用自定义字体时显示空白字符

xeCJK 使用自定义字体时显示空白字符

我正在使用 xeLatex 和包xeCJK来显示日语字符。当我使用字体时,SimSun它运行完美。但是当我使用自定义字体时,什么都没有显示。

我想要使​​用的字体是Togalite,我有togalite-regular.otf文件。我使用 Windows 字体预览安装了该字体。

以下是我的序言:

\documentclass[10pt,a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage[french]{babel}
\usepackage{lmodern}
\usepackage[top=1cm,left=1cm,right=1cm,bottom=1cm]{geometry}
\usepackage{wrapfig}
\usepackage{setspace}
\usepackage{rotating}
\usepackage{tikzpagenodes}
\usepackage{xeCJK}

\setCJKmainfont{Togalite}
% I also tried
% \setCJKmainfont{トガリテ regular}
% \setCJKmainfont{togalite-regular.otf}

以下是输出fc-list | Select-String -Pattern "togalite"

C:/Users/louisld/AppData/Local/Microsoft/Windows/Fonts/togalite-regular.otf: Togalite,繝医ぎ繝ェ繝・Togalite regular,繝医ぎ繝ェ繝・regular:style=regular

我还将该togalite-regular.otf文件放在与我的 tex 文件相同的文件夹中。

fontspec 日志:

Package fontspec Info: Could not resolve font "Togalite/BI" (it probably
(fontspec)             doesn't exist).


Package fontspec Info: Could not resolve font "Togalite/B" (it probably
(fontspec)             doesn't exist).


Package fontspec Info: Could not resolve font "Togalite/I" (it probably
(fontspec)             doesn't exist).


Package fontspec Info: Font family 'Togalite(0)' created for font 'Togalite'
(fontspec)             with options [Script={CJK}].
(fontspec)              
(fontspec)              This font family consists of the following NFSS
(fontspec)             series/shapes:
(fontspec)              
(fontspec)             - 'normal' (m/n) with NFSS spec.:
(fontspec)             <->"Togalite/OT:script=hani;language=dflt;"
(fontspec)             - 'small caps'  (m/sc) with NFSS spec.: 

相关内容