From 46660b0a87cd66246af9e502bbbed5b9221b74a1 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 17 Jan 2021 22:59:14 +0000 Subject: alfaslabone (17jan21) git-svn-id: svn://tug.org/texlive/trunk@57452 c570f23f-e606-0410-a88d-b1316a301751 --- .../tex/latex/alfaslabone/alfaslabone.sty | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/alfaslabone/alfaslabone.sty (limited to 'Master/texmf-dist/tex/latex/alfaslabone/alfaslabone.sty') 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 -- cgit v1.2.3