%导言区
\documentclass[10pt]{article}%normal size的大小10pt
\usepackage{ctex}
\newcommand{\myfont}{\textit{\textsf{Fancy text}}}%格式与内容分离
%正文区(文稿区)
\begin{document}
%字体族设置(罗马体、无衬线字体、打字机字体)
\textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}
{\rmfamily Roman Family}{\sffamily Sans Serif Family} {\ttfamily Typewriter Family}
%大括号用于限定作用范围
%字体系列设置(粗细、宽度)
\textmd{Medium Series} \textbf{Boldface Series}
{\mdseries Medium Series} {\bfseries Boldface Series}
%字体形状(直立、斜体、伪斜体、小型大写)
\textup{Upright Shape} \textit{Italic Shape}
\textsl{Slanted Shape} \textsc{Small Caps Shape}
{\upshape Upright Shape} {\itshape Italic Shape}
{\slshape Slanted Shape} {\scshape Small Caps Shape}
%中文字体
{\songti 宋体} \quad {\heiti 黑体} \quad {\fangsong 仿宋} \quad {\kaishu 楷书} %quad表示空格
中文字体的\textbf{粗体}与\textit{斜体}
%字体大小
%可参考ctex宏集手册
{\tiny Hello}\\
{\huge Hello}\\
%中文字号设置命令
\zihao{5} 你好!
\myfont
\end{document}
运行结果