mtheme
mtheme copied to clipboard
Letter spacing small caps and all uppercase titles
As I alluded to in the comments in fix: #115, I've ben experimenting with letterspacing the small caps and all-caps sections of the theme. There have been some issues, namely microtype
cannot do fontexpansion/tracking in conjuction with xetex, it can do this with pdftex and luatex though. I intend to use the ifluatex
and ifxetex
packages to either use the microtype
or the fontexpansion capabilities of microtype
depending on the typesetting engine. I also need to change the fontspec
loading of Fira Sans if microtype is used in conjunction with lua(la)tex to include
\defaultfontfeatures{Ligatures=TeX,SmallCapsFeatures={Renderer=Basic}}
othewise the small caps don't render correcly and are turned into regular case.
What i'll probably do will end up looking something like this:
\ifxetex
\newcommand{\myletterspacing}{\addfontfeatures{LetterSpace=6}}
\else
\RequirePackage[tracking=true]{microtype}
\defaultfontfeatures{Ligatures=TeX,SmallCapsFeatures={Renderer=Basic}}
\microtypesetup{letterspace=60}
\newcommand{\@metropolis@letterspacing}{\lsstyle}
\fi
\@metropolis@letterspacing
can then be used wherever \MakeUppercase
is used or \MakeLowercase
and small caps are used.
Note: Ligatures=TeX
replaces Mapping=tex-text
. They do the same thing in xetex, but Ligatures=TeX
makes it compatable with luatex.
I guess this won't make it into 1.1, so we proably should push it past it.
Sorry @matze, I've got a thesis to finish. This got got moved a few rungs down the priority ladder. I'll pick it up again once i'm done with that.