Skip to content

Commit

Permalink
Update package files
Browse files Browse the repository at this point in the history
  • Loading branch information
psb1558 committed Dec 15, 2023
1 parent 3983107 commit e68e430
Show file tree
Hide file tree
Showing 3 changed files with 308 additions and 173 deletions.
255 changes: 204 additions & 51 deletions TeX/Elstob.sty
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
\ProvidesPackage{Elstob}[%
2023/12/08 (Peter Baker) Supports the Elstob variable font for LuaLaTeX.]

\RequirePackage{ifluatex,xkeyval,fontspec}
\RequirePackage{iftex,xkeyval,fontspec}

\RequireLuaTeX

Expand Down Expand Up @@ -82,13 +82,17 @@

% Declare the weight options

\newif\ifelstob@extralight \elstob@extralightfalse
\newif\ifelstob@light \elstob@lightfalse
\newif\ifelstob@medium \elstob@mediumfalse
\newif\ifelstob@semibold \elstob@semiboldfalse
\newif\ifelstob@extrabold \elstob@extraboldfalse

\DeclareOptionX{extralight}{\elstob@extralighttrue}
\DeclareOptionX{light}{\elstob@lighttrue}
\DeclareOptionX{medium}{\elstob@mediumtrue}
\DeclareOptionX{semibold}{\elstob@semiboldtrue}
\DeclareOptionX{extrabold}{\elstob@extraboldtrue}

\newif\ifelstob@oldspacing \elstob@oldspacingfalse
\DeclareOptionX{oldspacing}{\elstob@oldspacingtrue}
Expand Down Expand Up @@ -122,6 +126,9 @@

% ALTERNATE STYLES

% I am trying to replace these individual definitions with a loop, and having no success at all.
% One try with \foreach and one via a separate Lua file.

\newcommand*{\RegDef}{}
\newcommand*{\RegSizeDef}{SizeFeatures={{Size={5-}, RawFeature={axis={wght=400,opsz=12}}}}}
\newcommand*{\ItalicSizeDef}{SizeFeatures={{Size={5-}, RawFeature={axis={wght=400,opsz=12,slnt=\elstob@Islnt}}}}}
Expand Down Expand Up @@ -426,6 +433,8 @@
\DeclareOptionX*{\PackageWarning{Elstob}{Unknown option `\CurrentOption' ignored}}
\ProcessOptionsX\relax

% Apply optical size adjustment.

\def\adjustopsz#1#2{%
\directlua{
originalval = #1
Expand Down Expand Up @@ -501,6 +510,36 @@
\newcommand*{\elstob@BopszThirteen}{\adjustopsz{18}{\opszadj}}
\newcommand*{\elstob@BIopszThirteen}{\adjustopsz{18}{\opszadj}}

\ifelstob@extralight
\def\elstob@RwghtOne{290}
\def\elstob@RwghtTwo{277.5}
\def\elstob@RwghtThree{265}
\def\elstob@RwghtFour{252.5}
\def\elstob@RwghtFive{240} % -10.5 440
\def\elstob@RwghtSix{215}
\def\elstob@RwghtSeven{200} % -12.5 390
\def\elstob@RwghtEight{200}
\def\elstob@RwghtNine{200} % -14.5 370
\def\elstob@RwghtTen{200}
\def\elstob@RwghtEleven{200}
\def\elstob@RwghtTwelve{200}
\def\elstob@RwghtThirteen{200} % 17.5- 350

\def\elstob@IwghtOne{290}
\def\elstob@IwghtTwo{277.5}
\def\elstob@IwghtThree{265}
\def\elstob@IwghtFour{252.5}
\def\elstob@IwghtFive{240} % -10.5 440
\def\elstob@IwghtSix{215}
\def\elstob@IwghtSeven{200} % -12.5 390
\def\elstob@IwghtEight{200}
\def\elstob@IwghtNine{200} % -14.5 370
\def\elstob@IwghtTen{200}
\def\elstob@IwghtEleven{200}
\def\elstob@IwghtTwelve{200}
\def\elstob@IwghtThirteen{200} % 17.5- 350
\fi

\ifelstob@light
\def\elstob@RwghtOne{390}
\def\elstob@RwghtTwo{377.5}
Expand Down Expand Up @@ -532,63 +571,177 @@
\fi

\ifelstob@medium
\def\elstob@RwghtOne{590}
\def\elstob@RwghtTwo{577.5}
\def\elstob@RwghtThree{565}
\def\elstob@RwghtFour{552.5}
\def\elstob@RwghtFive{540} % -10.5 440
\def\elstob@RwghtSix{515}
\def\elstob@RwghtSeven{490} % -12.5 390
\def\elstob@RwghtEight{470}
\def\elstob@RwghtNine{465} % -14.5 370
\def\elstob@RwghtTen{460}
\def\elstob@RwghtEleven{455}
%\def\elstob@RwghtOne{590}
%\def\elstob@RwghtTwo{577.5}
%\def\elstob@RwghtThree{565}
%\def\elstob@RwghtFour{552.5}
%\def\elstob@RwghtFive{540} % -10.5 440
%\def\elstob@RwghtSix{515}
%\def\elstob@RwghtSeven{490} % -12.5 390
%\def\elstob@RwghtEight{470}
%\def\elstob@RwghtNine{465} % -14.5 370
%\def\elstob@RwghtTen{460}
%\def\elstob@RwghtEleven{455}
%\def\elstob@RwghtTwelve{450}
%\def\elstob@RwghtThirteen{445} % 17.5- 350

\def\elstob@RwghtOne{560}
\def\elstob@RwghtTwo{550}
\def\elstob@RwghtThree{540}
\def\elstob@RwghtFour{530}
\def\elstob@RwghtFive{520} % -10.5 440
\def\elstob@RwghtSix{510}
\def\elstob@RwghtSeven{500} % -12.5 390
\def\elstob@RwghtEight{490}
\def\elstob@RwghtNine{480} % -14.5 370
\def\elstob@RwghtTen{470}
\def\elstob@RwghtEleven{460}
\def\elstob@RwghtTwelve{450}
\def\elstob@RwghtThirteen{445} % 17.5- 350

\def\elstob@IwghtOne{590}
\def\elstob@IwghtTwo{577.5}
\def\elstob@IwghtThree{565}
\def\elstob@IwghtFour{552.5}
\def\elstob@IwghtFive{540} % -10.5 440
\def\elstob@IwghtSix{515}
\def\elstob@IwghtSeven{490} % -12.5 390
\def\elstob@IwghtEight{470}
\def\elstob@IwghtNine{465} % -14.5 370
\def\elstob@IwghtTen{460}
\def\elstob@IwghtEleven{455}
\def\elstob@RwghtThirteen{440} % 17.5- 350

\def\elstob@IwghtOne{560}
\def\elstob@IwghtTwo{550}
\def\elstob@IwghtThree{540}
\def\elstob@IwghtFour{530}
\def\elstob@IwghtFive{520} % -10.5 440
\def\elstob@IwghtSix{510}
\def\elstob@IwghtSeven{500} % -12.5 390
\def\elstob@IwghtEight{490}
\def\elstob@IwghtNine{480} % -14.5 370
\def\elstob@IwghtTen{470}
\def\elstob@IwghtEleven{460}
\def\elstob@IwghtTwelve{450}
\def\elstob@IwghtThirteen{445} % 17.5- 350
\def\elstob@IwghtThirteen{440} % 17.5- 350

%\def\elstob@IwghtOne{590}
%\def\elstob@IwghtTwo{577.5}
%\def\elstob@IwghtThree{565}
%\def\elstob@IwghtFour{552.5}
%\def\elstob@IwghtFive{540} % -10.5 440
%\def\elstob@IwghtSix{515}
%\def\elstob@IwghtSeven{490} % -12.5 390
%\def\elstob@IwghtEight{470}
%\def\elstob@IwghtNine{465} % -14.5 370
%\def\elstob@IwghtTen{460}
%\def\elstob@IwghtEleven{455}
%\def\elstob@IwghtTwelve{450}
%\def\elstob@IwghtThirteen{445} % 17.5- 350
\fi

\ifelstob@semibold
\def\elstob@BwghtOne{690}
\def\elstob@BwghtTwo{677.5}
\def\elstob@BwghtThree{665}
\def\elstob@BwghtFour{652.5}
\def\elstob@BwghtFive{640}
\def\elstob@BwghtSix{615}
\def\elstob@BwghtSeven{590}
\def\elstob@BwghtEight{570}
\def\elstob@BwghtNine{565}
\def\elstob@BwghtTen{560}
\def\elstob@BwghtEleven{555}
\def\elstob@BwghtOne{660}
\def\elstob@BwghtTwo{650}
\def\elstob@BwghtThree{640}
\def\elstob@BwghtFour{630}
\def\elstob@BwghtFive{620}
\def\elstob@BwghtSix{610}
\def\elstob@BwghtSeven{600}
\def\elstob@BwghtEight{590}
\def\elstob@BwghtNine{580}
\def\elstob@BwghtTen{570}
\def\elstob@BwghtEleven{560}
\def\elstob@BwghtTwelve{550}
\def\elstob@BwghtThirteen{545}

\def\elstob@BIwghtOne{690}
\def\elstob@BIwghtTwo{677.5}
\def\elstob@BIwghtThree{665}
\def\elstob@BIwghtFour{652.5}
\def\elstob@BIwghtFive{640}
\def\elstob@BIwghtSix{615}
\def\elstob@BIwghtSeven{590}
\def\elstob@BIwghtEight{570}
\def\elstob@BIwghtNine{565}
\def\elstob@BIwghtTen{560}
\def\elstob@BIwghtEleven{555}
\def\elstob@BwghtThirteen{540}

\def\elstob@BIwghtOne{660}
\def\elstob@BIwghtTwo{650}
\def\elstob@BIwghtThree{640}
\def\elstob@BIwghtFour{630}
\def\elstob@BIwghtFive{620}
\def\elstob@BIwghtSix{610}
\def\elstob@BIwghtSeven{600}
\def\elstob@BIwghtEight{590}
\def\elstob@BIwghtNine{580}
\def\elstob@BIwghtTen{570}
\def\elstob@BIwghtEleven{560}
\def\elstob@BIwghtTwelve{550}
\def\elstob@BIwghtThirteen{545}
\def\elstob@BIwghtThirteen{540}

%\def\elstob@BwghtOne{690}
%\def\elstob@BwghtTwo{677.5}
%\def\elstob@BwghtThree{665}
%\def\elstob@BwghtFour{652.5}
%\def\elstob@BwghtFive{640}
%\def\elstob@BwghtSix{615}
%\def\elstob@BwghtSeven{590}
%\def\elstob@BwghtEight{570}
%\def\elstob@BwghtNine{565}
%\def\elstob@BwghtTen{560}
%\def\elstob@BwghtEleven{555}
%\def\elstob@BwghtTwelve{550}
%\def\elstob@BwghtThirteen{545}

%\def\elstob@BIwghtOne{690}
%\def\elstob@BIwghtTwo{677.5}
%\def\elstob@BIwghtThree{665}
%\def\elstob@BIwghtFour{652.5}
%\def\elstob@BIwghtFive{640}
%\def\elstob@BIwghtSix{615}
%\def\elstob@BIwghtSeven{590}
%\def\elstob@BIwghtEight{570}
%\def\elstob@BIwghtNine{565}
%\def\elstob@BIwghtTen{560}
%\def\elstob@BIwghtEleven{555}
%\def\elstob@BIwghtTwelve{550}
%\def\elstob@BIwghtThirteen{545}
\fi

\ifelstob@extrabold
\def\elstob@BwghtOne{800}
\def\elstob@BwghtTwo{800}
\def\elstob@BwghtThree{800}
\def\elstob@BwghtFour{800}
\def\elstob@BwghtFive{800}
\def\elstob@BwghtSix{800}
\def\elstob@BwghtSeven{800}
\def\elstob@BwghtEight{790}
\def\elstob@BwghtNine{780}
\def\elstob@BwghtTen{770}
\def\elstob@BwghtEleven{760}
\def\elstob@BwghtTwelve{750}
\def\elstob@BwghtThirteen{740}

\def\elstob@BIwghtOne{800}
\def\elstob@BIwghtTwo{800}
\def\elstob@BIwghtThree{800}
\def\elstob@BIwghtFour{800}
\def\elstob@BIwghtFive{800}
\def\elstob@BIwghtSix{800}
\def\elstob@BIwghtSeven{800}
\def\elstob@BIwghtEight{790}
\def\elstob@BIwghtNine{780}
\def\elstob@BIwghtTen{770}
\def\elstob@BIwghtEleven{760}
\def\elstob@BIwghtTwelve{750}
\def\elstob@BIwghtThirteen{740}

%\def\elstob@BwghtOne{690}
%\def\elstob@BwghtTwo{677.5}
%\def\elstob@BwghtThree{665}
%\def\elstob@BwghtFour{652.5}
%\def\elstob@BwghtFive{640}
%\def\elstob@BwghtSix{615}
%\def\elstob@BwghtSeven{590}
%\def\elstob@BwghtEight{570}
%\def\elstob@BwghtNine{565}
%\def\elstob@BwghtTen{560}
%\def\elstob@BwghtEleven{555}
%\def\elstob@BwghtTwelve{550}
%\def\elstob@BwghtThirteen{545}

%\def\elstob@BIwghtOne{690}
%\def\elstob@BIwghtTwo{677.5}
%\def\elstob@BIwghtThree{665}
%\def\elstob@BIwghtFour{652.5}
%\def\elstob@BIwghtFive{640}
%\def\elstob@BIwghtSix{615}
%\def\elstob@BIwghtSeven{590}
%\def\elstob@BIwghtEight{570}
%\def\elstob@BIwghtNine{565}
%\def\elstob@BIwghtTen{560}
%\def\elstob@BIwghtEleven{555}
%\def\elstob@BIwghtTwelve{550}
%\def\elstob@BIwghtThirteen{545}
\fi

\def\elstob@spac{0}
Expand Down
Binary file modified TeX/elstob-package.pdf
Binary file not shown.
Loading

0 comments on commit e68e430

Please sign in to comment.