I need to create a document using a few fonts. Two or three will be metafont
fonts used for most of the document in a Latin-based language, and then I need to use another font for a SE Asian language (so probably a TrueType font or similar as I can't find any TeX-based fonts that work with SE Asian languages). As I understand it, I can combine fonts quite easily for Latin-based languages:
\documentclass{book}
\usepackage[T1]{fontenc}
\begin{document}
Regular {\fontfamily{pzc}\selectfont and special} fonts.
\end{document}
gives me the desired effect:
but as soon as I add fontspec
, which is required by polyglossia
, the Zapf Chancery (pzc
) font no longer works:
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{polyglossia}
\newfontfamily\thaifont{Norasi}
\setdefaultlanguage{english}
\setotherlanguage{thai}
\begin{document}
English regular {\fontfamily{pzc}\selectfont and special} fonts.\\
\begin{thai}ตัวพิมพ์ภาษาไทย\end{thai}
\end{document}
produces:
Is there any way to avoid this problem? To be clear, I think I must use polyglossia
to use SE Asian languages, and I must use multiple metafont
fonts as well.
Answer
As pointed out by Ulrike Fischer, and further elucidated by egreg, \fontencoding
needs to be specified when using metafont fonts under fontspec
because the latter expects EU1
whereas the former needs T1
(I'm summarising from what I understand about fontencoding
, which is not much).
\documentclass{book}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{polyglossia}
\newfontfamily\thaifont{Norasi}
\setdefaultlanguage{english}
\setotherlanguage{thai}
\begin{document}
English regular {\fontencoding{T1}\fontfamily{pzc}\selectfont and special} fonts.\\
\begin{thai}ตัวพิมพ์ภาษาไทย\end{thai}
\end{document}
yields the correct output:
fontencoding
is indeed the issue as @egreg points out,fontspec
expectsEU1
. Since you answered first, if you want to convert your comment to an answer, I'll mark yours as the answer. Otherwise, I'll give it to @egreg.cmr
andpzc
are not Type1, but Norasi obviously is.T1
so you are using type1 versions of the fonts unless you don't have them. I don't know ifpzc
is even available as metafont.