diff options
author | Karl Berry <karl@freefriends.org> | 2018-04-29 21:49:08 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-04-29 21:49:08 +0000 |
commit | 398ae888a882af3b901d7e6564634e4611988fe3 (patch) | |
tree | bd2c0b49677d62ddc64848b84f8747d8b1c6ffa6 /Master/texmf-dist/tex/latex/libertinus-otf | |
parent | d66a575324f780018fe771d8f391d1cb011bdc9c (diff) |
libertinus-otf (29apr18)
git-svn-id: svn://tug.org/texlive/trunk@47485 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/libertinus-otf')
-rw-r--r-- | Master/texmf-dist/tex/latex/libertinus-otf/libertinus-otf.sty | 213 |
1 files changed, 213 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/libertinus-otf/libertinus-otf.sty b/Master/texmf-dist/tex/latex/libertinus-otf/libertinus-otf.sty new file mode 100644 index 00000000000..fd8c7ce5555 --- /dev/null +++ b/Master/texmf-dist/tex/latex/libertinus-otf/libertinus-otf.sty @@ -0,0 +1,213 @@ +%% $Id: libertinus-otf.sty 758 2018-04-28 18:36:55Z herbert $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.3 or, at your option, any later version. +%% +% +% Copyright 2018 Herbert Voss hvoss@tug.org +% +\ProvidesPackage{libertinus-otf}[% + 2018/04/28 v. 0.05 (Herbert Voss) Supports libertinus fonts for all luatex/xetex .] + +\RequirePackage{ifxetex,ifluatex,xkeyval,textcomp} + +\newif\iflibertinus@lining \libertinus@liningtrue +\newif\ifbiolinum@lining \biolinum@liningtrue +\newif\iflibertinus@tabular \libertinus@tabulartrue +\newif\ifbiolinum@tabular \biolinum@tabulartrue +\newif\iflibertinus@semibold \libertinus@semiboldfalse + +\DeclareOptionX{lining}[true]{\@nameuse{libertinus@lining#1}} +\DeclareOptionX{nf}[true]{% + \@nameuse{libertinus@lining#1} + \iflibertinus@lining\libertinus@newfigdefaults\fi +} +\DeclareOptionX{lf}[true]{\iflibertinus@lining\libertinus@newfigdefaults\fi} +\DeclareOptionX{oldstyle}[true]{\iflibertinus@lining\libertinus@newfigdefaults\fi} +\DeclareOptionX{osf}[true]{\iflibertinus@lining\libertinus@newfigdefaults\fi} +\DeclareOptionX{tabular}[true]{\iflibertinus@tabular\libertinus@newfigdefaults\fi} +\DeclareOptionX{t}[true]{\iflibertinus@tabular\libertinus@newfigdefaults\fi} +\DeclareOptionX{proportional}[true]{\iflibertinus@tabular\libertinus@newfigdefaults\fi} +\DeclareOptionX{p}[true]{\iflibertinus@tabular\libertinus@newfigdefaults\fi} +\DeclareOptionX{semibold}[true]{\@nameuse{libertinus@semibold#1}} +\DeclareOptionX{sb}[true]{\@nameuse{libertinus@semibold#1}} +\DeclareOptionX{bold}[true]{\libertinus@semiboldfalse\else\libertinus@semiboldtrue\fi} + +\newcommand*\libertinusRM@scale{1} +\newcommand*\libertinusDisplayT@scale{1} +\newcommand*\libertinusSF@scale{1} +\newcommand*\libertinusTT@scale{MatchLowercase} +\newcommand*\libertinusInitialsT@scale{1} +\DeclareOptionX{ScaleRM}{\renewcommand*{\libertinusRM@scale}{#1}} +\DeclareOptionX{ScaleSF}{\renewcommand*{\libertinusSF@scale}{#1}} +\DeclareOptionX{ScaleTT}{\renewcommand*{\libertinusTT@scale}{#1}} + +\def\libertinus@defaultfeatures{} +\DeclareOptionX{defaultfeatures}{\def\libertinus@defaultfeatures{#1}} + +\ProcessOptionsX\relax + +\iflibertinus@lining + \def\libertinus@figurestyle{Lining} +\else + \def\libertinus@figurestyle{OldStyle} +\fi + +\iflibertinus@tabular + \def\libertinus@figurealign{Monospaced} +\else + \def\libertinus@figurealign{Proportional} +\fi + +\iflibertinus@semibold + \def\libertinus@boldstyle{bold} +\else + \def\libertinus@boldstyle{semibold} +\fi + +\RequirePackage{unicode-math} + +\ifxetex\XeTeXtracingfonts=1\fi +\defaultfontfeatures{ + Ligatures = TeX , + SmallCapsFeatures={Letters=SmallCaps\ifluatex,Renderer=Basic\fi} , + \libertinus@defaultfeatures +} +\setmainfont{libertinusserif}[ +% Numbers = {%\libertinus@figurealign,\libertinus@figurestyle}, + Scale = \libertinusRM@scale , + UprightFont = *-regular, + ItalicFont = *-italic, + BoldFont = *-\libertinus@boldstyle, + BoldItalicFont = *-\libertinus@boldstyle italic, + SmallCapsFeatures={Letters=SmallCaps}, + Extension = .otf ] +\setsansfont{libertinussans}[ +% Numbers = {\libertinus@figurealign, \libertinus@figurestyle} , + Scale = \libertinusSF@scale , + UprightFont = *-regular, + ItalicFont = *-italic, + BoldFont = *-bold, + BoldItalicFont = *-bolditalic, + SmallCapsFeatures={Letters=SmallCaps}, + Extension = .otf ] +\setmonofont{libertinusmono}[ +% Numbers = {\libertinus@figurealign, \libertinus@figurestyle} , + Scale = \libertinusTT@scale , + FakeStretch = 0.8, + UprightFont = *-regular, + ItalicFont = *-italic, + BoldFont = *-bold, +% AutoFakeBold = 1.5, + Extension = .otf, ] + +\setmathfont{libertinusmath-regular.otf}[BoldFont=libertinusmath-bold.otf] +%\setmathfont{libertinusmath-regular.otf} +%\setmathfont[version=bold]{libertinusmath-bold.otf} + +\newfontfamily\LibertinusKeyboard{libertinuskeyboard-regular.otf} +\newfontfamily\LibertinusDisplay{libertinusserifdisplay-regular.otf} +\newfontfamily\Libertinusinitials{libertinusserifinitials-regular.otf} + +\def\biolinumKeyGlyph#1{{\LibertinusKeyboard\symbol{#1}}} +\DeclareRobustCommand*\LKey[1]{\biolinumKeyGlyph{#1}} + +\DeclareRobustCommand*\LKeyStrg{\biolinumKeyGlyph{"E170}} +\DeclareRobustCommand*\LKeyAlt{\biolinumKeyGlyph{"E171}} +\DeclareRobustCommand*\LKeyAltGr{\biolinumKeyGlyph{"E172}} +\DeclareRobustCommand*\LKeyShift{\biolinumKeyGlyph{"E174}} +\DeclareRobustCommand*\LKeyTab{\biolinumKeyGlyph{"E175}} +\DeclareRobustCommand*\LKeyEnter{\biolinumKeyGlyph{"E176}} +\DeclareRobustCommand*\LKeyCapsLock{\biolinumKeyGlyph{"E177}} +\DeclareRobustCommand*\LKeyPos{\biolinumKeyGlyph{"E191}} +\DeclareRobustCommand*\LKeyEntf{\biolinumKeyGlyph{"E18A}} +\DeclareRobustCommand*\LKeyEinf{\biolinumKeyGlyph{"E18B}} +\DeclareRobustCommand*\LKeyLeer{\biolinumKeyGlyph{"E18C}} +\DeclareRobustCommand*\LKeyEsc{\biolinumKeyGlyph{"E195}} +\DeclareRobustCommand*\LKeyEnde{\biolinumKeyGlyph{"E196}} +\DeclareRobustCommand*\LKeyTux{\biolinumKeyGlyph{"E000}} +\DeclareRobustCommand*\LKeyWin{\biolinumKeyGlyph{"E168}} +\DeclareRobustCommand*\LKeyMenu{\biolinumKeyGlyph{"E104}} +\DeclareRobustCommand*\LKeyCommand{\biolinumKeyGlyph{"2318}} +\DeclareRobustCommand*\LKeyOptionKey{\biolinumKeyGlyph{"2325}} +\DeclareRobustCommand*\LKeyBack{\biolinumKeyGlyph{"E16E}} +\DeclareRobustCommand*\LKeyUp{\biolinumKeyGlyph{"2191}} +\DeclareRobustCommand*\LKeyDown{\biolinumKeyGlyph{"2193}} +\DeclareRobustCommand*\LKeyLeft{\biolinumKeyGlyph{"2190}} +\DeclareRobustCommand*\LKeyRight{\biolinumKeyGlyph{"2192}} +\DeclareRobustCommand*\LKeyPgUp{\biolinumKeyGlyph{"E198}} +\DeclareRobustCommand*\LKeyPgDown{\biolinumKeyGlyph{"E199}} +\DeclareRobustCommand*\LKeyAt{\biolinumKeyGlyph{"0040}} +\DeclareRobustCommand*\LKeyFn{\biolinumKeyGlyph{"E188}} +\DeclareRobustCommand*\LKeyHome{\biolinumKeyGlyph{"E189}} +\DeclareRobustCommand*\LKeyDel{\biolinumKeyGlyph{"E18A}} +\DeclareRobustCommand*\LKeyIns{\biolinumKeyGlyph{"E18B}} +\DeclareRobustCommand*\LKeyEnd{\biolinumKeyGlyph{"E18E}} +\DeclareRobustCommand*\LKeyGNU{\biolinumKeyGlyph{"E190}} +\DeclareRobustCommand*\LKeyPageUp{\biolinumKeyGlyph{"E19A}} +\DeclareRobustCommand*\LKeyPageDown{\biolinumKeyGlyph{"E19B}} + +\@namedef{libertine@key@F@1}{\biolinumKeyGlyph{"E178}} +\@namedef{libertine@key@F@2}{\biolinumKeyGlyph{"E179}} +\@namedef{libertine@key@F@3}{\biolinumKeyGlyph{"E17A}} +\@namedef{libertine@key@F@4}{\biolinumKeyGlyph{"E17B}} +\@namedef{libertine@key@F@5}{\biolinumKeyGlyph{"E17C}} +\@namedef{libertine@key@F@6}{\biolinumKeyGlyph{"E17D}} +\@namedef{libertine@key@F@7}{\biolinumKeyGlyph{"E17E}} +\@namedef{libertine@key@F@8}{\biolinumKeyGlyph{"E17F}} +\@namedef{libertine@key@F@9}{\biolinumKeyGlyph{"E180}} +\@namedef{libertine@key@F@10}{\biolinumKeyGlyph{"E181}} +\@namedef{libertine@key@F@11}{\biolinumKeyGlyph{"E182}} +\@namedef{libertine@key@F@12}{\biolinumKeyGlyph{"E183}} +\@namedef{libertine@key@F@13}{\biolinumKeyGlyph{"E184}} +\@namedef{libertine@key@F@14}{\biolinumKeyGlyph{"E185}} +\@namedef{libertine@key@F@15}{\biolinumKeyGlyph{"E186}} +\@namedef{libertine@key@F@16}{\biolinumKeyGlyph{"E187}} +\DeclareRobustCommand*\LKeyF[1]{\@nameuse{libertine@key@F@#1}} +% +\DeclareRobustCommand*\LKeyAltF[1]{\LKeyAlt+\@nameuse{libertine@key@F@#1}} +\DeclareRobustCommand*\LKeyStrgAltF[1]{\LKeyStrg+\LKeyAlt+\@nameuse{libertine@key@F@#1}} +\DeclareRobustCommand*\LKeyStrgX[1]{\LKeyStrg+\LKey{#1}} +\DeclareRobustCommand*\LKeyShiftX[1]{\LKeyShift+\LKey{#1}} +\DeclareRobustCommand*\LKeyAltX[1]{\LKeyAlt+\LKey{#1}} +\DeclareRobustCommand*\LKeyAltGrX[1]{\LKeyAltGr+\LKey{#1}} +\DeclareRobustCommand*\LKeyShiftStrgX[1]{\LKeyShift+\LKeyStrg+\LKey{#1}} +\DeclareRobustCommand*\LKeyShiftAltX[1]{\LKeyShift+\LKeyAlt+\LKey{#1}} +\DeclareRobustCommand*\LKeyShiftAltGrX[1]{\LKeyShift+\LKeyAltGr+\LKey{#1}} +\DeclareRobustCommand*\LKeyStrgAltX[1]{\LKeyStrg+\LKeyAlt+\LKey{#1}} +\DeclareRobustCommand*\LKeyStrgAltEnt{\LKeyStrg+\LKeyAlt+\LKeyEntf} +\let\LKeyReset\LKeyStrgAltEnt +% +\@namedef{libertine@key@Pad@0}{\biolinumKeyGlyph{"E1A0}} +\@namedef{libertine@key@Pad@1}{\biolinumKeyGlyph{"E1A1}} +\@namedef{libertine@key@Pad@2}{\biolinumKeyGlyph{"E1A2}} +\@namedef{libertine@key@Pad@3}{\biolinumKeyGlyph{"E1A3}} +\@namedef{libertine@key@Pad@4}{\biolinumKeyGlyph{"E1A4}} +\@namedef{libertine@key@Pad@5}{\biolinumKeyGlyph{"E1A5}} +\@namedef{libertine@key@Pad@6}{\biolinumKeyGlyph{"E1A6}} +\@namedef{libertine@key@Pad@7}{\biolinumKeyGlyph{"E1A7}} +\@namedef{libertine@key@Pad@8}{\biolinumKeyGlyph{"E1A8}} +\@namedef{libertine@key@Pad@9}{\biolinumKeyGlyph{"E1A9}} +\@namedef{libertine@key@Pad@10}{\biolinumKeyGlyph{"E1AA}} +\@namedef{libertine@key@Pad@11}{\biolinumKeyGlyph{"E1AB}} +\@namedef{libertine@key@Pad@12}{\biolinumKeyGlyph{"E1AC}} +\@namedef{libertine@key@Pad@13}{\biolinumKeyGlyph{"E1AD}} +\@namedef{libertine@key@Pad@14}{\biolinumKeyGlyph{"E1AE}} +\DeclareRobustCommand*\LKeyPad[1]{\@nameuse{libertine@key@Pad@#1}} +% +% Maus +% +\DeclareRobustCommand*\LMouseEmpty{\biolinumKeyGlyph{"E130}} +\DeclareRobustCommand*\LMouseN{\biolinumKeyGlyph{"E131}} +\DeclareRobustCommand*\LMouseL{\biolinumKeyGlyph{"E132}} +\DeclareRobustCommand*\LMouseM{\biolinumKeyGlyph{"E133}} +\DeclareRobustCommand*\LMouseR{\biolinumKeyGlyph{"E134}} +\DeclareRobustCommand*\LMouseLR{\biolinumKeyGlyph{"E135}} +\DeclareRobustCommand*\LMouseIIEmpty{\biolinumKeyGlyph{"E138}} +\DeclareRobustCommand*\LMouseIIN{\biolinumKeyGlyph{"E139}} +\DeclareRobustCommand*\LMouseIIL{\biolinumKeyGlyph{"E13A}} +\DeclareRobustCommand*\LMouseIIR{\biolinumKeyGlyph{"E13C}} +\DeclareRobustCommand*\LMouseIILR{\biolinumKeyGlyph{"E13D}} +% + |