ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* euro file
@ 2000-06-22 10:53 Hans Hagen
  0 siblings, 0 replies; only message in thread
From: Hans Hagen @ 2000-06-22 10:53 UTC (permalink / raw)





[-- Attachment #2: test-eur.tex --]
[-- Type: text/plain, Size: 3879 bytes --]

% to be renamed to symb-eur.tex and loaded with \usesymbols[eur]

% some changes and additions to mult-sys.tex and font-ini.tex

\unprotect 

\definesystemconstant {Serif} \definesystemconstant {Regular}
\definesystemconstant {Sans}  \definesystemconstant {Support}
\definesystemconstant {Mono}  \definesystemconstant {Type}

\def\fontstringA%
  {\ifx\fontstyle\c!rm     \s!Serif \else
   \ifx\fontstyle\c!ss      \s!Sans \else
   \ifx\fontstyle\c!tt      \s!Mono \else
                           \s!Serif \fi\fi\fi}

\def\fontstringB%
  {\ifx\fontstyle\c!rm   \s!Regular \else
   \ifx\fontstyle\c!ss   \s!Support \else
   \ifx\fontstyle\c!tt      \s!Type \else
                           \s!Serif \fi\fi\fi}

\def\fontstringC%
  {\ifnum\fam=\bffam        \s!Bold \else
   \ifnum\fam=\slfam     \s!Slanted \else
   \ifnum\fam=\itfam      \s!Italic \else
   \ifnum\fam=\bsfam \s!BoldSlanted \else
   \ifnum\fam=\bifam  \s!BoldItalic \s!Regular \fi\fi\fi\fi\fi}

\beginETEX \ifcsname

\def\glyphfontfile#1%
  {#1%
   \ifcsname\??ff#1\fontstringA\fontstringC\endcsname
     \fontstringA\fontstringC
   \else\ifcsname\??ff#1\fontstringB\fontstringC\endcsname
     \fontstringB\fontstringC
   \else\ifcsname\??ff#1\fontstringA\endcsname
     \fontstringA
   \else\ifcsname\??ff#1\fontstringB\endcsname
     \fontstringB
   \else\ifcsname\??ff#1\fontstringC\endcsname
     \fontstringC
   \fi\fi\fi\fi\fi}

\endETEX

\beginTEX \ifcsname

\def\glyphfontfile#1%
  {#1%
   \expandafter\ifx\csname\??ff#1\fontstringA\fontstringC\endcsname\relax
     \expandafter\ifx\csname\??ff#1\fontstringB\fontstringC\endcsname\relax
       \expandafter\ifx\csname\??ff#1\fontstringA\endcsname\relax
         \expandafter\ifx\csname\??ff#1\fontstringB\endcsname\relax
           \expandafter\ifx\csname\??ff#1\fontstringC\endcsname\relax
           \else \fontstringC             \fi
           \else \fontstringB             \fi
           \else \fontstringA             \fi
           \else \fontstringB\fontstringC \fi
           \else \fontstringA\fontstringC \fi}

\endTEX

\def\getglyph#1#2% 
  {{\definefont[\s!dummy][\glyphfontfile{#1} sa \currentfontscale]\dummy#2}}

\protect 

% the new file symb-eur

\definefontsynonym [EuroSerif]            [eurose]
\definefontsynonym [EuroSerifBold]        [euroseb]
\definefontsynonym [EuroSerifItalic]      [eurosei]
\definefontsynonym [EuroSerifSlanted]     [eurosei]
\definefontsynonym [EuroSerifBoldItalic]  [eurosebi]
\definefontsynonym [EuroSerifBoldSlanted] [eurosebi]

\definefontsynonym [EuroSans]             [eurosa]
\definefontsynonym [EuroSansBold]         [eurosab]
\definefontsynonym [EuroSansItalic]       [eurosai]
\definefontsynonym [EuroSansSlanted]      [eurosai]
\definefontsynonym [EuroSansBoldItalic]   [eurosabi]
\definefontsynonym [EuroSansBoldSlanted]  [eurosabi]

\definefontsynonym [EuroMono]             [euromo]
\definefontsynonym [EuroMonoBold]         [euromob]
\definefontsynonym [EuroMonoSlanted]      [euromoi]
\definefontsynonym [EuroMonoItalic]       [euromoi]
\definefontsynonym [EuroMonoBoldItalic]   [euromobi]
\definefontsynonym [EuroMonoBoldSlanted]  [euromobi]

\definesymbol [euro] [\getglyph{Euro}{\char160}]

\def\euro{\symbol[euro]}

%D The next table shows the complete set of symbols:
%D 
%D \starttabulate[|l|c|c|c|c|c|c|]
%D \NC           \NC \tex{tf}    \NC \tex{bf}    \NC \tex{sl} 
%D               \NC \tex{it}    \NC \tex{bs}    \NC \tex{bi}    \NC\NR
%D \NC \rm Serif \NC \rm\tf\euro \NC \rm\bf\euro \NC \rm\sl\euro 
%D               \NC \rm\it\euro \NC \rm\bs\euro \NC \rm\bi\euro \NC\NR
%D \NC \ss Sans  \NC \ss\tf\euro \NC \ss\bf\euro \NC \ss\sl\euro 
%D               \NC \ss\it\euro \NC \ss\bs\euro \NC \ss\bi\euro \NC\NR
%D \NC \tt Mono  \NC \tt\tf\euro \NC \tt\bf\euro \NC \tt\sl\euro 
%D               \NC \tt\it\euro \NC \tt\bs\euro \NC \tt\bi\euro \NC\NR  
%D \stoptabulate

\endinput

[-- Attachment #3: Type: text/plain, Size: 370 bytes --]

-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.nl
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-06-22 10:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-22 10:53 euro file Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).