Debian Linux 中 ctex 字体设置的问题

urglacier 2011-01-03

Debian Linux 中 ctex 字体设置出现类似错误:
ERROR: Font \@tempfontb=[simkai.ttf]/ICU at 10.54pt not loadable: Metric (TFM) file or installed font not found.

1、通过 fc-list :lang-zh 参看字体名称

2、修改/usr/local/texlive/2010/texmf-dist/tex/latex/ctex/cfg/ctex.cfg为:


% ctex.cfg: for user's customized definitions

% vim:ft=tex

\setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi_GB2312}]{SimSun}

\setCJKsansfont{SimHei}

\setCJKmonofont{FangSong_GB2312}

 

\setCJKfamilyfont{zhsong}{SimSun}

\setCJKfamilyfont{zhhei}{SimHei}

\setCJKfamilyfont{zhkai}{KaiTi_GB2312}

\setCJKfamilyfont{zhfs}{FangSong_GB2312}

 

\newcommand*{\songti}{\CJKfamily{zhsong}} % 宋体

\newcommand*{\heiti}{\CJKfamily{zhhei}}   % 黑体

\newcommand*{\kaishu}{\CJKfamily{zhkai}}  % 楷书

\newcommand*{\fangsong}{\CJKfamily{zhfs}} % 仿宋

\newcommand*{\lishu}{\CJKfamily{zhli}}    % 隶书

\newcommand*{\youyuan}{\CJKfamily{zhyou}} % 幼圆

 

\endinput

______________________________________________________

测试文件:\documentclass[nofonts]{ctexart}
\begin{document}
\Huge{你好!}
\end{document}

相关推荐