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

1 Answer 1

2

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}
1
  • Got it!! The key is NFSSFamily!!! Thanks!
    – Eric
    Feb 21, 2017 at 13:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .