ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Truetype fonts in ConTeXt
@ 2000-04-10 18:15 Christopher G D Tipper
  2000-04-10 22:31 ` Hans Hagen
  2000-04-11 11:32 ` Font tutorial (Re: Truetype fonts in ConTeXt) Taco Hoekwater
  0 siblings, 2 replies; 6+ messages in thread
From: Christopher G D Tipper @ 2000-04-10 18:15 UTC (permalink / raw)


I'd like to use Microsoft's TrueType font 'Verdana' as a headline font in my ConTeXt documents, and I was wondering if anyone could give me a 'conceptual' guide to the situation regarding font-definition files in ConTeXt? Is there any way of 'inheriting' the pdfTeX configuration (.fd) files? I've installed Vredana in pdfTeX and it works quite nicely under pdfLaTeX. However, I get the impression from a cursory scan of the font-*.tex files in the ConTeXt distribution that installing new fonts comes under the heading of rocket-science, even by the rarefied standards of TeX!

For the future, Adobe Acrobat comes distributed with the Lucida Bright family of fonts in TrueType, and I'd like to be able to use these. I inspected www.yandy.com and they seem to want something like $250 for Lucida+Mathtime, Type 1 .pfb files. At the moment I can't afford that, and can manage without Mathtime in the immediate future. So does anyone have a font definition format for LucidaBright, LucidaSans and LucidaTypewriter, but in Truetype format?

Kind regards,
Christopher
-
Nil Desperandum Illegitimi - Don't let the bastards get you down (with apologies to Ovid)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Truetype fonts in ConTeXt
  2000-04-10 18:15 Truetype fonts in ConTeXt Christopher G D Tipper
@ 2000-04-10 22:31 ` Hans Hagen
  2000-04-11 11:32 ` Font tutorial (Re: Truetype fonts in ConTeXt) Taco Hoekwater
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2000-04-10 22:31 UTC (permalink / raw)
  Cc: ConTeXt Mailing List

At 09:15 PM 4/10/2000 +0300, Christopher G D Tipper wrote:

impression from a cursory scan of the font-*.tex files in the ConTeXt
distribution that installing new fonts comes under the heading of
rocket-science, even by the rarefied standards of TeX!

Only the cmr defs are cumbersome. 

Given that you map the filenames ok you can use the existing defs. 

\setupbodyfont[ber,lbr] % berry naming

Next add lines like the following to the pdftex map file:

lbr LucidaBright       4 <lbr.ttf texnansi.enc
lbd LucidaBright-Demi  4 <lbd.ttf texnansi.enc

(I suppose taco knows the real lines)

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Font tutorial (Re: Truetype fonts in ConTeXt)
  2000-04-11 11:32 ` Font tutorial (Re: Truetype fonts in ConTeXt) Taco Hoekwater
@ 2000-04-11  8:52   ` Hans Hagen
  2000-04-11 15:02     ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2000-04-11  8:52 UTC (permalink / raw)
  Cc: ctipper, ntg-context

At 11:32 AM 4/11/2000 +0000, Taco Hoekwater wrote:

>1. You need to create a file called font-xxx.tex, where xxx is a short 
>   code for the font in question. For verdana, the best would be
>   font-ver.tex. This file will contain the Context definitions for the
>   verdana family (more below).

I will work out a user naming scheme some day soon, since we need to have
consistency in this -) 

>\definefontsynonym [@FONTFAMILYNAME@-Roman]      [@TFMNAME1@]
[encoding=@ENC@]

Taco, what is the normal way: SomethingBold or Something-Bold. I encounter
both, so should we stick to one or mix? 

I suggest we make this into a nice font installation manual! We can discuss
this during the bachotek trip. 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Font tutorial (Re: Truetype fonts in ConTeXt)
  2000-04-10 18:15 Truetype fonts in ConTeXt Christopher G D Tipper
  2000-04-10 22:31 ` Hans Hagen
@ 2000-04-11 11:32 ` Taco Hoekwater
  2000-04-11  8:52   ` Hans Hagen
  1 sibling, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2000-04-11 11:32 UTC (permalink / raw)
  Cc: ntg-context

>>>>> "Christopher" == Christopher G D Tipper <ctipper@hol.gr> writes:

    Christopher> I'd like to use Microsoft's TrueType font 'Verdana'
    Christopher> as a headline font in my ConTeXt documents, and I was

Here is the basic approach:

1. You need to create a file called font-xxx.tex, where xxx is a short 
   code for the font in question. For verdana, the best would be
   font-ver.tex. This file will contain the Context definitions for the
   verdana family (more below).

2. In the source document, you do \setupbodyfont[ver].
   This command makes Context load font-ver.tex

   For a 'real' document, you would rather do this:

   \setupbodyfont[ber,pos,ver]:

   font-pos: defines Times/Helv/Courier in an indirect way
   font-ber: maps this indirection to Karl Berry TFM names
             (default is Y&Y style TFM names)
   font-ver: this will overwrite the definitions for 'ss'
             (order is important: ver,pos would overwrite your verdana
			 with helvetica from 'font-pos').

3. You need the font metrics and the actual font files.
   (And you need to know the TFM names to write the defn. file)

4. You need pdftex.map entries for these fonts.
   (you had those already, yes? Otherwise, you need to read 
   the pdftex manual)

So far the theory.

Here is a basic, template-like font-xxx.tex, that you can use to fill
in the needed definitions for font-ver.tex:

% TEMPLATE

\definefontsynonym [@FONTFAMILYNAME@-Roman]      [@TFMNAME1@] [encoding=@ENC@]
\definefontsynonym [@FONTFAMILYNAME@-Italic]     [@TFMNAME2@] [encoding=@ENC@]
\definefontsynonym [@FONTFAMILYNAME@-Slanted]    [@TFMNAME3@] [encoding=@ENC@]
\definefontsynonym [@FONTFAMILYNAME@-Bold]       [@TFMNAME4@] [encoding=@ENC@]
\definefontsynonym [@FONTFAMILYNAME@-BoldItalic] [@TFMNAME5@] [encoding=@ENC@]
\definefontsynonym [@FONTFAMILYNAME@-BoldSlanted][@TFMNAME6@] [encoding=@ENC@]
\definefontsynonym [@FONTFAMILYNAME@-Caps]       [@TFMNAME7@] [encoding=@ENC@]

\definefontsynonym [@FONTFAM@]            [@FONTFAMILYNAME@-Roman]
\definefontsynonym [@FONTFAM@Bold]        [@FONTFAMILYNAME@-Bold]
\definefontsynonym [@FONTFAM@Italic]      [@FONTFAMILYNAME@-Italic]
\definefontsynonym [@FONTFAM@Slanted]     [@FONTFAMILYNAME@-Slanted]
\definefontsynonym [@FONTFAM@BoldItalic]  [@FONTFAMILYNAME@-BoldItalic]
\definefontsynonym [@FONTFAM@BoldSlanted] [@FONTFAMILYNAME@-BoldSlanted]
\definefontsynonym [@FONTFAM@Caps]        [@FONTFAMILYNAME@-Caps]

\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [rm] [default]
\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [ss] [default]
\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [tt] [default]

\endinput       

% END TEMPLATE

In the Above file, replace with the following
(always remove my double quotes):

@FONTFAMILYNAME@ -> the 'textual' font family name, in your case
                    "Verdana"
@TFMNAME1..7@    -> The seven possible different TFM file names
                    I don't know these for verdana, but for Times
                    in EC encoding, (as example) these would be:

					"ptmr8t"
					"ptmri8t"
					"ptmro8t"
					"ptmb8t"
					"ptmbi8t"
					"ptmbo8t"
					"ptmrc8t"

                    If some of them are missing, just duplicate
                    something else.

@ENC@            -> The encoding for this particular TFM file.
                    For karl berry TFM names, the basic rule is:

					xxxxx8t -> replace with "ec"
					xxxxx8y -> replace with "texnansi"
					xxxxx7t -> delete "[encoding=....]" completely

                    Context doesn't want to guess this from the file
                    name, since that would give problems with symbolic 
                    fonts.

@FONTFAM@        -> One of "Serif" (\rm), "Sans" (\ss) or "Mono" (\tt)

And that's all there is to it, actually. 

%% optional remark below.

Just in case you are wondering, these lines:

\definefontsynonym [@FONTFAMILYNAME@-Caps][@TFMNAME7@] [encoding=@ENC@]
\definefontsynonym [@FONTFAM@Caps]        [@FONTFAMILYNAME@-Caps]

*can* be merged into

\definefontsynonym [@FONTFAM@Caps] [@TFMNAME7@] [encoding=@ENC@]

however, the basic idea is that you can split this definition into two
separate files (right after the tfm defs) so that you can have Font
Family name definitions that do not depend on the actual tfm file
names.

To put it another way: One special file should ideally define all of
the TFM file name <-> Font Family Name mappings that are available on
your local system, and the other font-XXX.tex would contain only the
second part of the template above.

In fact, that is precisely what font-ber.tex does for a number of
standard PostSCript fonts. But these definitions could also be in
cont-usr.tex, for example.

Hope this makes sense. If not, let me know.

    Christopher> For the future, Adobe Acrobat
    Christopher> comes distributed with the Lucida Bright family of
    Christopher> fonts in TrueType, and I'd like to be able to use
    Christopher> these. 

Short answer provided by Hans, but until Adobe actually starts
shipping I wouldn't trust it. They'll probably use the 'Printer-disk'
version of the TTFs, and these are not particularly good nor do they
contain all of the characters.

Greetings, Taco

-- 
Taco Hoekwater                                 taco.hoekwater@wkap.nl
Kluwer Academic Publishers                            -- Pre Press --
Achterom 119, 3311 KB Dordrecht, The Netherlands  tel.  31-78-6392550
---------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Font tutorial (Re: Truetype fonts in ConTeXt)
  2000-04-11 15:02     ` Taco Hoekwater
@ 2000-04-11 12:36       ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2000-04-11 12:36 UTC (permalink / raw)
  Cc: ntg-context

At 03:02 PM 4/11/2000 +0000, Taco Hoekwater wrote:

>at all). Then we could patch the program that creates the .map files
>to create this file automatically.

The next pdftex has \pdfmapfile, so we can write and read one!

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Font tutorial (Re: Truetype fonts in ConTeXt)
  2000-04-11  8:52   ` Hans Hagen
@ 2000-04-11 15:02     ` Taco Hoekwater
  2000-04-11 12:36       ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2000-04-11 15:02 UTC (permalink / raw)


>>>>> "Hans" == Hans Hagen <pragma@wxs.nl> writes:

    Hans> At 11:32 AM 4/11/2000 +0000, Taco Hoekwater wrote:
    >> 1. You need to create a file called font-xxx.tex, where xxx is
    >> a short code for the font in question. For verdana, the best
    >> would be font-ver.tex. This file will contain the Context
    >> definitions for the verdana family (more below).

    Hans> I will work out a user naming scheme some day soon, since we
    Hans> need to have consistency in this -)

Right, esp. because there is some other chaos related to font-ber 
and it's contents. It might be a better idea to create just one
(system-wide) local font entry in cont-sys or cont-usr, that either
calls for Y&Y names or for berry ones (no more built-in default names
at all). Then we could patch the program that creates the .map files
to create this file automatically.

    Hans> Taco, what is the normal way: SomethingBold or
    Hans> Something-Bold. I encounter both, so should we stick to one
    Hans> or mix?

For PostScript font names: with "-". There is an Adobe technical
supp. about names for Type1 fonts (#5088, Font Naming Issues), you can
get it from:

http://partners.adobe.com/asn/developer/technotes.html

It proposes:

<Family Name><Vendor ID> -<Weight><Width><Slant><Character Set>

For TrueType, there is no 'clear rule', because they are not put into
menus based on the font name, but on the (fixed) split-up set of
FamilyName&(normal|bold)&(regular|italic). These values are separate
in the TTF.

Greetings, Taco


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-04-11 15:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-10 18:15 Truetype fonts in ConTeXt Christopher G D Tipper
2000-04-10 22:31 ` Hans Hagen
2000-04-11 11:32 ` Font tutorial (Re: Truetype fonts in ConTeXt) Taco Hoekwater
2000-04-11  8:52   ` Hans Hagen
2000-04-11 15:02     ` Taco Hoekwater
2000-04-11 12:36       ` 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).