From c99fbd6f5717513c4b6b7e37ad3a3d676e08b49c Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Thu, 10 Mar 2022 21:24:58 +0000
Subject: projlib (10mar22)

git-svn-id: svn://tug.org/texlive/trunk@62600 c570f23f-e606-0410-a88d-b1316a301751
---
 .../texmf-dist/tex/latex/projlib/projlib-font.sty  | 144 +++++++++++++++++++++
 1 file changed, 144 insertions(+)
 create mode 100644 Master/texmf-dist/tex/latex/projlib/projlib-font.sty

(limited to 'Master/texmf-dist/tex/latex/projlib/projlib-font.sty')

diff --git a/Master/texmf-dist/tex/latex/projlib/projlib-font.sty b/Master/texmf-dist/tex/latex/projlib/projlib-font.sty
new file mode 100644
index 00000000000..c308c1c66d7
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/projlib/projlib-font.sty
@@ -0,0 +1,144 @@
+\NeedsTeXFormat{LaTeX2e}[2020-10-01]
+\RequirePackage{l3keys2e}
+\ProvidesExplPackage
+  {projlib-font}
+  {2022/03/01} {}
+  {Font selection and configuration}
+
+\keys_define:nn { projlib-font }
+  {
+    , useosf           .bool_set:N   = \l__projlib_font_useosf_bool
+    , useosf           .initial:n    = { false }
+    , old-style-figures.bool_set:N   = \l__projlib_font_useosf_bool
+    , old~style~figures.bool_set:N   = \l__projlib_font_useosf_bool
+    , old style figures.bool_set:N   = \l__projlib_font_useosf_bool
+    , lmodern          .bool_set:N   = \l__projlib_font_lmodern_bool
+    , lmodern          .initial:n    = { false }
+    , latin-modern     .bool_set:N   = \l__projlib_font_lmodern_bool
+    , latin~modern     .bool_set:N   = \l__projlib_font_lmodern_bool
+    , latin modern     .bool_set:N   = \l__projlib_font_lmodern_bool
+    , palatino         .bool_set:N   = \l__projlib_font_palatino_bool
+    , palatino         .initial:n    = { false }
+    , times            .bool_set:N   = \l__projlib_font_times_bool
+    , times            .initial:n    = { false }
+    , garamond         .bool_set:N   = \l__projlib_font_garamond_bool
+    , garamond         .initial:n    = { false }
+    , noto             .bool_set:N   = \l__projlib_font_noto_bool
+    , noto             .initial:n    = { false }
+    , biolinum         .bool_set:N   = \l__projlib_font_biolinum_bool
+    , biolinum         .initial:n    = { false }
+    , unknown          .code:n       = {}
+  }
+\ProcessKeysOptions { projlib-font }
+
+\RequirePackage { setspace }
+
+\cs_new:Nn \projlib_font_set_linespacing_latin:n
+  {
+    \cs_if_exist:NTF \projlib_language_set_linespacing_latin:n
+      {
+        \projlib_language_set_linespacing_latin:n { #1 }
+      }
+      {
+        #1
+      }
+  }
+
+\bool_if:NT \l__projlib_font_lmodern_bool
+  {
+    \RequirePackage { amssymb }
+    \bool_if:NTF \l__projlib_font_useosf_bool
+      {
+        \RequirePackage { cfr-lm }
+      }
+      {
+        \RequirePackage { lmodern }
+      }
+    \projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } }
+  }
+
+\bool_if:NT \l__projlib_font_palatino_bool
+  {
+    \RequirePackage { mathpazo }
+    \PassOptionsToPackage { defaultsups } { newpxtext }
+    \RequirePackage { newpxtext }
+    \cs_undefine:c { openbox }
+    \projlib_font_set_linespacing_latin:n { \setstretch { 1.07 } }
+    \bool_if:NT \l__projlib_font_useosf_bool { \useosf }
+  }
+
+\bool_if:NT \l__projlib_font_times_bool
+  {
+    \PassOptionsToPackage { defaultsups } { newtxtext }
+    \RequirePackage { newtxtext }
+    \RequirePackage { newtxmath }
+    \cs_undefine:c { openbox }
+    \projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } }
+    \bool_if:NT \l__projlib_font_useosf_bool { \useosf }
+  }
+
+\bool_if:NT \l__projlib_font_garamond_bool
+  {
+    \bool_if:NF \l__projlib_font_useosf_bool
+      {
+        \PassOptionsToPackage { lining } { ebgaramond }
+      }
+    \RequirePackage [ cmintegrals, cmbraces ] { newtxmath }
+    \cs_undefine:c { openbox }
+    \RequirePackage { ebgaramond-maths }
+    \RequirePackage { ebgaramond }
+    \projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } }
+  }
+
+\bool_if:NT \l__projlib_font_noto_bool
+  {
+    \bool_if:NT \l__projlib_font_useosf_bool
+      {
+        \PassOptionsToPackage { oldstyle } { notomath }
+      }
+    \RequirePackage { anyfontsize }
+    \RequirePackage { notomath }
+    \projlib_font_set_linespacing_latin:n { \setstretch { 1.00 } }
+  }
+
+\bool_if:NT \l__projlib_font_biolinum_bool
+  {
+    \RequirePackage [ OT1 ] { eulervm }
+    \sys_if_engine_pdftex:TF
+      {
+        \bool_if:NT \l__projlib_font_useosf_bool
+          {
+            \PassOptionsToPackage { osf } { biolinum }
+          }
+          \RequirePackage { biolinum }
+          \tl_gset:Nn \familydefault { \biolinum@family }
+      }
+      {
+        \PassOptionsToPackage { no-math } { fontspec }
+        \RequirePackage { fontspec }
+        \bool_if:NTF \l__projlib_font_useosf_bool
+          {
+            \setmainfont { LinBiolinum_R.otf } [
+              BoldFont       = LinBiolinum_RB.otf  ,
+              ItalicFont     = LinBiolinum_RI.otf  ,
+              BoldItalicFont = LinBiolinum_RBO.otf ,
+              Numbers        = OldStyle            , ]
+          }
+          {
+            \setmainfont { LinBiolinum_R.otf } [
+              BoldFont       = LinBiolinum_RB.otf  ,
+              ItalicFont     = LinBiolinum_RI.otf  ,
+              BoldItalicFont = LinBiolinum_RBO.otf , ]
+          }
+      }
+    \projlib_font_set_linespacing_latin:n { \setstretch { 1.05 } }
+    \RequirePackage [ italic, defaultmathsizes ] { mathastext }
+  }
+
+\RequirePackage { silence }
+\WarningFilter { microtype } { Unable }
+\RequirePackage { microtype }
+
+\endinput
+%%
+%% End of file `projlib-font.sty'.
-- 
cgit v1.2.3

