ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: siep@elvenkind.com
Subject: Re: fonts / proposal
Date: Wed, 8 Aug 2001 11:34:05 +0200 (CEST)	[thread overview]
Message-ID: <200108081029.MAA03257@plane.elvenkind.com> (raw)
In-Reply-To: <3B6FA974.7DBA7E50@elvenkind.com>

Let's try to summarize a few things.

dvips reads psfonts.map to find the PostScript font for a given tfm,
plus any transformations that have to be applied to that file. You
can have as many tfms as you like for one PostScript font. For this,
you can simply add a bunch of (Context) tfm-s to an existing
psfonts.map and since the new tfm names are different from existing
tfm names, it won't upset existing usage.

The tricky part is reverse lookup. I understand from Taco that this
occurs when a to-be-included epsfile needs fonts. Here, additional
mapfile entries can cause problems. I am not familiar with the
details. However, offhand I would say that for reverse lookup only
the PostScript fontname and the filename would be used, and that
there should be no problems as long as all entries referring to the
same PostScript fontname also refer to the same pfb. It shouldn't be
that hard to write a script which validates and corrects mapfiles for 
this.

The point of all this is that it should be possible to stuff everything
you need in your default psfonts.map.

Also a word about fontinst. If you read the documentation then it is
very LaTeX-centric. I believe however that this is mainly true for the
top-level commands. I created three testfonts with fontinst, all based
on Helvetica Light, with the following input file:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input fontinst.sty
\transformfont{phvl8r}{\reencodefont{8r}{\fromafm{phvl8a}}}
\transformfont{transhv}{\reencodefont{8y}{\fromafm{phvl8a}}}
\installfonts
  \installrawfont{installhv}{phvl8a,latin}{8y}
    {}{}{}{}{}
  \installfont{virthv}{phvl8r,latin,8r}{T1}
    {}{}{}{}{}
\endinstallfonts
\bye
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

As you see, you can name fonts whatever you like, and you can set the
LaTeX-specific parameters to null values; these would only be needed for
creating font families and fd files I think.

These are the mapfile entries:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
transhv Helvetica-Light "TeXnANSIEncoding ReEncodeFont " <texnansi.enc <phvl8a.pfb
installhv Helvetica-Light "TeXnANSIEncoding ReEncodeFont " <texnansi.enc <phvl8a.pfb
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

A LaTeX testfile:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{minimal}
\usepackage[LY1,T1,OT1]{fontenc}
\DeclareFontFamily{LY1}{transhv}{}
\DeclareFontShape{LY1}{transhv}{m}{n}{<->transhv}{}
\DeclareFontFamily{LY1}{installhv}{}
\DeclareFontShape{LY1}{installhv}{m}{n}{<->installhv}{}
\DeclareFontFamily{T1}{virthv}{}
\DeclareFontShape{T1}{virthv}{m}{n}{<->virthv}{}
\begin{document}
\fontencoding{LY1}\fontfamily{transhv}\selectfont
Font generated with transformfont (non-virtual, no kerning,
texnansi)
German sz in wrong slot

AT fi fl `A\relax T' A\kern0pt T \'el\`eve co\"\i tus \ss \char223\par~\par

\fontencoding{LY1}\fontfamily{installhv}\selectfont
Font generated with installrawfont (non-virtual, generic kerning, texnansi)
German sz in wrong slot

AT fi fl `A\relax T' A\kern0pt T \'el\`eve co\"\i tus \ss \char223\par~\par

\fontencoding{T1}\fontfamily{virthv}\selectfont
Font generated with installfont (virtual, generic kerning, T1)

AT fi fl `A\relax T' A\kern0pt T \'el\`eve co\"\i tus \ss\par~\par
\end{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

A Context testfile (contributed by Taco):

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\definefontsynonym[Atranshv][transhv][encoding=texnansi]
\definefontsynonym[Ainstallhv][installhv][encoding=texnansi]
\definefontsynonym[Avirthv][virthv][encoding=ec]

\definebodyfont [14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt] [rm]
[bi=Atranshv sa 1,
bf=Ainstallhv sa 1,
it=Avirthv sa 1]    

\switchtobodyfont[10pt]

\starttext
Font generated with transformfont (non-virtual, no kerning, texnansi)

{\bi
AT fi fl `A\relax T' A\kern0pt T \'el\`eve co\"\i tus \sz \par~\par}

Font generated with installrawfont (non-virtual, generic kerning, texnansi)

{\bf
AT fi fl `A\relax T' A\kern0pt T \'el\`eve co\"\i tus \sz \par~\par}

Font generated with installfont (virtual, generic kerning, T1)

{\it
AT fi fl `A\relax T' A\kern0pt T \'el\`eve co\"\i tus \sz\par~\par}
\stoptext
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

You can find pdfs of the testfiles at www.cybercomm.nl/~siepo/.

Siep


  parent reply	other threads:[~2001-08-08  9:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-03 15:32 Hans Hagen
2001-08-03 20:06 ` Giuseppe Bilotta
2001-08-04 11:45   ` Taco Hoekwater
2001-08-06  8:29   ` Hans Hagen
2001-08-07 17:59     ` Re[2]: " Giuseppe Bilotta
2001-08-08  8:32       ` Hans Hagen
2001-08-04 12:30 ` siepo
2001-08-06  8:38   ` Hans Hagen
2001-08-06  9:22     ` siep
2001-08-06 12:13       ` Hans Hagen
2001-08-06 13:14         ` siep
2001-08-07  8:40           ` Taco Hoekwater
2001-08-08  9:13             ` Hans Hagen
2001-08-08  9:34             ` siep [this message]
2001-08-08 12:13               ` 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=200108081029.MAA03257@plane.elvenkind.com \
    --to=siep@elvenkind.com \
    /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).