4

I'm running into a problem when loading polyglossia with the Lucida fonts that I bought from pctex.com. I compile with Xelatex.

\usepackage[romanfamily=bright]{lucimatx}

\usepackage{polyglossia}

\setdefaultlanguage{english}

For some reason polyglossia always seems to reset the font to the standard latex font. Any idea how to solve this problem?

2

The polyglossia package needs fontspec, but the Lucida fonts you have are only in T1 encoding, while the encoding required for using fontspec is EU1 (EU2 when LuaLaTeX is used).

Thus loading the two packages in that order overrides the font selections made by lucimatx, because fontspec does its own.

You could change the loading order:

\documentclass{article}

\usepackage[no-math]{fontspec} % load fontspec
\let\hbar\undefined % to avoid an error message
\usepackage[romanfamily=bright]{lucimatx}
\AtBeginDocument{\fontencoding{T1}\selectfont} % set the font encoding

\usepackage{polyglossia}

\setdefaultlanguage{english}

\begin{document}
abc
\end{document}

I don't think you gain anything with this. My suggestion is to use pdflatex and babel:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}

\usepackage[romanfamily=bright]{lucimatx}

\begin{document}
abc
\end{document}

Actually babel for English only is not required.

|improve this answer|||||
  • You first workaround indeed does not work. Somwhere I read that one should use polyglossia with Xelatex? In fact babel seems to work as well. For some reason I used polyglossia but can't remember exactly why right now. – user41657 Nov 25 '13 at 12:03

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.