ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: euro file
Date: Thu, 22 Jun 2000 12:53:54 +0200	[thread overview]
Message-ID: <3.0.6.32.20000622125354.0085f340@pop.wxs.nl> (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
-------------------------------------------------------------------------

                 reply	other threads:[~2000-06-22 10:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3.0.6.32.20000622125354.0085f340@pop.wxs.nl \
    --to=pragma@wxs.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).