ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Willi Egger <context@boede.nl>
Subject: Re: Symbols
Date: Wed, 21 Nov 2012 10:26:30 +0100	[thread overview]
Message-ID: <50AC9E46.3070209@wxs.nl> (raw)
In-Reply-To: <15AEA31A-A842-4C94-977E-D0C5B956C108@boede.nl>

On 11/20/2012 5:21 PM, Willi Egger wrote:
> Hi all,
>
> could someone bring light into the way how to use symbols…in MKIV
>
> I wanted to extract a symbol from uzdr (Zapfdingbats).

(Somehow uzdr.afm and uzdr.pfb are not in my tex tree. I always thought 
that they were part of the standalone but nothing surprises me as these 
fonts have a history of instability.)

(Copied from an upcoming font manual:)

\startsection[title=Unicoding]

Nowadays we will mostly use fonts that ship with a \UNICODE\ aware 
encoding. And
in \CONTEXT, even if we use a \TYPEONE\ font, it gets mapped onto \UNICODE.
However, there are some exceptions, for instance the Zapf Dingbats in 
\TYPEONE\
format. These have a rather obscure private encoding and the glyph names 
run from
\type {a1} upto \type {a206} and have no relation to what the glyph 
represents.

In the case of Dingbats we're somewhat lucky that they ended up in 
\UNICODE, so
we can relocate the glyphs to match their rightful place. This is done 
by means
of a goodies file. We already discussed this in \in {section} [goodies] 
so we
only repeat the usage.

\startbuffer
\definefontfeature
   [dingbats]
   [mode=base,
    goodies=dingbats,
    unicoding=yes]

\definefontsynonym
   [ZapfDingbats]
   [file:uzdr.afm]
   [features=dingbats]
\stopbuffer

\typebuffer \getbuffer

I tend to qualify the Dingbat font in \TEX\ distributions as rather unstable
because of name changes and them either or not being included. Therefore 
it's best to
use the hard coded name because that triggers the most visible error 
message when
the font is not found.

A font like this can for instance be used with the glyph placement 
macros as is
demonstrated below. In the last line we see that a direct \UTF\ input 
also works
out well.

\starttabulate[|||]
\HL
\NC \type{\getglyphdirect     {ZapfDingbats*dingbats}{\number"2701}} \NC 
\getglyphdirect     {ZapfDingbats*dingbats}{\number"2701} \NC \NR
\NC \type{\getglyphdirect     {ZapfDingbats*dingbats}{\char"2701}}   \NC 
\getglyphdirect     {ZapfDingbats*dingbats}{\char"2701}   \NC \NR
\NC \type{\getnamedglyphdirect{ZapfDingbats*dingbats}{a1}}           \NC 
\getnamedglyphdirect{ZapfDingbats*dingbats}{a1}           \NC \NR
\NC \type{\getnamedglyphdirect{ZapfDingbats*dingbats}{a11}}          \NC 
\getnamedglyphdirect{ZapfDingbats*dingbats}{a11}          \NC \NR
\HL
\NC \type{\getglyphdirect     {ZapfDingbats}{\number"2701}}          \NC 
\getglyphdirect     {ZapfDingbats}{\number"2701}          \NC \NR
\NC \type{\getglyphdirect     {ZapfDingbats}{\char"2701}}            \NC 
\getglyphdirect     {ZapfDingbats}{\char"2701}            \NC \NR
\NC \type{\getnamedglyphdirect{ZapfDingbats}{a1}}                    \NC 
\getnamedglyphdirect{ZapfDingbats}{a1}                    \NC \NR
\NC \type{\getnamedglyphdirect{ZapfDingbats}{a11}}                   \NC 
\getnamedglyphdirect{ZapfDingbats}{a11}                   \NC \NR
\HL
\NC \type{\definedfont[ZapfDingbats*dingbats]✁}                      \NC 
\definedfont[ZapfDingbats*dingbats]✁                      \NC \NR
\HL
\stoptabulate

Keep in mind that fonts like Dejavu (that we use here as document font) 
already
has these characters which is why it shows up in the verbose part of the 
table.

\stopsection

-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2012-11-21  9:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-20 16:21 Symbols Willi Egger
2012-11-21  9:26 ` Hans Hagen [this message]
2012-11-21 13:05   ` Symbols Willi Egger
  -- strict thread matches above, loose matches on Subject: below --
2007-02-21 12:00 Symbols Bernd Militzer
2007-02-21 12:42 ` Symbols Taco Hoekwater
2007-02-21 13:31   ` Symbols Hans Hagen
2007-02-21 14:05   ` Symbols Bernd Militzer
     [not found] <OF260B86F5.44AAB781-ONCA256D10.0029553F@tk.jp.world.socgen >
2003-04-22  9:24 ` Symbols Hans Hagen
2003-04-22  7:33 Symbols emmanuel.rialland

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=50AC9E46.3070209@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=context@boede.nl \
    --cc=ntg-context@ntg.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).