I've been using the pxfonts package to typeset my document since I liked the look of the text fonts. I now have cause to use the fontspec package but now my favoured pxfonts don't load. I'm getting the LaTeX warning that it is substituting "EU2/lmr/m/n" for "EU2/pxr/m/n".

I suspect the issue is that I'm too new to fontspec and don't know what I'm doing. (Also using LuaLaTeX for the first time, but I think that's not so much the cause of the problem.)

What's the right way to load these "pxr" fonts using fontspec?... Clearly the pxfonts package is not it. (I will have a very small amount of maths also, so I'll need the relevant maths fonts loaded too.)

Sorry if this is well trodden ground - I looked at other questions that arose when I searched for "pxfonts fontspec" but I couldn't make enough sense of what was being said to answer my question.

  • The pxfonts are not usable with fontspec. – egreg Nov 22 '14 at 10:37
  • Really? So the act of loading fontspec now prevents me from using families of fonts that I could load using NFSS? – Martyn Quick Nov 22 '14 at 11:11

pxfonts is not “officially” deprecated, but it is so “typographically”, because there are several flaws in its design. Such flaws have brilliantly been fixed by Michael Sharpe who provided the package newpxtext and newpxmath instead.

However, newpxtext isn't compatible with fontspec, because it's based on “classical” 256 slot fonts.

You can obtain a very similar result using newpxmath for math fonts and a Palatino based text font:


\usepackage{newpxmath} % math font is Palatino compatible

\setmainfont{TeX Gyre Pagella} % or another Palatino OpenType clone
  • Thanks that's helpful. I hadn't realized that TeX Gyre Pagella was a font that looked very similar to the pxr fonts. – Martyn Quick Nov 22 '14 at 11:29
  • @egreg Couldn't you load the TeX Gyre Pagella Unicode math font? – Joseph Wright Nov 22 '14 at 12:22
  • @JosephWright Of course, but it's not the same as newpx – egreg Nov 22 '14 at 12:27
  • Why use another font, if there is one specifically designed for use together with the main font? THe only thing I change is the mathcal and mathscr fonts, as i really don't like the ones in tex gyre pagella math. I take them from XITS Math instead – MaxNoe Nov 22 '14 at 21:24

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.