字体
\documentclass{article}
\usepackage{ctex}
\newcommand{\myfont}{\textit{\textbf{\textsf{Fancy Text}}}}
\begin{document}
\myfont 自定义格式
% 字体族设置(罗马字体,无衬线字体,打字机字体)
\textrm{Roman Family} \textsf{Sans Serif Family} \texttt{Typewriter Family}
\rmfamily Roman Family {\sffamily Sans Serif Family} {\ttfamily Typewriter Family}
% 字体系列设置(粗细,宽度)
\sffamily
\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 宋体} {\heiti 黑体} {\kaishu 楷体} {\fangsong 仿宋}
中文字体的\textbf{粗体}与\textit{斜体}
% 字体大小
{\tiny Hello}
{\scriptsize Hello}
{\footnotesize Hello}
{\small Hello}
{\normalsize Hello}
{\large Hello}
{\Large Hello}
{\LARGE Hello}
{\huge Hello}
{\Huge Hello}
% 中文字号设置
\zihao{0} 你好!
\zihao{-1} 你好!
\zihao{-2} 你好!
\zihao{1} 你好!
\zihao{2} 你好!
\zihao{3} 你好!
\end{document}