0

When I load TeX Gyre Pagella using fontspec's setmainfont command and try to use a hacek above an i, it is misplaced.

bad hacek i

The reason I am using fontspec is because I want old style numbers to be the default, and I can set that with fontspec's setmainfont.

If I instead load TeX Gyre Pagella using fontenc and tgpagella, the hacek is aligned properly.

good hacek i

However, if I do this, I have to manually specify that I want to use old style numbers using \oldstylenums{}, which is a real pain (including specifying them in things like enumerated lists, page numbers, etc., which requires manually tweaking a bunch of things I'd rather not have to mess with).

Is there a way to load the correct glyph while still using fontspec? Or else some way to manually adjust it to look right?

MWE:

\documentclass{article}
%\usepackage[T1]{fontenc}
%\usepackage{tgpagella} % These work for \v{\i}, but no default old style numbers

\usepackage{fontspec} \setmainfont[Numbers=OldStyle]{TeX Gyre Pagella} % Default old style numbers, but bad \v{\i}

\begin{document} \v{\i} \end{document}

Edit: As Thérèse's comment makes apparent, it might be relevant that I'm using XeLaTeX.

Jigsaw
  • 935
  • 2
    I can’t reproduce the problem with either luatex or xetex in an up-to-date TeX Live. – Thérèse Jul 03 '21 at 04:03
  • Hmmm... Just updated and it is working in LuaLaTeX, but still not in XeLaTeX for me. Since I'm using XeLaTeX, I'll leave this open. – Jigsaw Jul 03 '21 at 04:14
  • 2
    I also can't reproduce. Do you have more than one version of the font installed? (i.e., in TeX tree and system font.) – David Purton Jul 03 '21 at 04:16
  • Not sure—how could I tell? – Jigsaw Jul 03 '21 at 04:17
  • 1
    I guess that depends on your OS. But assuming file names are the same (not necessarily true) do a search for texgyrepagella-regular.otf – David Purton Jul 03 '21 at 04:19
  • 1
    See https://tex.stackexchange.com/a/399585/87678 for how to find what font xelatex is using – David Purton Jul 03 '21 at 04:22
  • Okay, when I do this I see that the working one (fontenc + tgpagella packages) seems to load Simple Font "qplr," while the incorrect one loads texgyrepagella-regular.otf. I'm guessing this means it is installed twice and I should get rid of the system font?

    Edit: Yup, that fixed it. This could be closed or deleted now; not sure which would be best.

    – Jigsaw Jul 03 '21 at 04:36
  • I don't think the tgpagella package is using fontspec at all. qplr is an 8bit font. If lualatex is working, you want to compare which font that is using with what xelatex is picking up. – David Purton Jul 03 '21 at 04:45
  • I can't reproduce the issue on my system. TeX Gyre Pagella Version 2.501;PS 2.501;ffdkm 0.1 – egreg Jul 03 '21 at 06:51
  • @Jigsaw you certainly to not want to use [T1]{fontenc} with xelatex (all hyphenation will be wrong for any words with non ascii letters) if using xelatex you need to use teh opentype version of the font. texgyrepagella-regular.otf (but check you don't have an old copy installed sonewhere masking the version that comes with texlive) – David Carlisle Jul 03 '21 at 09:56
  • 1
    add also \XeTeXtracingfonts=1 to your document and check what the log says about the actual font uses – Ulrike Fischer Jul 03 '21 at 10:29

0 Answers0