% !TEX program = lualatex

\documentclass[10pt]{article}
\usepackage{fontspec}
\usepackage[a4paper,margin=1.4cm]{geometry}
\setlength{\parindent}{0pt}
\pagestyle{empty}

\newcommand{\gradeblock}[1]{%
  {\rmfamily\bfseries\large Grade~#1}\hfill
  {\rmfamily\footnotesize optical sizes:\enspace
    \fontsize{6}{7}\selectfont Hamburg\enspace
    \fontsize{10}{11}\selectfont Hamburg\enspace
    \fontsize{17.28}{19}\selectfont Hamburg}\par
  \smallskip
  \rmfamily The quick brown fox jumps over the lazy dog: \textbf{bold},
  \textit{italic}, \textsl{slanted}, \textbf{\textit{bold italic}},
  \textsc{small caps}. Accents: Věra Dvořák, Grüße, déjà, ¡Olé!\ ¿señor?, cœur,
  naïve, façade, Ångström.\par
  {\small Symbols: £ \$ § ¶ © ® ™ ° † ‡ • · ± × ÷ ¬ µ ‖ … x² y³ 1ª 2º;\enspace
    “curly” ‘quotes’, en–dash, em—dash;\enspace
    ligatures office waffle affix final flag.}\par
  {\small\sffamily Sans: fox — \textbf{bold}, \textit{oblique}.\quad
    \ttfamily Typewriter: mono \textit{italic} 0O1lI.}\par
  \bigskip
}

\begin{document}

% Default grade (G19) for the title
\setmainfont{Computer Modern Legacy Serif}
\setsansfont{Computer Modern Legacy Sans}
\setmonofont{Computer Modern Legacy Typewriter}

{\centering
  {\sffamily\bfseries\large Computer Modern Legacy\par} \smallskip
  {\sffamily\footnotesize
   A grade \& feature sample — same design and metrics, the METAFONT \texttt{blacker} axis just adds ink.\par
   This here is with “Computer Modern Legacy Serif” at default grade (19); grades 0/10/19/30 below.\par}}
\bigskip

\setmainfont{Computer Modern Legacy G0 Serif}
\setsansfont{Computer Modern Legacy G0 Sans}
\setmonofont{Computer Modern Legacy G0 Typewriter}
\gradeblock{0}

\setmainfont{Computer Modern Legacy G10 Serif}
\setsansfont{Computer Modern Legacy G10 Sans}
\setmonofont{Computer Modern Legacy G10 Typewriter}
\gradeblock{10}

% explicitly G19 here...
\setmainfont{Computer Modern Legacy G19 Serif}
\setsansfont{Computer Modern Legacy G19 Sans}
\setmonofont{Computer Modern Legacy G19 Typewriter}
\gradeblock{19}

\setmainfont{Computer Modern Legacy G30 Serif}
\setsansfont{Computer Modern Legacy G30 Sans}
\setmonofont{Computer Modern Legacy G30 Typewriter}
\gradeblock{30}

\setmainfont{Computer Modern Legacy Serif}
\setsansfont{Computer Modern Legacy Sans}
\setmonofont{Computer Modern Legacy Typewriter}

\subsection*{\sffamily Some Details}

\sffamily\small

\begin{itemize}

\item Glyphs and mosts metrics are taken from METAFONT.

\item G19, for example, would be equivalent to a mode with \texttt{blacker} 1.9 at 1200 ppi,
while the rasteriziation was actually done with 9600 dpi (and then \texttt{blacker} 15.2 for G19),
potraced to outlines.

\item Accents are assembled as TeX would, some glyphs come from the CM symbol fonts and/or are assembled,
e.g.\ ° the same way as \texttt{\$\^{}\textbackslash{}circ\$} is done with pdflatex/latex,
while no post-Knuth METAFONT fonts were used.

\item More maybe font details later—%
there are at least two subtleties that cannot be baked into an OpenType font, but there are workarounds.

\item No “Computer Modern Legacy Math” font so far; seems like a bigger project, but to be seen…

\item Tagged/accessible PDFs do, of course, work since is an OpenType font and is used in LuaLaTeX.

\item Maybe one day I would also publish the tool PATAFONT I used in this contex.

\end{itemize}

\end{document}
