<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[a4paper]{article}
\usepackage[T1,OT1]{fontenc}
\usepackage{parskip}

\title{Simple substitutefont test}
\author{GĂĽnter Milde}

% Combine "Latin Modern" fonts for OT1 and Bookman for T1.
\usepackage{substitutefont}
\usepackage{lmodern}
% Substitution also works for fonts that exist in the specified encoding:
\substitutefont{T1}{lmr}{pbk}

% \addto\extrasgerman{\fontencoding{T1}\selectfont}
% \addto\noextrasgerman{\fontencoding{\encodingdefault}\selectfont}

\begin{document}

\maketitle

This document is a test that should work with any standard basic LaTeX
installation. For real use cases, see the test documents setting up matching
Latin and Greek or Cyrillic fonts.

Some text in \encodingdefault{} encoding, the font is Latin Modern:
RĂ©sumĂ© of Nathan SĂ¶derblom.

% (Defining the substitution in the document body is possible (but not
% recommended) if it is done before the first use of a font in the specified
% encoding.)
% \substitutefont{T1}{lmr}{pbk}

\fontencoding{T1}\selectfont

Some text in T1 encoding, the font is Bookmark: RĂ©sumĂ© of Nathan SĂ¶derblom%
\footnote{Compare the result of drag-and-drop or text search for words with
accented characters for OT1 and T1 encoded text.}

\fontencoding{OT1}\selectfont

Back to OT1 and Latin Modern.

% The following substitution definition is ignored, because T1 fonts are
% already set up:
\substitutefont{T1}{lmr}{pag}



\fontencoding{T1}\selectfont

Some more text in T1 encoding and Bookmark.

\end{document}
</pre></body></html>