My problem is that the fonts I want to use don't have optical sizes or medium cuts available and the slimming of hairlines at small text sizes disturbs me. Since the fake boldening of fontspec
doesn't work with lualatex
, I've settled with the technique described here: https://tex.stackexchange.com/a/34290/75284
A MWE:
% !TEX program = lualatex
\documentclass[12pt]{article}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\newcommand\optsize[1]{%
\pdfextension literal direct {2 Tr 0.15 w}%
#1%
\pdfextension literal direct {0 Tr 0 w}%
}
\begin{document}
R\textsubscript{R} R\textsubscript{\optsize{R}}
\end{document}
My question: Is there a way of using this custom command for a certain font size range automatically? E.g. fontspec
provides this:
UprightFeatures={
SizeFeatures={
{Size={-9},Font=Normalfont},
{Size={9-},Font=SmallTextFont}
}
}
but I couldn't find a way to inject my custom command there to be used. Maybe there is another way using the lua backend.