How can one semi-bold a small group of "normal text" words?

This version displays Linux Libertine and Computer Modern Bright, two fonts that come in semibold weight. These are just examples; the same approach should work for other fonts. It adds \sbseries and \textsb commands corresponding to the standard LaTeX font selection commands.

Updated to work transparently with either PDFTeX or Unicode.

\documentclass{article}
\usepackage{iftex}

\ifPDFTeX
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{cmbright}
%% Load without Biolinum, or it will replace CM Bright,
%% and without sb, or it will replace bold:
\usepackage[libertine]{libertine}

\else % Assume a Unicode engine.
\usepackage{fontspec}

\setmainfont[ FontFace = {sb}{n}{Linux Libertine O Semibold},
              FontFace = {sb}{it}{Linux Libertine O Semibold Italic},
              BoldFont = {Linux Libertine O Bold},
              BoldItalicFont = {Linux Libertine O Bold Italic},
            ]{Linux Libertine O}
\defaultfontfeatures{Scale=MatchLowercase}
\setsansfont[ FontFace = {sb}{n}{CMU Bright SemiBold},
              FontFace = {sb}{it}{CMU Bright SemiBold Oblique},
            ]{CMU Bright}

\fi         % \ifPDFTeX

\DeclareOldFontCommand{\sbseries}{\fontseries{sb}\selectfont}{\mathbf}
\DeclareTextFontCommand{\textsb}{\sbseries}

\begin{document}

\framebox[10cm][s]{
\rmfamily \makebox[2.5cm][c]{Normal} \makebox[2.5cm][c]{\mdseries Medium} \makebox[2.5cm][c]{\sbseries Semibold} \makebox[2.5cm][c]{\bfseries Bold} \normalfont
} \par
\framebox[10cm][s]{
\makebox[2.5cm][c]{\textsf{Normal}} \makebox[2.5cm][c]{\textsf{\textmd{Medium}}}\makebox[2.5cm][c]{\textsf{\textsb{Semibold}}} \makebox[2.5cm][c]{\textsf{\textbf{Bold}}}
}

\end{document}

enter image description here

ETA: David Carlisle points out elsewhere that \DeclareOldFontCommand is obsolete (and reminded me of cfr's comment about it), and suggests something like \DeclareRobustCommand\sbseries{\fontseries{sb}\selectfont}.


By default, the New Font Selection Scheme (NFSS) for LaTeX supports a limited range of weights and shapes. Essentially, weight-wise, only bold extended and medium are supported by default. However, many fonts packaged for (pdf)LaTeX support extensions to the scheme.

The only thing to bear in mind here is that extensions, unlike the core LaTeX NFSS, are not uniform. The commands needed to access additional weights and shapes vary from font package to font package. While groups of font packages may share a common interface, there is no interface common to all such packages.

The trick here is to read the manuals of font packages to see which shapes, weights and swishy bits they support and what commands they provide to access these extensions to LaTeX's font selection scheme.

Here are a few examples of such packages. Since you expressed a preference for pdfTeX as an engine, I concentrate on options available here. Further information and options can be found in the LaTeX Font Catalogue.

While it is occasionally possible to access font features only by creating your own extensions to the NFSS, this should be a last resort: always check the packages for support in the first instance as this is (1) easier (2) more portable and (3) less error-prone.

Libertine

The libertine package supports semi-bold out-of-the-box for all engines. If Xe/LuaLaTeX is used, it will configure opentype versions by default; otherwise, it will use type1.

This example uses pdfLaTeX:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{libertine}
\usepackage{kantlipsum}
\begin{document}
\kant[1]
\bfseries\kant[2]
\libertineSB\kant[3]
\end{document}

Libertine semi-bold

VenturisADF

Here are some examples of VenturisADF serif, titling and sans in various weights:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{venturis}
\begin{document}
Medium serif

{\bfseries Bold serif}

\texttl{\tistyle A demi-bold titling font}

{\sffamily\dbweight Demi-bold sans

\mdseries Regular sans

\lgweight Light sans

\bfseries Bold sans
}

\end{document}

VenturisADF

ElectrumADF

Similarly, ElectrumADF features several weights:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{electrum}
\begin{document}

\textlg{From Light} through regular \textsb{and semibold} \textbf{to bold.}

\end{document}

ElectrumADF

Tags:

Fonts