1

I'm now using XeLaTeX and fontspec(also uses xeCJK). I use

\setmainfont{Georgia}

to set my default English font, and

\setCJKmainfont{cwTeX Q Ming}

to set my default Chinese font.

However, if I want to use the commands, such like \DeclareSymbolFont {<sym-font-name>} {<encoding>} {<family>} {<series>} {<shape>}, and assign the current font family I'm using. What name of the family should I fill into? (Also, what's the proper font-encoding? OT1?) I'd looked up the fontspec document, but didn't find the solution.

1

The internal font family name is not usable, it contains a number which can change. But you can give your font a family name (if your fontspec is not too old). The encoding with a current fontspec/LaTeX is TU, in older versions EU1.

\documentclass{article}
\usepackage{fontspec}
\setsansfont{Georgia}[NFSSFamily=Georgia]

\begin{document}
blblb \fontfamily{Georgia}\fontencoding{TU}\selectfont blblb

\end{document}
  • Got it!! The key is NFSSFamily!!! Thanks! – Eric Feb 21 '17 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.