# Combining letter spacing and different font weights in section heading

I want a to define a section heading that features:

• a light and a bold font weight
• a local truetype font (fontspec package)

This is what came closest:

\documentclass[a4paper, 11pt]{scrartcl}%
\usepackage[ngerman]{babel}%
\usepackage{hyperref}%
\hypersetup{%
plainpages=false,
pdfborder={0 0 0},
bookmarksnumbered=true,
bookmarksopen=true
}%

\usepackage{kantlipsum}%
\usepackage{fontspec}%
\setmainfont[%
Path           = /usr/share/fonts/truetype/OpenSans/,
Extension      = .ttf,
Ligatures      = TeX,
BoldFont       = OpenSans-Semibold,
ItalicFont     = OpenSans-Italic,
BoldItalicFont = OpenSans-BoldItalic
]{OpenSans-Light}%

\newfontfamily{\OSLight}{Open Sans Light}%
\newfontfamily{\OSBold}{Open Sans Bold}%

\begin{document}

\tableofcontents

\ibsection{Der Philosoph}{Immanuel Kant}

\kant[1]

\ibsection{Der}{kategorische Imperativ}

\kant[2]

\end{document}


This solution is not satisfying for two reasons:

1. The light font weight of the section heading is rather regular than light. Please see image. I want the heading to be like it is at the bottom.

I know there is microtype package with a letter spacing option. Not applicable here as I use fontspec package and XeLaTeX.

I am also aware of opensans package. Not an option because I want to be able to use other locally stored fonts.

The question of course is, how to achieve what I'm looking for?

• You can move the Letterspace-option to the font definition: \newfontfamily{\OSLight}{Open Sans Light}[LetterSpace=-5] and in the section add \mdseries \newcommand\ibsection[2]{\section{{\OSLight \mdseries #1} {\OSBold #2}}}. Imho your layout looks rather ugly. – Ulrike Fischer Apr 4 '17 at 12:17
• Great. The \mdseries does change the font weight. Moving the letterspace option to the font definition as you suggest produces an error: LaTeX Error: Missing \begin{document}. I assume it worked for you. Any idea why it didn't for me? – jmjr Apr 4 '17 at 12:33
• Too old fontspec? Try \newfontfamily{\OSLight}[LetterSpace=-5]{Open Sans Light} – Ulrike Fischer Apr 4 '17 at 12:35