# HG changeset patch # User Franz Glasner # Date 1778658532 -7200 # Node ID c10b2092c48f8bc4d1b2048945e37c72679b83f7 # Parent 8825282f6900fa7d3b10a3d796a87f07ba9d14f4 Also make a PDF style variant using Adobe Source Serif/Sans/Code Pro diff -r 8825282f6900 -r c10b2092c48f docs/_latex/my-doc-fonts.sty --- a/docs/_latex/my-doc-fonts.sty Wed May 13 09:47:12 2026 +0200 +++ b/docs/_latex/my-doc-fonts.sty Wed May 13 09:48:52 2026 +0200 @@ -16,11 +16,13 @@ \newif\if@mdf@WithDejaVuSansMono \newif\if@mdf@WithPlexMono +\newif\if@mdf@WithAdobeSource -\def\@mdf@reset@font@options{\@mdf@WithDejaVuSansMonofalse\@mdf@WithPlexMonofalse} +\def\@mdf@reset@font@options{\@mdf@WithDejaVuSansMonofalse\@mdf@WithPlexMonofalse\@mdf@WithAdobeSourcefalse} \DeclareOptionX{dejavusansmono}[true]{\@mdf@reset@font@options\csname @mdf@WithDejaVuSansMono#1\endcsname} \DeclareOptionX{plexmono}[true]{\@mdf@reset@font@options\csname @mdf@WithPlexMono#1\endcsname} +\DeclareOptionX{adobesource}[true]{\@mdf@reset@font@options\csname @mdf@WithAdobeSource#1\endcsname} % % By default use the safe option dejavusansmono because is contains @@ -70,4 +72,49 @@ verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% {sphinx} \fi +\if@mdf@WithAdobeSource + \RequirePackage{newunicodechar} + \defaultfontfeatures{Ligatures=TeX,Numbers={Lining,Tabular}} + \setmainfont{Source Serif Pro}[ + UprightFont = *, + BoldFont = * Bold, + ItalicFont = * Italic, + BoldItalicFont = * Bold Italic, + ] + \setsansfont{Source Sans Pro}[ + UprightFont = *, + BoldFont = * Bold, + ItalicFont = * Italic, + BoldItalicFont = * Bold Italic, + ] + \setmonofont{Source Code Pro}[ + UprightFont = *, + BoldFont = * Bold, + ItalicFont = * Italic, + BoldItalicFont = * Bold Italic, + Scale = MatchLowercase, + ] + \defaultfontfeatures{} + \newfontfamily\DejaVuSansMono{DejaVu Sans Mono}[% + UprightFont = *, + BoldFont = * Bold, + ItalicFont = * Oblique, + BoldItalicFont = * Bold Oblique, + Scale=MatchLowercase, + Ligatures=TeX, + ] + \newunicodechar{∶}{{\DejaVuSansMono ∶}}% U+2236 + \newunicodechar{⟵}{{\DejaVuSansMono ⟵}}% U+27F5 + \newunicodechar{⟶}{{\DejaVuSansMono ⟶}}% U+27F6 + \newunicodechar{⟷}{{\DejaVuSansMono ⟷}}% U+27F7 + \newunicodechar{⇒}{{\DejaVuSansMono ⇒}}% U+21D2 + \newunicodechar{⇔}{{\DejaVuSansMono ⇔}}% U+21D4 + \newunicodechar{≟}{{\DejaVuSansMono ≟}}% U+225F + \newunicodechar{∈}{{\DejaVuSansMono ∈}}% U+2208 + \newunicodechar{∌}{{\DejaVuSansMono ∌}}% U+220C + \PassOptionsToPackage{% + verbatimvisiblespace={\textcolor{red}{{\DejaVuSansMono^^^^2423}}},% + verbatimcontinued={\textcolor{red}{{\DejaVuSansMono^^^^21aa}}}}% + {sphinx} +\fi \endinput diff -r 8825282f6900 -r c10b2092c48f docs/conf.py --- a/docs/conf.py Wed May 13 09:47:12 2026 +0200 +++ b/docs/conf.py Wed May 13 09:48:52 2026 +0200 @@ -147,6 +147,7 @@ "papersize": "a4paper", "babel": r"\usepackage{babel}", "fontpkg": r"\usepackage[plexmono]{my-doc-fonts}", +# "fontpkg": r"\usepackage[adobesource]{my-doc-fonts}", "releasename": "Version", } latex_theme = "manual"