EB-Garamond icon indicating copy to clipboard operation
EB-Garamond copied to clipboard

Oblique styling

Open mikkelee opened this issue 2 years ago • 3 comments

It would probably be too much to ask for a complete oblique variant, so here is what I use in case others are interested. The slant value of 0.3 was chosen as a best guess from measurments of long verticals in the italic.

\documentclass{article}

\RequirePackage{fontspec} % note fontspec requires lualatex
\newcommand{\oblique}[1]{{\slshape#1}}

\setmainfont[
	SlantedFont={EB Garamond}, % for some reason, it needs to be specified even if it is at the end of the command, otherwise it just shows as italics
	SlantedFeatures={
		FakeSlant=0.3,
	},
]{EB Garamond}

\begin{document}

\emph{Here is an example of Latin: \oblique{Lorem ipsum etc,} and so on}

\end{document}

Renders as: Screenshot 2023-03-24 at 18 37 07

Treat this "issue" as you wish :)

mikkelee avatar Mar 24 '23 17:03 mikkelee

Thanks a lot! As you might guess, oblique and unslanted styles are not a priority for me or would be automaticaly generated only.

I’ll leave this issue open for now until I know where to best document this.

georgd avatar Mar 25 '23 22:03 georgd

I think you can use \textsl instead of defining a \oblique command. Or, if you want to use \oblique, define it using \let\oblique\textsl.

amarz45 avatar Apr 07 '23 02:04 amarz45

I can never remember if \textXX or \XXshape is the right one to use so I just group stuff. Honest thanks I'm probably gonna refer back to this lol

mikkelee avatar Apr 07 '23 04:04 mikkelee