[texhax] How to change fonts for numbers vs. letters
Philip Taylor
P.Taylor at Rhul.Ac.Uk
Tue Jan 31 11:20:13 CET 2017
On 30/01/2017 20:13, David Niklas wrote:
> I selected a cool font in Latex but the numbers are offset from each
> other. For example, the 2 is larger than the one in the number 12
> I could select another font, or repeatedly switch, but I'd like to know
> if I can use a different font for number vs. letters/punctuation.
You should look at the font properties to see if it offers a choice between lining and non-lining numerals; if it does, you may be able to instruct it to use your preferred variant. Since you are using LaTeX, of which I am completely ignorant, I cannot suggest /how/ you would "instruct it to use your preferred variant", as that is LaTeX-specific.
Alternatively, if you are using XeLaTeX, you could use \XeTeXinterchartoks and friends to elegantly handle the transition between non-numerals and numerals and back again.
Philip Taylor
More information about the texhax
mailing list