summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-05-19 21:10:57 +0000
committerKarl Berry <karl@freefriends.org>2019-05-19 21:10:57 +0000
commit09b6012c4592676d398ffa8d92441583fcd9206f (patch)
treeaf96ebd35bb9559d4a705358a6dc4464a1d21976 /Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
parentfde837e1c6b239ad573936340f59c8efb0fdc193 (diff)
sourcecodepro (19may19)
git-svn-id: svn://tug.org/texlive/trunk@51163 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty')
-rw-r--r--Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty46
1 files changed, 24 insertions, 22 deletions
diff --git a/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty b/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
index 2a797569848..cb8b1d08d4d 100644
--- a/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
+++ b/Master/texmf-dist/tex/latex/sourcecodepro/sourcecodepro.sty
@@ -8,7 +8,7 @@
% Licenced under the LPPL v1.3 or higher.
%
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
-\ProvidesPackage{sourcecodepro}[2015/10/09 v2.6 Adobe's Source Code Pro typeface]
+\ProvidesPackage{sourcecodepro}[2018/01/13 v2.7 Adobe's Source Code Pro typeface]
\RequirePackage{ifxetex,ifluatex,xkeyval}
@@ -25,6 +25,7 @@
% Scaling command
\newcommand*{\SourceCodePro@scale}{1}
+\newcommand*{\sourcecodepro@ligatures}{}
% Use OpenType fonts for XeTeX and LuaTeX.
\ifxetex
@@ -56,6 +57,7 @@
\DeclareOptionX{t1} {\sourcecodepro@otffalse}
\DeclareOptionX{opentype} {\sourcecodepro@otftrue}
\DeclareOptionX{otf} {\sourcecodepro@otftrue}
+\DeclareOptionX{ligatures} {\renewcommand*{\sourcecodepro@ligatures}{#1}}
% Default options
\ExecuteOptionsX{ttdefault,lining,bold,regular}
@@ -64,17 +66,17 @@
% Load OpenType files
\ifsourcecodepro@otf
\RequirePackage{fontspec}
-
+
% Create a fixed liningnums command:
\renewcommand*\liningnums[1]{{\addfontfeature{RawFeature=+lnum;-onum}#1}}
-
+
% Oldstyle/Lining
\ifsourcecodepro@oldstyle
\def\sourcecodepro@figurestyle{OldStyle}
\else
\def\sourcecodepro@figurestyle{}
\fi
-
+
% Black/Semibold/Bold
\ifsourcecodepro@black
\def\sourcecodepro@boldstyle{Black}
@@ -85,7 +87,7 @@
\def\sourcecodepro@boldstyle{Bold}
\fi
\fi
-
+
% Light/ExtraLight/Regular/Medium
\ifsourcecodepro@light
\def\sourcecodepro@regstyle{Light}
@@ -100,41 +102,41 @@
\fi
\fi
\fi
-
+
% Shared features
\defaultfontfeatures{
- Ligatures = TeX ,
+ Ligatures = \sourcecodepro@ligatures ,
Numbers = \sourcecodepro@figurestyle ,
Scale = \SourceCodePro@scale ,
Extension = .otf }
-
+
% Monospace font
\ifsourcecodepro@ttdefault
\setmonofont
[ UprightFont = *-\sourcecodepro@regstyle ,
ItalicFont = *-\sourcecodepro@regstyle It ,
- BoldFont = *-\sourcecodepro@boldstyle ,
+ BoldFont = *-\sourcecodepro@boldstyle ,
BoldItalicFont = *-\sourcecodepro@boldstyle It ]
{SourceCodePro}
\fi
-
+
% Font families
% Regular/Bold
\newfontfamily\sourcecodepro
[ UprightFont = *-Regular ,
ItalicFont = *-RegularIt ,
- BoldFont = *-Bold ,
+ BoldFont = *-Bold ,
BoldItalicFont = *-BoldIt ]
{SourceCodePro}
-
+
% Medium/Bold
\newfontfamily\sourcecodepromedium
[ UprightFont = *-Medium ,
ItalicFont = *-MediumIt ,
- BoldFont = *-Bold ,
+ BoldFont = *-Bold ,
BoldItalicFont = *-BoldIt ]
{SourceCodePro}
-
+
% Light/Semibold
\newfontfamily\sourcecodeprolight
[ UprightFont = *-Light ,
@@ -142,7 +144,7 @@
BoldFont = *-Semibold ,
BoldItalicFont = *-SemiboldIt ]
{SourceCodePro}
-
+
% ExtraLight/Black
\newfontfamily\sourcecodeproextreme
[ UprightFont = *-ExtraLight ,
@@ -150,16 +152,16 @@
BoldFont = *-Black ,
BoldItalicFont = *-BlackIt ]
{SourceCodePro}
-
+
% Lining figures
\newfontfamily\sourcecodeprolf
[ Numbers = ,
UprightFont = *-\sourcecodepro@regstyle ,
ItalicFont = *-\sourcecodepro@regstyle It ,
- BoldFont = *-\sourcecodepro@boldstyle ,
+ BoldFont = *-\sourcecodepro@boldstyle ,
BoldItalicFont = *-\sourcecodepro@boldstyle It ]
{SourceCodePro}
-
+
% Dont keep all default font features
\defaultfontfeatures{}
@@ -174,7 +176,7 @@
\else
\def\sourcecodepro@figurestyle{LF}
\fi
-
+
% Black/Semibold/Bold
\ifsourcecodepro@black
\def\bfseries@tt{k}
@@ -185,7 +187,7 @@
\def\bfseries@tt{b}
\fi
\fi
-
+
% Light/ExtraLight/Regular/Medium
\ifsourcecodepro@light
\def\mdseries@tt{l}
@@ -205,8 +207,8 @@
\ifsourcecodepro@ttdefault
\edef\ttdefault{SourceCodePro-T\sourcecodepro@figurestyle}
\fi
-
- % If source code pro is the default font \oldstylenums needs a new definition.
+
+ % If source code pro is the default font \oldstylenums needs a new definition.
\ifsourcecodepro@default
\let\nativeoldstylenums\oldstylenums
\renewcommand*\oldstylenums[1]{%