|
8 | 8 | % Licenced under the LPPL v1.3 or higher. |
9 | 9 | % |
10 | 10 | \NeedsTeXFormat{LaTeX2e}[1994/12/01] |
11 | | -\ProvidesPackage{sourcesanspro}[2015/01/11 v2.5 Adobe's Source Sans Pro typeface] |
| 11 | +\ProvidesPackage{sourcesanspro}[2016/12/03 v2.6 Adobe's Source Sans Pro typeface] |
12 | 12 |
|
13 | 13 | \RequirePackage{ifxetex,ifluatex,xkeyval} |
14 | 14 |
|
|
75 | 75 | \else |
76 | 76 | \def\sourcesanspro@figurestyle{} |
77 | 77 | \fi |
78 | | - |
| 78 | + |
79 | 79 | % Tabular/Proportional |
80 | 80 | \ifsourcesanspro@tabular |
81 | 81 | \def\sourcesanspro@figurealign{Monospaced} |
82 | 82 | \else |
83 | 83 | \def\sourcesanspro@figurealign{Proportional} |
84 | 84 | \fi |
85 | | - |
| 85 | + |
86 | 86 | % Black/Semibold/Bold |
87 | 87 | \ifsourcesanspro@black |
88 | 88 | \def\sourcesanspro@boldstyle{Black} |
|
93 | 93 | \def\sourcesanspro@boldstyle{Bold} |
94 | 94 | \fi |
95 | 95 | \fi |
96 | | - |
| 96 | + |
97 | 97 | % Light/ExtraLight/Regular |
98 | 98 | \ifsourcesanspro@light |
99 | 99 | \def\sourcesanspro@regstyle{Light} |
|
104 | 104 | \def\sourcesanspro@regstyle{Regular} |
105 | 105 | \fi |
106 | 106 | \fi |
107 | | - |
| 107 | + |
108 | 108 | % Shared features |
109 | 109 | \defaultfontfeatures{ |
110 | 110 | Ligatures = TeX , |
|
117 | 117 | \setsansfont |
118 | 118 | [ UprightFont = *-\sourcesanspro@regstyle , |
119 | 119 | ItalicFont = *-\sourcesanspro@regstyle It , |
120 | | - BoldFont = *-\sourcesanspro@boldstyle , |
| 120 | + BoldFont = *-\sourcesanspro@boldstyle , |
121 | 121 | BoldItalicFont = *-\sourcesanspro@boldstyle It] |
122 | 122 | {SourceSansPro} |
123 | 123 | \fi |
124 | | - |
| 124 | + |
125 | 125 | % Font families |
126 | 126 | % Regular/Bold |
127 | 127 | \newfontfamily\sourcesanspro |
128 | 128 | [ UprightFont = *-Regular , |
129 | 129 | ItalicFont = *-RegularIt , |
130 | | - BoldFont = *-Bold , |
| 130 | + BoldFont = *-Bold , |
131 | 131 | BoldItalicFont = *-BoldIt ] |
132 | 132 | {SourceSansPro} |
133 | | - |
| 133 | + |
134 | 134 | % Light/Semibold |
135 | 135 | \newfontfamily\sourcesansprolight |
136 | 136 | [ UprightFont = *-Light , |
137 | 137 | ItalicFont = *-LightIt , |
138 | 138 | BoldFont = *-Semibold , |
139 | 139 | BoldItalicFont = *-SemiboldIt ] |
140 | 140 | {SourceSansPro} |
141 | | - |
| 141 | + |
142 | 142 | % ExtraLight/Black |
143 | 143 | \newfontfamily\sourcesansproextreme |
144 | 144 | [ UprightFont = *-ExtraLight , |
145 | 145 | ItalicFont = *-ExtraLightIt , |
146 | 146 | BoldFont = *-Black , |
147 | 147 | BoldItalicFont = *-BlackIt ] |
148 | 148 | {SourceSansPro} |
149 | | - |
| 149 | + |
150 | 150 | % Lining figures |
151 | 151 | \newfontfamily\sourcesansprolf |
152 | 152 | [ Numbers = \sourcesanspro@figurealign , |
153 | 153 | UprightFont = *-\sourcesanspro@regstyle , |
154 | 154 | ItalicFont = *-\sourcesanspro@regstyle It , |
155 | | - BoldFont = *-\sourcesanspro@boldstyle , |
156 | | - BoldItalicFont = *-\sourcesanspro@boldstyle It] |
| 155 | + BoldFont = *-\sourcesanspro@boldstyle , |
| 156 | + BoldItalicFont = *-\sourcesanspro@boldstyle It ] |
157 | 157 | {SourceSansPro} |
158 | | - |
| 158 | + |
159 | 159 | % Dont keep all default font features |
160 | 160 | \defaultfontfeatures{} |
161 | 161 |
|
|
170 | 170 | \else |
171 | 171 | \def\sourcesanspro@figurestyle{LF} |
172 | 172 | \fi |
173 | | - |
| 173 | + |
174 | 174 | % Tabular/Proportional |
175 | 175 | \ifsourcesanspro@tabular |
176 | 176 | \def\sourcesanspro@figurealign{T} |
177 | 177 | \else |
178 | 178 | \def\sourcesanspro@figurealign{} |
179 | 179 | \fi |
180 | | - |
| 180 | + |
181 | 181 | % Black/Semibold/Bold |
182 | 182 | \ifsourcesanspro@black |
183 | 183 | \def\bfseries@sf{k} |
|
188 | 188 | \def\bfseries@sf{b} |
189 | 189 | \fi |
190 | 190 | \fi |
191 | | - |
| 191 | + |
192 | 192 | % Light/ExtraLight/Regular |
193 | 193 | \ifsourcesanspro@light |
194 | 194 | \def\mdseries@sf{l} |
|
204 | 204 | \ifsourcesanspro@sfdefault |
205 | 205 | \edef\sfdefault{SourceSansPro-\sourcesanspro@figurealign\sourcesanspro@figurestyle} |
206 | 206 | \fi |
207 | | - |
| 207 | + |
208 | 208 | % If source sans pro is the default font \oldstylenums needs a new definition. |
209 | 209 | \ifsourcesanspro@default |
210 | 210 | \let\nativeoldstylenums\oldstylenums |
|
0 commit comments