summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/countriesofeurope/countriesofeurope.sty (renamed from Master/texmf-dist/tex/latex/countriesofeurope/CountriesofEurope.sty)66
1 files changed, 45 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/latex/countriesofeurope/CountriesofEurope.sty b/Master/texmf-dist/tex/latex/countriesofeurope/countriesofeurope.sty
index 4fd2039f0ff..ca07f5b1efa 100644
--- a/Master/texmf-dist/tex/latex/countriesofeurope/CountriesofEurope.sty
+++ b/Master/texmf-dist/tex/latex/countriesofeurope/countriesofeurope.sty
@@ -12,14 +12,16 @@
%% version 2005/12/01 or later.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{CountriesofEurope}%
- [2018/12/27 v0.22 CountriesofEurope Font (hv,RN)]
+\ProvidesPackage{countriesofeurope}%
+ [2018/12/29 v0.23 countriesofeurope Font (hv,RN)]
+\PassOptionsToPackage{rgb}{xcolor}
+\RequirePackage{ifxetex,ifluatex,xkeyval,graphicx,xcolor}
-\RequirePackage{ifxetex,ifluatex,xkeyval,graphicx}
-
-\newcommand*\CountriesofEurope@scale{1}
+\newcommand*\countriesofeurope@scale{1}
+\newcommand*\countriesofeurope@ligatures{ResetAll}
\RequirePackage{xkeyval}
-\DeclareOptionX{Scale}{\renewcommand*\CountriesofEurope@scale{#1}}
+\DeclareOptionX{Scale}{\renewcommand*\countriesofeurope@scale{#1}}
+\DeclareOptionX{Ligatures}{\renewcommand*\countriesofeurope@ligatures{#1}}
\ProcessOptionsX\relax
\newif\ifCoE@outline
@@ -28,10 +30,17 @@
\define@key{CoE}{Scale}[1]{\def\CoE@Scale{#1}}
\define@key{CoE}{outline}[true]{\lowercase{\CoE@boolkey{#1}}{outline}}
+\define@key{CoE}{fillcolor}[]{\def\CoE@fillcolor{#1}}
+\define@key{CoE}{linecolor}[black]{\def\CoE@linecolor{#1}}
%
\def\setCoEkeys#1{\edef\x{\noexpand\setkeys{CoE}{#1}}\x}
-\setCoEkeys{outline=false,Scale=1}
+\setCoEkeys{outline=false,Scale=1,fillcolor=,linecolor=black}
+
+\def\getPDFsyntax#1,#2,#3\@nil#4{\gdef#4{#1 #2 #3}}
+\def\getPDFcolor#1#2{\extractcolorspecs{#1}\Col@A\Col@B\relax
+ \expandafter\getPDFsyntax\Col@B\@nil#2\relax
+}
\newif\if@CoE@newengine \@CoE@newenginefalse
\ifxetex\@CoE@newenginetrue
@@ -40,25 +49,40 @@
\fi
\if@CoE@newengine
- \def\set@Outline{\pdfextension literal direct { 1 Tr 0 w }\relax}
- \def\unset@Outline{\pdfextension literal direct { 0 Tr 0 w }\relax}
+ \def\set@Outline{%
+ \ifx\CoE@fillcolor\@empty
+ \pdfextension literal direct { 1 Tr 0 w }\relax
+ \else
+ \getPDFcolor{\CoE@linecolor}\CoE@pdf@linecolor
+ \getPDFcolor{\CoE@fillcolor}\CoE@pdf@fillcolor
+ \pdfextension literal direct{ \CoE@pdf@fillcolor\space rg \CoE@pdf@linecolor\space RG 2 Tr 0 w }\relax
+ \fi}
+ \def\unset@Outline{\pdfextension literal direct{ 0 Tr 0 w }\relax}%
\else
- \def\set@Outline{\pdfliteral direct { 1 Tr 0 w }\relax}
- \def\unset@Outline{\pdfliteral direct { 0 Tr 0 w }\relax}
+ \def\set@Outline{%
+ \ifx\relax\CoE@fillcolor\relax
+ \pdfliteral direct { 1 Tr 0 w }\relax
+ \else
+ \getPDFcolor{\CoE@linecolor}\CoE@pdf@linecolor
+ \getPDFcolor{\CoE@fillcolor}\CoE@pdf@fillcolor
+ \pdfliteral direct{ \CoE@pdf@fillcolor\space rg \CoE@pdf@linecolor\space RG 2 Tr 0 w }\relax
+ \fi}%
+ \def\unset@Outline{\pdfliteral direct{ 0 Tr 0 w }\relax}%
\fi
\newcommand\EUCountry[2][]{{%
\expandafter\setCoEkeys\expandafter{#1}%
- \CountriesofEuropeFamily\scalebox{\CoE@Scale}{%
- \ifCoE@outline\set@Outline\fi
- \csname#2\endcsname
- \ifCoE@outline\unset@Outline\fi
+ \countriesofeuropefamily\scalebox{\CoE@Scale}{%
+ \ifCoE@outline\set@Outline\fi%
+ \csname#2\endcsname%
+ \ifCoE@outline\unset@Outline\fi%
}}}
\if@CoE@newengine
\RequirePackage{fontspec}
- \newfontface\CountriesofEuropeFamily{CountriesofEurope.otf}[Scale=\CountriesofEurope@scale]
- \let\CoEF\CountriesofEuropeFamily
+ \newfontface\countriesofeuropefamily{countriesofeurope.otf}%
+ [Scale=\countriesofeurope@scale,Ligatures=\countriesofeurope@ligatures]
+ \let\CoEF\countriesofeuropefamily
\DeclareTextCommand{\Albania}{TU}{\char"F8EC}% 63724
\DeclareTextCommand{\Andorra}{TU}{\char"F8EB}
\DeclareTextCommand{\Austria}{TU}{\char"F8EA}
@@ -101,9 +125,9 @@
\else
\RequirePackage[T1]{fontenc}
\RequirePackage{textcomp}
- \DeclareFontFamily{U}{CountriesofEurope}{}
- \DeclareFontShape{U}{CountriesofEurope}{m}{n}{<->s*[\CountriesofEurope@scale]CountriesofEurope}{}
- \providecommand\CountriesofEuropeFamily{\usefont{U}{CountriesofEurope}{m}{n}}
+ \DeclareFontFamily{U}{countriesofeurope}{}
+ \DeclareFontShape{U}{countriesofeurope}{m}{n}{<->s*[\countriesofeurope@scale]countriesofeurope}{}
+ \providecommand\countriesofeuropefamily{\usefont{U}{countriesofeurope}{m}{n}}
\DeclareTextCommand{\Albania}{U}{\char128}
\DeclareTextCommand{\Andorra}{U}{\char129}
\DeclareTextCommand{\Austria}{U}{\char130}
@@ -144,7 +168,7 @@
\DeclareTextCommand{\Sweden}{U}{\char165}
\DeclareTextCommand{\Switzerland}{U}{\char166}
\fi
-% otftotfm --encoding=CountriesofEurope.enc --no-map CountriesofEurope.otf CountriesofEurope
+% otftotfm --encoding=countriesofeurope.enc --no-map countriesofeurope.otf countriesofeurope
\endinput