summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/alfaslabone/alfaslabone.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-01-17 22:59:14 +0000
committerKarl Berry <karl@freefriends.org>2021-01-17 22:59:14 +0000
commit46660b0a87cd66246af9e502bbbed5b9221b74a1 (patch)
treeb8abe87bc3aac5410d582d5c2c9ebb1d59758ed8 /Master/texmf-dist/tex/latex/alfaslabone/alfaslabone.sty
parent88e3190a721bc2f1815ddc2ea13cb6320d013d4d (diff)
alfaslabone (17jan21)
git-svn-id: svn://tug.org/texlive/trunk@57452 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/alfaslabone/alfaslabone.sty')
-rw-r--r--Master/texmf-dist/tex/latex/alfaslabone/alfaslabone.sty62
1 files changed, 62 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/alfaslabone/alfaslabone.sty b/Master/texmf-dist/tex/latex/alfaslabone/alfaslabone.sty
new file mode 100644
index 00000000000..0aba57b5873
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/alfaslabone/alfaslabone.sty
@@ -0,0 +1,62 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{alfaslabone}
+ [2021/01/16 v.0.0.1 (Carl-Clemens Ebinger & autoinst) Style file for AlphaSlabOne fonts.]
+
+\RequirePackage{xkeyval}
+\newcommand*{\AlphaSlabOne@scale}{1}
+\DeclareOptionX{scale}{\renewcommand*{\AlphaSlabOne@scale}{#1}}
+\DeclareOptionX{scaled}{\renewcommand*{\AlphaSlabOne@scale}{#1}}
+
+\DeclareOptionX{lining}{\edef\AlphaSlabOne@figurestyle{LF}}
+\DeclareOptionX{tabular}{\edef\AlphaSlabOne@figurealign{T}}
+\DeclareOptionX{mainfont}{
+ \renewcommand{\familydefault}{\rmdefault}
+}
+\DeclareOptionX{regular}{\edef\mdseries@rm{regular}}
+\ExecuteOptionsX{lining,tabular}
+\ProcessOptionsX\relax
+
+\RequirePackage{fontenc,textcomp}
+\RequirePackage{ifthen}
+\RequirePackage{mweights}
+
+\IfFileExists{fontaxes.sty}{
+ \RequirePackage{fontaxes}
+ \fa@naming@exception{figures}{{superior}{proportional}}{Sup}
+ \fa@naming@exception{figures}{{superior}{tabular}}{Sup}
+ \def\supfigures{\@nomath\supfigures
+ \fontfigurestyle{superior}\selectfont}
+ \let\sufigures\supfigures
+ \DeclareTextFontCommand{\textsup}{\supfigures}
+ \let\textsu\textsup
+ \let\textsuperior\textsup
+
+}{}
+
+% Here we implement the scale=MatchLowercase option.
+% If this is given, we must compute the correct value of
+% the "\AlphaSlabOne@scale" parameter before loading the .fd files;
+% but to determine that value we of course need the font's x-height.
+% To avoid triggering the loading of .fd files,
+% we use plain TeX's \font primitive to load the testfont.
+% We then compute the ratio of the current x-height to our font's x-height;
+% this is the "\AlphaSlabOne@scale" we will pass to the .fd files.
+\ifthenelse{\equal{\AlphaSlabOne@scale}{MatchLowercase}}
+ { \newlength{\AlphaSlabOne@currentx}
+ \settoheight{\AlphaSlabOne@currentx}{x}
+ \newlength{\AlphaSlabOne@xheight}
+ \settoheight{\AlphaSlabOne@xheight}
+ {{\font\testfont=AlphaSlabOne-Regular-tlf-ot1 at \f@size pt\testfont x}}
+ \renewcommand*{\AlphaSlabOne@scale}
+ {\strip@pt\dimexpr\number\numexpr\number\dimexpr\AlphaSlabOne@currentx\relax*65536/\number\dimexpr\AlphaSlabOne@xheight\relax\relax sp\relax}}
+ {}
+
+ \def\sufigures{\@nomath\sufigures\fontfigurestyle{superior}\selectfont}
+
+ \def\alfaslabonetabular{\fontfamily{AlphaSlabOne-TLF}\selectfont}
+
+\renewcommand*
+ {\rmdefault}
+ {AlphaSlabOne-\AlphaSlabOne@figurealign\AlphaSlabOne@figurestyle}
+
+\endinput