ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Metafont and Context
@ 2003-05-22 22:25 Wolfgang Werners-Lucchini
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Werners-Lucchini @ 2003-05-22 22:25 UTC (permalink / raw)


Hallo!

> > Some questions about the typescript:
> 
> We've reached the limits of my knowledge. I'll have to dig deeper before
> I can be of any help. There is quite a bit I don't yet understand about
> fonts in tex and Context.
> 
> > > \starttypescript [serif] [duerer]
> >                                                ^ no [name] her?
> 
> In other examples an encoding goes here, but it is just a key for
> finding the typescript. This example works without specifying an
> encoding.
> 
> > > \starttypescript [Duerer] 
> > >   \definetypeface [Duerer] [rm] [serif] [duerer] [default] 
> >                                                                     
>  ^
> > what is this 5th parameter for? I have to set this to the fontname?
> 
> It identifies the typescript for the size information. The typescript to
> be found is [#3][#5][default], which in this case is
                                              ^ size

> [serif][default][size]. There is a match for this in type-siz.tex.
> 
> Note: this is how I have explained it on my help page, but I am not sure
> it is correct. I've not been able to substitute other size typescripts,
> so I must be missing something. I don't undestand \definebodyfont or the
> size mechanism at all.
> 
> > Why is there no section [size] needed? What are the defaults? 
> 
> As above, the default size is [serif][default][size] in type-siz.tex (I
> think).
> 
> > What about encoding? For example, an OT1 font doesn't contains german
> > umlauts, a T1 font does. 
> 
> I'm puzzled in this case. A tfm is generated for a specific encoding.
> Multiple encodings for the same font would require multiple tfm's.
> Looking at one of my type1 fonts, I see the encoding I used when
> installing it:
> 
>     tftopl texnansi-sar.tfm | grep CODINGSCHEME
>     (CODINGSCHEME TEXNANSIENCODING)
> 
> This makes sense, because I used texnansi.enc when installing. But when
> I look at Metafont Duerer:
> 
>     tftopl cdr10.tfm | grep CODINGSCHEME
>     (CODINGSCHEME ASCII CAPS AND DIGITS)
> 
> What encoding is that, and how would I create a tfm with a different
> encoding?

As the creator of a metafont one can invent an encoding, say 'ASCII CAPS
AND DIGITS' which is
completly unknown by the rest of the world. And I can use T1 or OT1 or what
ever.

To create different encodings for a font the designer has to designate a
parameter or parameterfile to select that.
If the fontdesigner doesn't plan the use of different encodings, you have
to use virtual fonts, I think.

> 
> > By the way, there is also a typescript-section [special]. What can I
> > do with this?
> 
> I don't know; there are a few examples dealing with math mode in
> type-spe.tex.
> 
> > I will report about my attempts about my font 'bunt' in a second mail.
> 
> I've never dealt with multiple design sizes (and don't understand single
> design sizes yet). If you will send me your "bunt" font files I'll use
> them for testing, although it may take some time before I can get to it.
> 
> -Bill

Thank you, Wolfgang

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

* Re: Metafont and Context
  2003-05-21 23:05 Wolfgang Werners-Lucchini
@ 2003-05-22 13:49 ` Bill McClain
  0 siblings, 0 replies; 9+ messages in thread
From: Bill McClain @ 2003-05-22 13:49 UTC (permalink / raw)


On Thu, 22 May 2003 01:05:56 +0200
"Wolfgang Werners-Lucchini" <wwl@musensturm.de> wrote:

> Some questions about the typescript:

We've reached the limits of my knowledge. I'll have to dig deeper before
I can be of any help. There is quite a bit I don't yet understand about
fonts in tex and Context.

> > \starttypescript [serif] [duerer]
>                                                ^ no [name] her?

In other examples an encoding goes here, but it is just a key for
finding the typescript. This example works without specifying an
encoding.

> > \starttypescript [Duerer] 
> >   \definetypeface [Duerer] [rm] [serif] [duerer] [default] 
>                                                                     
 ^
> what is this 5th parameter for? I have to set this to the fontname?

It identifies the typescript for the size information. The typescript to
be found is [#3][#5][default], which in this case is
[serif][default][size]. There is a match for this in type-siz.tex.

Note: this is how I have explained it on my help page, but I am not sure
it is correct. I've not been able to substitute other size typescripts,
so I must be missing something. I don't undestand \definebodyfont or the
size mechanism at all.

> Why is there no section [size] needed? What are the defaults? 

As above, the default size is [serif][default][size] in type-siz.tex (I
think).

> What about encoding? For example, an OT1 font doesn't contains german
> umlauts, a T1 font does. 

I'm puzzled in this case. A tfm is generated for a specific encoding.
Multiple encodings for the same font would require multiple tfm's.
Looking at one of my type1 fonts, I see the encoding I used when
installing it:

    tftopl texnansi-sar.tfm | grep CODINGSCHEME
    (CODINGSCHEME TEXNANSIENCODING)

This makes sense, because I used texnansi.enc when installing. But when
I look at Metafont Duerer:

    tftopl cdr10.tfm | grep CODINGSCHEME
    (CODINGSCHEME ASCII CAPS AND DIGITS)

What encoding is that, and how would I create a tfm with a different
encoding?

> By the way, there is also a typescript-section [special]. What can I
> do with this?

I don't know; there are a few examples dealing with math mode in
type-spe.tex.

> I will report about my attempts about my font 'bunt' in a second mail.

I've never dealt with multiple design sizes (and don't understand single
design sizes yet). If you will send me your "bunt" font files I'll use
them for testing, although it may take some time before I can get to it.

-Bill
-- 
Sattre Press                            Curiosities of the Sky
http://sattre-press.com/                    by Garrett Serviss
info@sattre-press.com            http://csky.sattre-press.com/ 

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

* Re: Metafont and Context
@ 2003-05-21 23:39 Wolfgang Werners-Lucchini
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Werners-Lucchini @ 2003-05-21 23:39 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=Default, Size: 2581 bytes --]

Hallo!

I use the following test-file

--------------------test.tex-------------------------
\usetypescriptfile [type-bunt]
\usetypescript [Bunt]
\setupbodyfont [Bunt]
\starttext
\chapter{Test}
{\cg Gottes.}
\stoptext
---------------------------------------------------------

and this typescript

------------------type-bunt.tex--------------------
\starttypescript [calligraphy] [bunt] [name]
  \definefontsynonym [calligraphy] [bu1000]
\stoptypescript

\starttypescript [calligraphy] [bunt] [size]
  \definebodyfont [5pt,6pt,7pt,8pt] [cg]
    [tf=bu0900 sa 1]
  \definebodyfont [9pt] [cg]
    [tf=bu0900]
  \definebodyfont [10pt] [cg]
    [tf=bu1000]
  \definebodyfont [10.95pt] [cg]
    [tf=bu1095]
  \definebodyfont [12pt] [cg]
    [tf=bu1200]
  \definebodyfont [14.4pt] [cg]
    [tf=bu1440]
  \definebodyfont [17.28pt] [cg]
    [tf=bu1728]
%  \definebodyfont [20.7pt] [cg]
%   [tf=bu2074]
  \definebodyfont [20.74pt] [cg]
    [tf=bu2074]
  \definebodyfont [24.88pt] [cg]
    [tf=bu2488]
\stoptypescript

\starttypescript [Bunt]
  \definetypeface [Bunt] [cg] [calligraphy] [bunt] [bunt] [encoding=ec]
\stoptypescript
---------------------------------------------------------

to use a metafont which was designed in the 8 sizes
(9,10,10.95,12,14.4,17.28,20.74 and 24.88pt)
Fontsizes lower then 9pt should downscaled useing the 9pt font. (not testet
yet!)

Problems:

1. The bodyfont is 12pt per default, so pdftex uses bu1200.tfm to calculate
the text.
    The chaptertitle is then in 20.74pt, but pdftex doesn't use the
existing font bu2074.tfm, but
    scales the bodyfont by a factor of 1.728.
    As a result, mktexpk calculates the pk files bu1200.600pk and
bu1200.1037pk,
    and not bu1200.600pk and bu2074.600pk.

    I tried to include the commentet two lines in the typescript, because I
always found written sizes
    in context with one digit behind the point, but the result is negativ
too.

2. The log-file contains the following:

    > ) (./type-bunt.tex)
    > fonts          : [calligraphy] [bunt] [name,default,ec,special]

    My typescript neighter contains a section [ec] nor a section [special].

    What are they for? Why are they referenced in the log.

    > ) (./type-bunt.tex
    > bodyfont       : bodyfont 7.6pt is defined (can better be done
global)
    > bodyfont       : bodyfont 7.6pt is defined (can better be done
global)
    > bodyfont       : bodyfont 5.4pt is defined (can better be done
global)
    > ....

    lots of this lines. Most exist doubly, some not.
    What is this? I have not redefined 7.6pt or 5.4pt ...?

Gruß, Wolfgang

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

* Re: Metafont and Context
@ 2003-05-21 23:05 Wolfgang Werners-Lucchini
  2003-05-22 13:49 ` Bill McClain
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Werners-Lucchini @ 2003-05-21 23:05 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=Default, Size: 3371 bytes --]

Hallo!

> > > Has anybody written typescripts for one of the Metafonts available
> > > at CTAN and can send me an example or two?
> 
> I've added a Metafont example to my page:
> 
>     http://home.salamander.com/~wmcclain/context-help.html#newfont-mf
> 
> I don't know much about Metafont, and your comments (as always) are
> welcome. 
> 
> In particular, I have two questions:
> 
> (1) I don't specify encoding, because I'm not sure how encoding
> interacts with MF. Is it even required? The typescript works without
> encoding references.
> 
> (2) texexec + pdftex do not generate .pk files like xdvi does. Is that
> an option I've missed? In the example I give I first create a .dvi
> version of the file and have xdvi create the .pk files, which then can
> be read by pdftex.
> 
> -Bill

Thank you very much for your work!

Some questions about the typescript:

> % Typescript for the Duerer metafont typeface.
> %
> % The ``Informal'' is a serifed variation; I assign it to
> % italic so that we can access both it and slanted in the same
> % setup.
> %
> \starttypescript [serif] [duerer]
                                               ^ no [name] her?
>   \definefontsynonym [Duerer-Roman]       [cdr10]  
>   \definefontsynonym [Duerer-Bold]        [cdb10]  
>   \definefontsynonym [Duerer-Slanted]     [cdsl10] 
>   \definefontsynonym [Duerer-Informal]    [cdi10] 
> \stoptypescript
>
> \starttypescript [sans] [duerer]
                                                ^ no [name] her?
>  \definefontsynonym [Duerer-Sans]        [cdss10]  
> \stoptypescript
>
> \starttypescript [mono] [duerer]
                                                 ^ no [name] her?
>   \definefontsynonym [Duerer-Mono]        [cdtt10]  
> \stoptypescript
>
> \starttypescript [serif] [duerer] [name]
>   \definefontsynonym [Serif]              [Duerer-Roman]
>   \definefontsynonym [SerifBold]          [Duerer-Bold]
>   \definefontsynonym [SerifSlanted]       [Duerer-Slanted]
>   \definefontsynonym [SerifItalic]        [Duerer-Informal]
> \stoptypescript
>
> \starttypescript [sans] [duerer] [name]
>   \definefontsynonym [Sans]               [Duerer-Sans]
> \stoptypescript
>
> \starttypescript [mono] [duerer] [name]
>   \definefontsynonym [Mono]               [Duerer-Mono]
> \stoptypescript
>
> \starttypescript [Duerer] 
>   \definetypeface [Duerer] [rm] [serif] [duerer] [default] 
                                                                      ^
what is this 5th parameter for? I have to set this to the fontname?
>   \definetypeface [Duerer] [ss] [sans] [duerer] [default] 
>   \definetypeface [Duerer] [tt] [mono] [duerer] [default] 
> \stoptypescript

Why is there no section [size] needed? What are the defaults? I see, that
Duerer is designed only in one size. This is not always the case
with metafonts. For example, I should can say things like:

  Use font with designsize 10pt for all the fontsizes lower and equal to
10pt and scale acoordingly. 
  Use font with designsize 11pt for the fontsize 11pt.
  Use font with designsize 14.4pt for fontsizes from 12pt to infinity and
scale them.

What about encoding? For example, an OT1 font doesn't contains german
umlauts, a T1 font does. 

By the way, there is also a typescript-section [special]. What can I do
with this?

I will report about my attempts about my font 'bunt' in a second mail.

Gruß, Wolfgang

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

* Re: Metafont and Context
  2003-05-20 21:10 ` Bill McClain
@ 2003-05-21 12:17   ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2003-05-21 12:17 UTC (permalink / raw)


At 16:10 20/05/2003 -0500, you wrote:
>On Sun, 18 May 2003 22:40:48 +0200
>"Wolfgang Werners-Lucchini" <wwl@musensturm.de> wrote:
>
> > > > Has anybody written typescripts for one of the Metafonts available
> > > > at CTAN and can send me an example or two?
>
>I've added a Metafont example to my page:
>
>     http://home.salamander.com/~wmcclain/context-help.html#newfont-mf
>
>I don't know much about Metafont, and your comments (as always) are
>welcome.
>
>In particular, I have two questions:
>
>(1) I don't specify encoding, because I'm not sure how encoding
>interacts with MF. Is it even required? The typescript works without
>encoding references.

depends on the font, from the perspective of tex only the tfm matters (not 
the pk/pfb/ttf); the only tricky thing with mf files is that you may need 
to generate a lot of sizes

>(2) texexec + pdftex do not generate .pk files like xdvi does. Is that
>an option I've missed? In the example I give I first create a .dvi
>version of the file and have xdvi create the .pk files, which then can
>be read by pdftex.

this depends on your pdftex configuration; pdftex can handle pfb/ttf, pk, 
and (from past times) glyph containers

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

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

* Re: Metafont and Context
  2003-05-18 20:40 Wolfgang Werners-Lucchini
@ 2003-05-20 21:10 ` Bill McClain
  2003-05-21 12:17   ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Bill McClain @ 2003-05-20 21:10 UTC (permalink / raw)
  Cc: wwl

On Sun, 18 May 2003 22:40:48 +0200
"Wolfgang Werners-Lucchini" <wwl@musensturm.de> wrote:

> > > Has anybody written typescripts for one of the Metafonts available
> > > at CTAN and can send me an example or two?

I've added a Metafont example to my page:

    http://home.salamander.com/~wmcclain/context-help.html#newfont-mf

I don't know much about Metafont, and your comments (as always) are
welcome. 

In particular, I have two questions:

(1) I don't specify encoding, because I'm not sure how encoding
interacts with MF. Is it even required? The typescript works without
encoding references.

(2) texexec + pdftex do not generate .pk files like xdvi does. Is that
an option I've missed? In the example I give I first create a .dvi
version of the file and have xdvi create the .pk files, which then can
be read by pdftex.

-Bill
-- 
Sattre Press                                      Tales of War
http://sattre-press.com/                       by Lord Dunsany
info@sattre-press.com             http://tow.sattre-press.com/ 

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

* Re: Metafont and Context
@ 2003-05-18 20:40 Wolfgang Werners-Lucchini
  2003-05-20 21:10 ` Bill McClain
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Werners-Lucchini @ 2003-05-18 20:40 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=Default, Size: 408 bytes --]

Hallo!

> > Has anybody written typescripts for one of the Metafonts available at
> > CTAN and can send me an example or two?
> 
> If no one else has anything I could work up an example. I've not done
> much with MF fonts, but just ran a test to verify that I could access a
> MF face on TeXLive. 

That would be nice. Please read my former mail (17.5.), to understand what
my problems are. 

Gruß, Wolfgang

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

* Re: Metafont and Context
  2003-05-17 23:40 Wolfgang Werners-Lucchini
@ 2003-05-18 15:52 ` Bill McClain
  0 siblings, 0 replies; 9+ messages in thread
From: Bill McClain @ 2003-05-18 15:52 UTC (permalink / raw)


On Sun, 18 May 2003 01:40:57 +0200
"Wolfgang Werners-Lucchini" <wwl@musensturm.de> wrote:

> Has anybody written typescripts for one of the Metafonts available at
> CTAN and can send me an example or two?

If no one else has anything I could work up an example. I've not done
much with MF fonts, but just ran a test to verify that I could access a
MF face on TeXLive. 

The typescript mechanics are the same regardless of font format. For MF
files mktexpk must be run first to generate the pk files. To do this I
made a dvi version of the document first, and then xdvi generated the pk
files correctly. Then the --pdf run was able to include them. I presume
there is a way to do this in one step automatically, but the the only
time I normally see mktexpk is when I've made a mistake in declaring my
type1 fonts and it tries to generate something that doesn't exist!

-Bill
-- 
Sattre Press                                      Pagan Papers
http://sattre-press.com/                    by Kenneth Grahame
info@sattre-press.com              http://pp.sattre-press.com/ 

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

* Metafont and Context
@ 2003-05-17 23:40 Wolfgang Werners-Lucchini
  2003-05-18 15:52 ` Bill McClain
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Werners-Lucchini @ 2003-05-17 23:40 UTC (permalink / raw)


Hallo!

Has anybody written typescripts for one of the Metafonts available at CTAN
and can send me an example or two?

Wolfgang

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

end of thread, other threads:[~2003-05-22 22:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-22 22:25 Metafont and Context Wolfgang Werners-Lucchini
  -- strict thread matches above, loose matches on Subject: below --
2003-05-21 23:39 Wolfgang Werners-Lucchini
2003-05-21 23:05 Wolfgang Werners-Lucchini
2003-05-22 13:49 ` Bill McClain
2003-05-18 20:40 Wolfgang Werners-Lucchini
2003-05-20 21:10 ` Bill McClain
2003-05-21 12:17   ` Hans Hagen
2003-05-17 23:40 Wolfgang Werners-Lucchini
2003-05-18 15:52 ` Bill McClain

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).