From 566c85b5c476054837bfe835cba2190ed112a554 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 21 Sep 2017 18:26:41 +0900 Subject: add spark-otf --- texmf-dist/tex/latex/spark-otf/spark-otf.sty | 46 ++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 texmf-dist/tex/latex/spark-otf/spark-otf.sty (limited to 'texmf-dist/tex') 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 -- cgit v1.2.3