ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ConTeXt <ntg-context@ntg.nl>
Subject: Re: Setting up lbr fonts
Date: Wed, 23 Jan 2002 09:54:07 +0100	[thread overview]
Message-ID: <5.1.0.14.1.20020123093117.033d0c00@server-1> (raw)
In-Reply-To: <20020123024402.14904188.morawski@gmx.net>

At 02:44 AM 1/23/2002 +0100, Jens-Uwe Morawski wrote:

>I know that ConTeXt prefers texfont.pl, but i hope fonts already
>installed using fontinst can be covered too, since fontinst is
>afaik the only way where i can substitute the numbers of a font with
>its oldstyle variants (choosing pplj instead of pplx
>gives me oldstyle numbers).
>
>I hope somebody has the time and can manage this.

If you don't use texfont.pl, the main thing you need to do is to find out 
what the names are of the tfm's that fontinst generates.

You can make typescripts as simple as you want, skipping symbolic names, or 
even not using typescript and using \definefont directly, but then you 
loose a couple of abstractions.

Say that you have this palatino and that you used fontinst to generate ec 
encoded fonts, then you have to make a script like:

\starttypescript [serif] [adobepalatino] [ec]

   \definefontsynonym [Palatino]      [thefontinstgeneratedname]
   \definefontsynonym [PalatinoBold]  [anotherfontinstgeneratedname]

\stoptypescript

It's a serif font, so now we define an accompanying serif script:

\starttypescript [serif] [adobepalatino] [name]

   \definefontsynonym [Serif]      [Palatino]
   \definefontsynonym [SerifBold]  [PalatinoBold]

\stoptypescript

Say that you put these script in a file called typeface.tex that you put 
somewhere where tex can find it. In your document (or style) you now need 
to tell context that you need this file:

\usetypescriptfile[typeface]

you will probably have a map file too and you can either load that one in 
pdftex.cfg or let context do that.

The next thing is using this font. Of course you can execute typescripts 
yourself but best is to use the command

\definetypeface [myface] [rm] [serif] [adobepalatino] [default] [encoding=ec]

this means as much as: create a typeface, map it to the rm families, using 
the serif definitions of adobepalatino matching encodning ec, and use the 
default size definition scripts.

In a similar way you can add ss, tt, mm, etc definitions to this typeface 
'myface'. Bewaqre, use rscale=... to achieve relative scaling, if needed.

Now you need to activate this typeface (because each typeface has its own 
namespace, you can mix 'm any way you want]

\setupbodyfont[myface,10pt,rm]

Now you should have an adobe palatino document.

If you do it this way, you can also say (handy for titlepages and so):

{\definedfont[SerifBold at 60pt]This is a big title}

or

\definefont[VeryBigFont][Palatino at 150pt] \VeryBigFont Guess what 
(happens after \setuphead[chapter][style=VeryBigFont])

Now, the whole idea behind this concept is that you can build your own set 
of definitions (typefaces); here we have for instance one typeface.tex file 
per project and a couple of general system wide ones for ourself.

Back to texfont vs fontinst: in the case of texfont, you can more 
conveniently mix multiple instances, like three regular weights of a 
multipel master, or seven different slanted palatino's; in the case of 
fontinst you have the advantages you already mentioned, but you're on your 
own to figure out what file names are used as well as prevent nameclashes 
yourself].

BTW, does patrick still has this idea of reprogramming those font tools?

Hans

-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                                   fall-back web server: 
www.pragma-pod.nl
-------------------------------------------------------------------------


  reply	other threads:[~2002-01-23  8:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-22 11:45 Randall Skelton
2002-01-22 12:28 ` Hans Hagen
2002-01-23  1:44   ` Jens-Uwe Morawski
2002-01-23  8:54     ` Hans Hagen [this message]
2002-01-24 10:56       ` Jens-Uwe Morawski
2002-01-24 13:23         ` Hans Hagen
2002-01-25  7:25           ` Jens-Uwe Morawski
2002-01-25  9:46             ` Hans Hagen

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=5.1.0.14.1.20020123093117.033d0c00@server-1 \
    --to=pragma@wxs.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).