3

I have defined a mainfont, but have further defined its italics to come from a different font. My question: What is the simplest way to get the "original" main font back just for numbers?

I wish to set up my document with a good serif font with old style numbers. But I also need that font to have well-behaved stacking diacritics for italics. Finding that apparently simple combination is proving quite difficult: my preferred fonts with old-style numbers misbehave with diacritics; the best behaved fonts for diacritics lack old-style numbers.

So I have come up with this dodge:

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}[
    ItalicFont=Gentium Plus Italic,
    Numbers=OldStyle
]

\begin{document}

In 2013 it \textit{looks} new, but in \textit{2019} it won't.

\end{document}

But it leads to this result:

result

I will only rarely need to use italics where numbers are involved. Thus my question: what is the simplest way of pulling the italics old-style numbers from (in this case) TeX Gyre Pagella (the "original" main font), rather than from Gentium Plus (the italics partner)? (I have looked at one or two other Q&As, but the discussions I have found don't quite address this specific issue.)


Update - I haven't been able to crack this one with my neophyte knowledge of TeX. I have now run across these Q&As which either pose a related problem, or suggest a possible approach:

Along with a couple of commentators to this question, I'm still interested in whether any flavour of TeX can solve this general problem, and if so ... how!

  • I installed Gentium Plus, but it doesn't appear to have old style numerals. – egreg Feb 27 '16 at 14:22
  • Thanks for checking, egreg - but that's my point! I think I see another possibility though. Perhaps I need to say more about my "use case". About to post a "selfie". :) – Dɑvïd Feb 27 '16 at 14:31
  • I would be interested in a more general answer to that question too, if anyone has the skill to produce it (if even possible without too much hassle). I have a font which is just perfect for everything except numbers and for which I would like a substitute. – ienissei Feb 27 '16 at 19:25
  • @ienissei I too would be interested in a more general answer. Even in OpenType, some typefaces have their old style figures in a separate, small caps font (e.g., Schneidler, from URW++). It would be desirable not to have to surround all numbers with \textsc{} in the source. – Thérèse Feb 28 '16 at 20:26
1

For my immediate needs, the following "solution" suffices.

Since the "well-behaved diacritics" are only needed for "scientific" transliterations, is there any reason why I shouldn't use this work-around:

\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}[Numbers=OldStyle]
\newfontfamily{\Tr}{Gentium Plus Italic}

\begin{document}

In 2013 it \textit{looks} new, but in \textit{2019} it won't.

Using `italics' gives me \textit{hå̄ʾå̄rɛṣ}, but using the \texttt{Tr} `font family', with well-behaved diacritics, I get {\Tr hå̄ʾå̄rɛṣ}.

TeXGP \textit{italics} but GenPlus {\Tr italics}.

\end{document}

This allows for "mainfont" italics (which include old-style numbers) for general "italics" use, but the "well-behaved" font for transliterations. Here's the new result:

new result

  • The two italics are to similar to my liking. One can see that they are different, but it is not enough to show that it is by purpose. – Ulrike Fischer Feb 27 '16 at 16:08

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.