summaryrefslogtreecommitdiff
path: root/texmf-dist/tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2017-09-21 18:26:41 +0900
committerNorbert Preining <norbert@preining.info>2017-09-21 18:26:41 +0900
commit566c85b5c476054837bfe835cba2190ed112a554 (patch)
tree92080b2c720d1216b91cab558be3d8de469ee8df /texmf-dist/tex
parent82339a39cb8fb255d991dd99bc055c08cd15c7d8 (diff)
add spark-otf
Diffstat (limited to 'texmf-dist/tex')
-rw-r--r--texmf-dist/tex/latex/spark-otf/spark-otf.sty46
1 files changed, 46 insertions, 0 deletions
diff --git a/texmf-dist/tex/latex/spark-otf/spark-otf.sty b/texmf-dist/tex/latex/spark-otf/spark-otf.sty
new file mode 100644
index 00000000..21f720b5
--- /dev/null
+++ b/texmf-dist/tex/latex/spark-otf/spark-otf.sty
@@ -0,0 +1,46 @@
+%% $Id: spark-otf.sty 556 2017-09-18 06:22:29Z 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 2017 Herbert Voss hvoss@tug.org
+%%
+\ProvidesPackage{spark-otf}[%
+ 2017/09/19 v. 0.01 (Herbert Voss) Supports spark OpenType for lualatex/xelatex.]
+%
+\RequirePackage{ifxetex,ifluatex,xkeyval,fontspec,xparse}
+%
+\newif\ifspark@usefilenames \spark@usefilenamesfalse
+\DeclareOptionX{usefilenames}[true]{\@nameuse{spark@usefilenames#1}}
+%
+\providecommand\spark@DefaultFeatures{}
+\DeclareOptionX{DefaultFeatures}{\def\spark@DefaultFeatures{#1}}
+
+\ProcessOptionsX\relax
+
+\ifspark@usefilenames
+\typeout {Using file names for the spark font}%
+%----------------------------------------- file names ----------------------------
+
+\else
+ \typeout {Using symbolic names for the spark font}%
+%----------------------------------------- symbolic names ----------------------------
+ \newfontfamily\sparkBarMedium{SparkBar-Medium}[RawFeature=+calt,\spark@DefaultFeatures]
+ \newfontfamily\sparkBarNarrow{SparkBar-Narrow}[RawFeature=+calt,\spark@DefaultFeatures]
+ \newfontfamily\sparkBarThin{SparkBar-Thin}[RawFeature=+calt,\spark@DefaultFeatures]
+%
+ \newfontfamily\sparkDotLine{Spark-Dot-lineMedium}[RawFeature=+calt,\spark@DefaultFeatures]
+%
+ \newfontfamily\sparkDotMedium{Spark-DotMedium}[RawFeature=+calt,\spark@DefaultFeatures]
+ \newfontfamily\sparkDotSmall{Spark-DotSmall}[RawFeature=+calt,\spark@DefaultFeatures]
+\fi
+%
+\NewDocumentCommand\sparkBar{oO{}mO{}}{{%
+ \IfValueTF{#1}{\@nameuse{sparkBar#1}}{\sparkBarMedium}#2\string{#3\string}#4%
+}}
+\NewDocumentCommand\sparkDot{oO{}mO{}}{{%
+ \IfValueTF{#1}{\@nameuse{sparkDot#1}}{\sparkDotMedium}#2\string{#3\string}#4%
+}}
+
+\endinput