From 443631e84c8e0606c84d74678f1ba590874e0bae Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Thu, 12 Sep 2019 16:48:17 -0400 Subject: portable font codes --- fonts.tex | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 fonts.tex diff --git a/fonts.tex b/fonts.tex new file mode 100644 index 0000000..6822f2e --- /dev/null +++ b/fonts.tex @@ -0,0 +1,10 @@ +%gives ''\newfont myfont=cmr10@14pt'' +\newcount\spacing +\newdimen\size +\def\adjs{%adjust spacing + \baselineskip=\size \multiply\baselineskip by \spacing \divide\baselineskip by 100 \multiply\baselineskip by 6 \divide\baselineskip by 5%6/5 = normal 1.2 addition for character depth +} +\def\newfont#1=#2@#3pt{%name, base, size + \expandafter\font\csname x#1\endcsname=#2 at #3pt + \expandafter\edef\csname #1\endcsname{\size=#3pt \adjs \csname x#1\endcsname} +} -- cgit