Open juhaszp95 opened 1 year ago
That is the correct behaviour. If you do not like it, then change the kerning. For xelatex
with a feature file
and for lualatex with:
\documentclass{article}
\setlength\parindent{0pt}
\usepackage{fontspec}
\directlua {
fonts.handlers.otf.addfeature {
name = "f5kern",
type = "kern",
data = {
["f"] = { ["5"] = 100 },
["f_f"] = { ["5"] = 100 },
},
}
}
\usepackage{libertinus-otf}
\begin{document}\Huge
f5 ff5
\addfontfeature{RawFeature=+f5kern}f5 ff5
\end{document}
Well, I guess that's a matter of taste. This solution almost works for me! But when I'm loading libertinus-otf with the [proportional]
option (which I use by default), this stops working - do you have any guess how to make this work for the "proportional 5"? (I've looked at the fontspec documentation, but without any luck.)
The proportional figures are suffixed with .fitted
in this font, so the proportional 5 is named five.fitted
. The number glyphs in fonts are generally written out so I assume that writing 5
in the addfeature code is a convenience shortcut. It would be interesting if 5.fitted
would work, too.
Many thanks, this solves my problem! five.fitted
worked, but 5.fitted
didn't, in case anyone's wondering.
Sorry to pop in with a comment so long after the main convo, but I haven't been successful in doing this adjustment with xelatex. Can you explain how to use these feature files? It's my first time hearing of them, and the fontspec docs didn't really make sense to me for this particular use.
The bug The letter 'f' and number '5' almost collide (in Libertinus Serif). (This is problematic when e.g. links have these next to each other.)
Steps to reproduce MWE (in LuaLaTeX):
Screenshot Output of the MWE: