From - Wed Jul 18 18:20:16 2007
Return-Path: <jacobs@cousin.de>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on di.ens.fr
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled 
	version=3.1.7
Received: from webmailfront02.ispgateway.de (webmailfront02.ispgateway.de [80.67.16.112])
          by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6IGK2YX016656
          for <metafont@ens.fr>; Wed, 18 Jul 2007 18:20:07 +0200 (CEST)
X-Envelope-To: <metafont@ens.fr>
Received: from webmailfront02.ispgateway.de (localhost [127.0.0.1])
	by webmailfront02.ispgateway.de (8.14.0/8.14.0) with ESMTP id l6IEvIGn007462
	for <metafont@ens.fr>; Wed, 18 Jul 2007 16:57:18 +0200
Received: (from nobody@localhost)
	by webmailfront02.ispgateway.de (8.14.0/8.14.0/Submit) id l6IEvIc3007461
	for metafont@ens.fr; Wed, 18 Jul 2007 16:57:18 +0200
Received: from p62.246.123.64.tisdip.tiscali.de
	(p62.246.123.64.tisdip.tiscali.de [62.246.123.64]) by webmail.df.eu (Horde
	MIME library) with HTTP; Wed, 18 Jul 2007 16:57:18 +0200
Message-ID: <20070718165718.cbwt5yp9ogcks8cw@webmail.df.eu>
Date: Wed, 18 Jul 2007 16:57:18 +0200
Disposition-Notification-To: jacobs@cousin.de
From: Heiko Jacobs <jacobs@cousin.de>
To: metafont@ens.fr
Subject: problems with accents, encoding
MIME-Version: 1.0
Content-Type: text/plain;
	charset=ISO-8859-1;
	DelSp="Yes";
	format="flowed"
Content-Disposition: inline
User-Agent: domainFACTORY
X-Originating-IP: 62.246.123.64
X-Greylist: Delayed for 01:22:43 by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Wed, 18 Jul 2007 18:20:07 +0200 (CEST)
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by nef2.ens.fr id l6IGK2YX016656

Hello

8 years ago I created a font using metafont.
Some weeks ago I rediscovered" this font and I made
some things better in it.

With accents there are still some problems.
Most of them alread have correct position in none slanted fonts

Texing
äöü \"a"a \accent127 a
with german.sty the points of "Umlaute" (diaeresis) are only
set orrect if \umlauthigh used or if \accent127 is used,
if not they are to deep (inside letters)

So using \umlauthigh solves the problem temporarely,
but there is a (possiby) similar problem texing
\AA{} \.A\r A\accent23 A\accent95 A\.O\r O
All accents are correct instead of \AA{} and \r A
(that might be used inside \AA). Manual set with \accent95 A
works fine (on Position 95 there is the ring in my font)

And a general problem exists at slanted versions produced with:

slant:=.25;
currenttransform:=identity slanted slant
   yscaled aspect_ratio scaled granularity;
  if currenttransform=identity: let t_=relax
  else: def t_ = transformed currenttransform enddef fi;

and all letters get
italcorr:=8u#*slant-.5u#;"
(or 5u# instead of 8u# for upper case letters ...)

The letters are slanted perfectly, but the accents sit at
the "old" unslantend positions...
I fear the solution is simple... But I didn'nt found it yet...

Another problem: The compositin of l or with a bar
to \l and \L still doesn't work well...



And another question:

Is there anywhere a good overview of most often used
encoding schemes?

In the sources of EC-fonts I find
"You find some documentation in ecdoc.tex"
but I didn't find it yet...
Does it contains a table of Cork encoding?
Other sources?



            MfG       Heiko Jacobs   Z!                   IRCnet Mueck
--
Douglasstr. 30, D-76133 Karlsruhe   fon +49 721 24069     fax 2030542
Geo-Bild Ing.büro  geo-bild-KA.de   Internet-Service     auch-rein.de
Couleurstud. Infos      cousin.de   VCD, umwelt&verkehr KA umverka.de



From - Wed Jul 18 18:32:07 2007
Return-Path: <robin.fairbairns@cl.cam.ac.uk>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on di.ens.fr
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled 
	version=3.1.7
Received: from mta2.cl.cam.ac.uk (mta2.cl.cam.ac.uk [128.232.0.14])
          by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6IGVuxH024657
          for <metafont@ens.fr>; Wed, 18 Jul 2007 18:32:01 +0200 (CEST)
X-Envelope-To: <metafont@ens.fr>
Received: from mole.cl.cam.ac.uk ([128.232.8.151])
	by mta2.cl.cam.ac.uk with esmtp (Exim 3.092 #1)
	id 1IBCRN-0004Oh-00; Wed, 18 Jul 2007 17:31:53 +0100
Received: from mole.cl.cam.ac.uk (localhost [127.0.0.1])
	by mole.cl.cam.ac.uk (Postfix) with ESMTP id 102734A192;
	Wed, 18 Jul 2007 17:31:53 +0100 (BST)
To: Heiko Jacobs <jacobs@cousin.de>
cc: metafont@ens.fr
Subject: Re: [metafont] problems with accents, encoding 
In-reply-to: Your message of Wed, 18 Jul 2007 16:57:18 +0200.
             <20070718165718.cbwt5yp9ogcks8cw@webmail.df.eu> 
X-Mailer: MH-E 8.0.2; nmh 1.2; GNU Emacs 21.3.1
Date: Wed, 18 Jul 2007 17:31:52 +0100
Message-ID: <18047.1184776312@mole.cl.cam.ac.uk>
From: Robin Fairbairns <Robin.Fairbairns@cl.cam.ac.uk>
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Wed, 18 Jul 2007 18:32:01 +0200 (CEST)

Heiko Jacobs <jacobs@cousin.de> wrote:

> Is there anywhere a good overview of most often used
> encoding schemes?

note that the tex world is on the cusp of a huge change, after which the
major engines in use will accept unicode input ... and all the hassles
of the old tex encodings will be over.  (it will of course happen
overnight ... ha ha.)

> In the sources of EC-fonts I find
> "You find some documentation in ecdoc.tex"
> but I didn't find it yet...
> Does it contains a table of Cork encoding?
> Other sources?

http://www.tex.ac.uk/tex-archive/macros/latex/doc/encguide.pdf

lists the encodings latex "believes" in (including the cork encoding,
which latex calls "T1").

i really don't know what encodings context tends to use, but that
document list the majority of active latex encodings (with the exception
of the greek LGR)

From - Thu Jul 19 01:11:01 2007
Return-Path: <jacobs@cousin.de>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on di.ens.fr
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled 
	version=3.1.7
Received: from webmailfront01.ispgateway.de (webmailfront01.ispgateway.de [80.67.16.111])
          by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6INArVg078623
          for <metafont@ens.fr>; Thu, 19 Jul 2007 01:10:59 +0200 (CEST)
X-Envelope-To: <metafont@ens.fr>
Received: from webmailfront01.ispgateway.de (localhost [127.0.0.1])
	by webmailfront01.ispgateway.de (8.14.0/8.14.0) with ESMTP id l6IM5VQA022981
	for <metafont@ens.fr>; Thu, 19 Jul 2007 00:05:31 +0200
Received: (from nobody@localhost)
	by webmailfront01.ispgateway.de (8.14.0/8.14.0/Submit) id l6IM5TON022980
	for metafont@ens.fr; Thu, 19 Jul 2007 00:05:29 +0200
Received: from p62.246.94.150.tisdip.tiscali.de
	(p62.246.94.150.tisdip.tiscali.de [62.246.94.150]) by webmail.df.eu (Horde
	MIME library) with HTTP; Thu, 19 Jul 2007 00:05:29 +0200
Message-ID: <20070719000529.ntrh4wufk8ok8o0g@webmail.df.eu>
Date: Thu, 19 Jul 2007 00:05:29 +0200
From: Heiko Jacobs <jacobs@cousin.de>
To: metafont@ens.fr
Subject: Re: [metafont] problems with accents, encoding
References: <18047.1184776312@mole.cl.cam.ac.uk>
In-Reply-To: <18047.1184776312@mole.cl.cam.ac.uk>
MIME-Version: 1.0
Content-Type: text/plain;
	charset=ISO-8859-1;
	DelSp="Yes";
	format="flowed"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
User-Agent: domainFACTORY
X-Originating-IP: 62.246.94.150
X-Greylist: Delayed for 01:05:19 by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Thu, 19 Jul 2007 01:10:59 +0200 (CEST)

Zitat von Robin Fairbairns <Robin.Fairbairns@cl.cam.ac.uk>:
> note that the tex world is on the cusp of a huge change, after which the
> major engines in use will accept unicode input ... and all the hassles
> of the old tex encodings will be over.

Mmmm... And than I have to create some billions of unicoe-glyphs?
I don't know, if this would be the solution I'm searching for... ;-)
And it doesn't repair the accents up to this new feature...

> http://www.tex.ac.uk/tex-archive/macros/latex/doc/encguide.pdf

thanks!
Now only the download has to be finished... A little bit slow just now...
Enough time to answer mails... ;-)



From - Thu Jul 19 09:56:11 2007
Return-Path: <robin.fairbairns@cl.cam.ac.uk>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on di.ens.fr
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled 
	version=3.1.7
Received: from mta1.cl.cam.ac.uk (mta1.cl.cam.ac.uk [128.232.0.15])
          by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6J7ttL5098664
          for <metafont@ens.fr>; Thu, 19 Jul 2007 09:56:00 +0200 (CEST)
X-Envelope-To: <metafont@ens.fr>
Received: from mole.cl.cam.ac.uk ([128.232.8.151])
	by mta1.cl.cam.ac.uk with esmtp (Exim 3.092 #1)
	id 1IBQrZ-0007mA-00; Thu, 19 Jul 2007 08:55:53 +0100
Received: from mole.cl.cam.ac.uk (localhost [127.0.0.1])
	by mole.cl.cam.ac.uk (Postfix) with ESMTP id 5AE204A192;
	Thu, 19 Jul 2007 08:55:53 +0100 (BST)
To: Heiko Jacobs <jacobs@cousin.de>
cc: metafont@ens.fr
Subject: Re: [metafont] problems with accents, encoding 
In-reply-to: Your message of Thu, 19 Jul 2007 00:05:29 +0200.
             <20070719000529.ntrh4wufk8ok8o0g@webmail.df.eu> 
X-Mailer: MH-E 8.0.2; nmh 1.2; GNU Emacs 21.3.1
Date: Thu, 19 Jul 2007 08:55:53 +0100
Message-ID: <6204.1184831753@mole.cl.cam.ac.uk>
From: Robin Fairbairns <Robin.Fairbairns@cl.cam.ac.uk>
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Thu, 19 Jul 2007 09:56:00 +0200 (CEST)

Heiko Jacobs <jacobs@cousin.de> wrote:

> Zitat von Robin Fairbairns <Robin.Fairbairns@cl.cam.ac.uk>:
> > note that the tex world is on the cusp of a huge change, after which the
> > major engines in use will accept unicode input ... and all the hassles
> > of the old tex encodings will be over.
> 
> Mmmm... And than I have to create some billions of unicoe-glyphs?

even unicode hasn't gone into billions yet.  but i was talking about
encoding, not anything else.

> I don't know, if this would be the solution I'm searching for... ;-)

(quite how we make the [relatively] orphaned metafont cope with unicode
is another matter, which i shall now pass over with an embarrassed
twitch of the lips.)

> And it doesn't repair the accents up to this new feature...

sorry, can't help there.  never could understand knuth's metafont
coding.

> > http://www.tex.ac.uk/tex-archive/macros/latex/doc/encguide.pdf
> 
> thanks!

it took us an age to write: it was already established when i took over
in 2000, and it didn't hit the streets until 2005 or something.  hope it
serves.

robin

From - Thu Jul 19 10:30:09 2007
Return-Path: <jacobs@cousin.de>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on di.ens.fr
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled 
	version=3.1.7
Received: from webmailfront01.ispgateway.de (webmailfront01.ispgateway.de [80.67.16.111])
          by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6J8U030016700
          for <metafont@ens.fr>; Thu, 19 Jul 2007 10:30:05 +0200 (CEST)
X-Envelope-To: <metafont@ens.fr>
Received: from webmailfront01.ispgateway.de (localhost [127.0.0.1])
	by webmailfront01.ispgateway.de (8.14.0/8.14.0) with ESMTP id l6J8U0hc009711
	for <metafont@ens.fr>; Thu, 19 Jul 2007 10:30:00 +0200
Received: (from nobody@localhost)
	by webmailfront01.ispgateway.de (8.14.0/8.14.0/Submit) id l6J8TxvG009705
	for metafont@ens.fr; Thu, 19 Jul 2007 10:29:59 +0200
Received: from p62.246.83.124.tisdip.tiscali.de
	(p62.246.83.124.tisdip.tiscali.de [62.246.83.124]) by webmail.df.eu (Horde
	MIME library) with HTTP; Thu, 19 Jul 2007 10:29:59 +0200
Message-ID: <20070719102959.n83gkf9u00g84g4g@webmail.df.eu>
Date: Thu, 19 Jul 2007 10:29:59 +0200
From: Heiko Jacobs <jacobs@cousin.de>
To: metafont@ens.fr
Subject: Re: [metafont] problems with accents, encoding
References: <6204.1184831753@mole.cl.cam.ac.uk>
In-Reply-To: <6204.1184831753@mole.cl.cam.ac.uk>
MIME-Version: 1.0
Content-Type: text/plain;
	charset=ISO-8859-1;
	DelSp="Yes";
	format="flowed"
Content-Disposition: inline
User-Agent: domainFACTORY
X-Originating-IP: 62.246.83.124
X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Thu, 19 Jul 2007 10:30:05 +0200 (CEST)
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by nef2.ens.fr id l6J8U030016700

Zitat von Robin Fairbairns <Robin.Fairbairns@cl.cam.ac.uk>:
>> Mmmm... And than I have to create some billions of unicoe-glyphs?
>
> even unicode hasn't gone into billions yet.  but i was talking about
> encoding, not anything else.

If I try to count them by hand, it seems to be billions... ;-)

>> I don't know, if this would be the solution I'm searching for... ;-)
>
> (quite how we make the [relatively] orphaned metafont cope with unicode
> is another matter, which i shall now pass over with an embarrassed
> twitch of the lips.)

Yes, LaTeX has the possibility to redefine a seldom unicode letter
e.g. 1234 to "\accent0815 x", but then we are back to my question ...

>> And it doesn't repair the accents up to this new feature...

... not only up to this new feature... :-)

> sorry, can't help there.  never could understand knuth's metafont
> coding.

So I hope, that you are not the only member of this list :-)

Mmmm... it might be a good idea for small parts of sources:

font_identifier:="r2sl"; font_size 10pt#;
input grafbase.mf;
interim hdwdr:=1; interim hdten:=1;
xscale:=0.0127; yscale:=0.0127;
unitlen:=1.0in#;
u#:=0.0127in#;

slant := .25;  currenttransform := identity slanted slant  yscaled  
aspect_ratio scaled granularity;  if currenttransform=identity: let  
t_=relax  else: def t_ = transformed currenttransform enddef fi;
ligs:=2; font_coding_scheme:="TeX text";
let adjust_fit=normal_adjust_fit;

font_normal_space:=4u#;
font_normal_stretch:=3u#;
font_normal_shrink:=2u#;
font_quad:=11u#;
font_extra_space:=2u#;
font_x_heigth:=5u#;
itc#:=1u#;
% degrees of kerning
k#:=-.5u#; kk#:=-1.5u#; kkk#:=-2u#; kkkk#:=-3u#; hk#:=0.5k#; dk#:=2k#;

def beginmfpicr (expr ch) =
   beginchar ( ch,
               ( xpos - xneg ) * xscale * unitlen,
	        ypos          * yscale * unitlen,
	        yneg          * yscale * unitlen );
% statt (ypos-yneg) für h und 0 für d

   initpic;
enddef;


% then some kernig, just under construction...
% then e.g. the letter o:

% r2_low_o.mf
code:=110;
bounds(-0.300,4.800,0.100,4.650);
beginmfpicr(incr code);
italcorr:=5u#*slant-.5u#;
penwd:=0.4pt;
drawpen := pencircle scaled penwd yscaled aspect_ratio;
penwd:=0.4pt;
drawpen := pencircle scaled penwd yscaled aspect_ratio;
   store (curpath)
   drawn arcppp((0.250000,2.625000), (2.250000,4.625000), (4.250000,2.625000));
   store (curpath)
   drawn arcppp((0.250000,2.125000), (2.250000,0.125000), (4.250000,2.125000));
   store (curpath)
   drawn polyline(false)
       ((0.250000, 2.625000),
        (0.250000, 2.125000));
   store (curpath)
   drawn polyline(false)
       ((4.250000, 2.625000),
        (4.250000, 2.125000));
endmfpic;

% ... and an accent (dieresis):

% r2_trema.mf
code:=126;
bounds(-0.300,3.800,-0.775,2.775);
beginmfpicr(incr code);
italcorr:=18u#*slant-.5u#;
penwd:=0.4pt;
drawpen := pencircle scaled penwd yscaled aspect_ratio;
penwd:=0.4pt;
drawpen := pencircle scaled penwd yscaled aspect_ratio;
   store (curpath)
   drawn circle((0.750000,0.750000),0.500000);
   store (curpath)
   drawn circle((2.750000,0.750000),0.500000);
endmfpic;





From - Fri Jul 20 01:23:20 2007
Return-Path: <luecking@uark.edu>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on di.ens.fr
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled 
	version=3.1.7
Received: from comp.uark.edu (comp.uark.edu [130.184.5.197])
          by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6JNN7kx038728
          for <metafont@ens.fr>; Fri, 20 Jul 2007 01:23:13 +0200 (CEST)
X-Envelope-To: <metafont@ens.fr>
Received: from mathfolk.uark.edu ([130.184.198.222])
	(authenticated bits=0)
	by comp.uark.edu (8.13.6/8.13.4) with ESMTP id l6JNN66q000546
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <metafont@ens.fr>; Thu, 19 Jul 2007 18:23:06 -0500 (CDT)
Message-Id: <200707192323.l6JNN66q000546@comp.uark.edu>
X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9
Date: Thu, 19 Jul 2007 18:23:56 -0500
To: metafont@ens.fr
From: Dan Luecking <luecking@uark.edu>
Subject: Re: [metafont] problems with accents, encoding
In-Reply-To: <20070719102959.n83gkf9u00g84g4g@webmail.df.eu>
References: <6204.1184831753@mole.cl.cam.ac.uk>
 <20070719102959.n83gkf9u00g84g4g@webmail.df.eu>
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Fri, 20 Jul 2007 01:23:14 +0200 (CEST)
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by nef2.ens.fr id l6JNN7kx038728

At 03:29 AM 7/19/2007, you wrote:

>Mmmm... it might be a good idea for small parts of sources:
>
>font_identifier:="r2sl"; font_size 10pt#;
>input grafbase.mf;

grafbase.mf is a moving target and was not written
with fontmaking in mind, only simple drawings. There
is absolute no warrantee whatsoever for any use, and
even less when it is not used as intended  ;-)

That said... possibly only the maintainer of grafbase can
understand your code, so I will comment as best I can.

You made the comment in an earlier message:

 > Texing
 > äöü \"a"a \accent127 a
 > with german.sty the points of "Umlaute" (diaeresis) are only
 > set orrect if \umlauthigh used or if \accent127 is used,
 > if not they are to deep (inside letters)

This certainly sounds like a design problem or metrics problem.
TeX assumes accents are positioned (within their bounding box)
so that if the accent character is superposed on another character
(in particular no vertical shifting), then it is properly placed
for characters whose height is the xheight of the font. It is
shifted up or down only for taller or shorter characters. It sounds
as if the accent is built too low to the baseline.

However, this is the method used by \accent, and \" is normally
defined to mean \accent127, so it is weird that one works and the
other doesn't. Are you sure? Perhaps german.sty messes with things
in a way your font doesn't follow.

You also state that the accents are in their unslanted positions.
In a slanted font you have to move them to the right a little
within their box.

>   drawn arcppp((0.250000,2.625000), 
> (2.250000,4.625000), (4.250000,2.625000));

This code in the definition of 'o' indicates it is at least
4.625 high (I am uncertain of the units). If the units are
u#, then this is just under the xheight (5u# defined earlier)
even considering the thickness of the pen. (BTW it is confusing
to have some dimensions in points, some in inches, and such an
odd unit u#=.0127 in#.) One would expect the lowercase o to be
nearly the same height as letters like  a, c, ..., x and the
xheight to be equal to their common height.

>bounds(-0.300,3.800,-0.775,2.775);
...

>   store (curpath)
>   drawn circle((0.750000,0.750000),0.500000);
>   store (curpath)
>   drawn circle((2.750000,0.750000),0.500000);

This code for the dieresis indicates that it consists of two
dots positioned at height .75 and centered in the bounding box
for this character. I believe both are incorrect. It should be
raised to fit above the o at least, and moved right by an
amount that reflects the slant of the font. For example, you
could select 5.0 instead of .75 for the height of the dots,
and move them right by (at least)
     slant*(height of the o) \approx 1.2u#

The modern way to treat accented characters is as separate letters
in their own right. Thus you would have two separate characters "o"
and "o-dieresis". Presumably the latter could simply reuse the code
for "o" and draw the two dots on top. In this case, no such
problems occur, provided 1) the font matches some encoding known to
LaTeX, 2) the fontenc package is used to select that encoding. In
this case \" is redefined to simply place the already accented
character and no such misplacing can occur.


Dan



Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
"Dubito ergo cogito, cogito ergo sum" --Descarte



From - Fri Jul 20 13:09:58 2007
Return-Path: <jacobs@cousin.de>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on di.ens.fr
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled 
	version=3.1.7
Received: from webmailfront01.ispgateway.de (webmailfront01.ispgateway.de [80.67.16.111])
          by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6KB9g22051080
          for <metafont@ens.fr>; Fri, 20 Jul 2007 13:09:52 +0200 (CEST)
X-Envelope-To: <metafont@ens.fr>
Received: from webmailfront01.ispgateway.de (localhost [127.0.0.1])
	by webmailfront01.ispgateway.de (8.14.0/8.14.0) with ESMTP id l6KB9cDf013339
	for <metafont@ens.fr>; Fri, 20 Jul 2007 13:09:38 +0200
Received: (from nobody@localhost)
	by webmailfront01.ispgateway.de (8.14.0/8.14.0/Submit) id l6KB9bgq013337
	for metafont@ens.fr; Fri, 20 Jul 2007 13:09:37 +0200
Received: from p62.246.186.254.tisdip.tiscali.de
	(p62.246.186.254.tisdip.tiscali.de [62.246.186.254]) by webmail.df.eu
	(Horde MIME library) with HTTP; Fri, 20 Jul 2007 13:09:37 +0200
Message-ID: <20070720130937.szv99sod4c0sc00o@webmail.df.eu>
Date: Fri, 20 Jul 2007 13:09:37 +0200
From: Heiko Jacobs <jacobs@cousin.de>
To: metafont@ens.fr
Subject: Re: [metafont] problems with accents, encoding
References: <6204.1184831753@mole.cl.cam.ac.uk>
	<20070719102959.n83gkf9u00g84g4g@webmail.df.eu>
	<200707192323.l6JNN66q000546@comp.uark.edu>
In-Reply-To: <200707192323.l6JNN66q000546@comp.uark.edu>
MIME-Version: 1.0
Content-Type: text/plain;
	charset=ISO-8859-1;
	DelSp="Yes";
	format="flowed"
Content-Disposition: inline
User-Agent: domainFACTORY
X-Originating-IP: 62.246.186.254
X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Fri, 20 Jul 2007 13:09:52 +0200 (CEST)
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by nef2.ens.fr id l6KB9g22051080

Zitat von Dan Luecking <luecking@uark.edu>:

> At 03:29 AM 7/19/2007, you wrote:
>
>> Mmmm... it might be a good idea for small parts of sources:
>>
>> font_identifier:="r2sl"; font_size 10pt#;
>> input grafbase.mf;
>
> grafbase.mf is a moving target and was not written
> with fontmaking in mind, only simple drawings. There
> is absolute no warrantee whatsoever for any use, and
> even less when it is not used as intended  ;-)

I don't remember it exactly becuase it is 8 years ago ...
It might be, that the reason of using grafbase.mf is,
that the glyphs are design with xfig and exported to metafont..

fig2dev -L mf -m 0.1 -x 0. -y 0. -Y 4.75 -t 7.875 -X 4.5 r2_low_o.fig  
 > r2_low.mf

Originally with this values bounds(0.,4.5,0.,4.75) is defined
to set width and ascent to differences of x and y and descent to 0.
I now redefined beginmfpicr to set ascent = ypos and descent = yneg

-t gives the baseline ( 7 14/16 inch)

letters like "z" range from 3 2/16 to this 7 14/16 if they have
a line width of "40" in xfig (that is 1/2 inch, so 1/4 inch has to be
added to raw coordinates seeing below ...), round letters like "o"
range from 3 to 8 inch: 5 inch difference.
Theoretical question for further fonts:
Should be x_height the value of "o" (like now, maximum values) or "z"?

> This certainly sounds like a design problem or metrics problem.
> TeX assumes accents are positioned (within their bounding box)
> so that if the accent character is superposed on another character
> (in particular no vertical shifting), then it is properly placed
> for characters whose height is the xheight of the font. It is
> shifted up or down only for taller or shorter characters. It sounds
> as if the accent is built too low to the baseline.

The first try after refining the real geometries of glyphs was to
so set ascent to real ascent of the upper bound of accent and
set the descent to a negative value a little below lower bound of
accent and using the same base (7 14/16) like in all glyphs,
because in xfig the accents were defined at correct positions
according to small letters like "o"
But that des not work ... Accents were really high ... :-)
Now I export the dieresis using

fig2dev -L mf -m 0.1 -x 0. -y -0.875 -Y 2.875 -t 2. -X 3.5  
r2_acc_trema.fig > r2_acc_trema.mf

After changing descent and baseline to this values (resulting in
fine graphics with gftodvi which have good distances to baseline
like I wish as distance to glyphs..) most accents have good positions...
But I fear that doesn't follow correct theories ... :-)

> However, this is the method used by \accent, and \" is normally
> defined to mean \accent127, so it is weird that one works and the
> other doesn't. Are you sure? Perhaps german.sty messes with things
> in a way your font doesn't follow.

german.sty seems to redefine combining glyphs and accents...

> You also state that the accents are in their unslanted positions.
> In a slanted font you have to move them to the right a little
> within their box.
>
>>  drawn arcppp((0.250000,2.625000), (2.250000,4.625000),   
>> (4.250000,2.625000));
>
> This code in the definition of 'o' indicates it is at least
> 4.625 high (I am uncertain of the units). If the units are
> u#, then this is just under the xheight (5u# defined earlier)
> even considering the thickness of the pen.

In xfig the middle of the stroke has a maximum height in "o"
of 3 4/16. fig2dev recalculate y-values using the baseline
defined with -t of 7 14/16. 7 14/16 - 3 4/16 = 4 10/16 = 4 5/8 = 4.625
plus halfth of stroke (1/4") = 4 7/8 = 4.875.
But "o" reaches 1/16 below baseline, so total height of "o" is 5

8 years ago I used odd values like 5 for round letters... :-)

> (BTW it is confusing
> to have some dimensions in points, some in inches, and such an
> odd unit u#=.0127 in#.) One would expect the lowercase o to be
> nearly the same height as letters like  a, c, ..., x and the
> xheight to be equal to their common height.

Honestly "0.127" confuses me to in 2007. It might be 0.125 is more correct...
After 8 years I don't know anymore, if I set it correct... :-)
"o" has the same height as "a" and is 4/16 larger than "z" and
2/16 larger than "x" in my font...

8 years ago my knowledge of metafont was smaller :-)
so there might be some historical inconsistencies in geometry :-)

>> bounds(-0.300,3.800,-0.775,2.775);
> ...
>
>>  store (curpath)
>>  drawn circle((0.750000,0.750000),0.500000);
>>  store (curpath)
>>  drawn circle((2.750000,0.750000),0.500000);
>
> This code for the dieresis indicates that it consists of two
> dots positioned at height .75 and centered in the bounding box
> for this character. I believe both are incorrect. It should be
> raised to fit above the o at least,

that was the first try, see above, but that didn't work ...

So I have to export accents for slanted fonts with other values?
Not like in unslanted font like above
fig2dev -L mf -m 0.1 -x 0. -y -0.875 -Y 2.875 -t 2. -X 3.5  
r2_acc_trema.fig > r2_acc_trema.mf
but something like
fig2dev -L mf -m 0.1 -x -1. -y -0.875 -Y 2.875 -t 2. -X 2.5  
r2_acc_trema.fig > r2_acc_trema.mf
(I have to calculate correct values for -x/-X, "1" as example...
Mmmm.. slant = 0.25, so 5 * 1/4 = 1.25 might be a good starting value?)

I just made a quick try with "1" and the dieresis above "o" looks much
better, but above "O" it is just not correct, better, but to much left...
So this might not be the right way for this problem...

> and moved right by an
> amount that reflects the slant of the font. For example, you
> could select 5.0 instead of .75 for the height of the dots,
> and move them right by (at least)
>     slant*(height of the o) \approx 1.2u#

That was the first try, y-values at 6.625 instead of 0.75
as result of

fig2dev -L mf -m 0.1 -x -5. -y -0.875 -Y 9 -t 2. -X 2.5  
r2_acc_trema.fig > r2_acc_trema.mf

very high positioned accents
using -y 0. high accents, but not so high ... Mmmm...
using -y 5. nearly correct ... (but again only on "o", not on "O")
If I gave them a descent 5 in below baseline AND y values at correct
position according to "o" it works...

Looking at the result of gftodvi it seems, that 6.625 is related
to the minimum coordinate (here the descent of +5) and not to the
baseline. According to former tries resulting in 0.75 it seems that
for combining letters and accents the distance to the baseline of
accents is the relevant distance ...

Looking at the results of gftodvi of ecsl1000 it seems that there
accents have their positions above x-height and the distance between
accent and default x-height is used to position the accent above
the real x-height of a letter like the theory says...

So the real problem might be inside of definitions in grafbase.mf ...
So I have to study it more detailled...

> The modern way to treat accented characters is as separate letters
> in their own right. Thus you would have two separate characters "o"
> and "o-dieresis". Presumably the latter could simply reuse the code
> for "o" and draw the two dots on top. In this case, no such
> problems occur, provided 1) the font matches some encoding known to
> LaTeX, 2) the fontenc package is used to select that encoding. In
> this case \" is redefined to simply place the already accented
> character and no such misplacing can occur.

"The modern way" is planned for the next step:
feeding fontforge with xfig-files to make fonts for the "unimporting"
rest of the world of fonts ;-)
For metafont I do not plan this, because of a) work :-) and
b) I need the place in the small 256 table for other glyphs,
ligatures and symbols ... So it would be nice to get accents
work in slanted fonts in metafont :-)






From - Fri Jul 20 16:02:33 2007
Return-Path: <jacobs@cousin.de>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on di.ens.fr
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled 
	version=3.1.7
Received: from webmailfront02.ispgateway.de (webmailfront02.ispgateway.de [80.67.16.112])
          by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6KE2GIH041331
          for <metafont@ens.fr>; Fri, 20 Jul 2007 16:02:26 +0200 (CEST)
X-Envelope-To: <metafont@ens.fr>
Received: from webmailfront02.ispgateway.de (localhost [127.0.0.1])
	by webmailfront02.ispgateway.de (8.14.0/8.14.0) with ESMTP id l6KE2Edt013516
	for <metafont@ens.fr>; Fri, 20 Jul 2007 16:02:14 +0200
Received: (from nobody@localhost)
	by webmailfront02.ispgateway.de (8.14.0/8.14.0/Submit) id l6KE2DbH013513
	for metafont@ens.fr; Fri, 20 Jul 2007 16:02:13 +0200
Received: from p62.246.195.50.tisdip.tiscali.de
	(p62.246.195.50.tisdip.tiscali.de [62.246.195.50]) by webmail.df.eu (Horde
	MIME library) with HTTP; Fri, 20 Jul 2007 16:02:13 +0200
Message-ID: <20070720160213.ikaozt6w8o44wc8s@webmail.df.eu>
Date: Fri, 20 Jul 2007 16:02:13 +0200
From: Heiko Jacobs <jacobs@cousin.de>
To: metafont@ens.fr
Subject: Re: [metafont] problems with accents, encoding
References: <20070718165718.cbwt5yp9ogcks8cw@webmail.df.eu>
In-Reply-To: <20070718165718.cbwt5yp9ogcks8cw@webmail.df.eu>
MIME-Version: 1.0
Content-Type: text/plain;
	charset=ISO-8859-1;
	DelSp="Yes";
	format="flowed"
Content-Disposition: inline
User-Agent: domainFACTORY
X-Originating-IP: 62.246.195.50
X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Fri, 20 Jul 2007 16:02:26 +0200 (CEST)
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by nef2.ens.fr id l6KE2GIH041331

Zitat von Heiko Jacobs <jacobs@cousin.de>:
> And a general problem exists at slanted versions produced with:
> I fear the solution is simple... But I didn'nt found it yet...

yes, the solution IS simple:
I just view, that I miss a very simple
font_slant slant;

> And another question:
> Is there anywhere a good overview of most often used
> encoding schemes?

I got a good paper, but there still is an open question:

Where did LaTeX know where to find e.g. the cedilla to combine
the c with it?
(in OT1 on dec 24, in T1 on dec 12)
Or:
What must I do to say LaTeX, that it should search cedilla
on place x in the font?
For other accents
\DeclareTextAccent{\`}{OT1}{0}
will work, if I want to have it on 0 also using OT1
or if I will define characters not available in OT1 I use
\DeclareTextSymbol{\ng}{OT1}{249}
or if I have my own ligatures I define them in *.mf
but for cedilla, ogonek & Co. I'm still searching...

            MfG       Heiko Jacobs   Z!                   IRCnet Mueck
--
Douglasstr. 30, D-76133 Karlsruhe   fon +49 721 24069     fax 2030542
Geo-Bild Ing.büro  geo-bild-KA.de   Internet-Service     auch-rein.de
Couleurstud. Infos      cousin.de   VCD, umwelt&verkehr KA umverka.de





From - Tue Jul 24 11:27:27 2007
Return-Path: <raichle@isostar.informatik.uni-stuttgart.de>
X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on di.ens.fr
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled 
	version=3.1.7
Received: from mx1.informatik.uni-stuttgart.de (mailgw.informatik.uni-stuttgart.de [129.69.211.41])
          by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id l6O9RF0I058081
          for <metafont@ens.fr>; Tue, 24 Jul 2007 11:27:20 +0200 (CEST)
X-Envelope-To: <metafont@ens.fr>
Received: from isostar.informatik.uni-stuttgart.de (isostar.informatik.uni-stuttgart.de [129.69.215.240])
	by mx1.informatik.uni-stuttgart.de (Postfix) with ESMTP id 4F52A3825;
	Tue, 24 Jul 2007 11:27:15 +0200 (CEST)
Received: (from raichle@localhost) by isostar.informatik.uni-stuttgart.de (8.9.3p2/2.2) id LAA26813; Tue, 24 Jul 2007 11:27:15 +0200 (CEST)
From: Bernd Raichle <raichle@Informatik.Uni-Stuttgart.DE>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <18085.50675.193423.961048@isostar.informatik.uni-stuttgart.de>
Date: Tue, 24 Jul 2007 11:27:15 +0200
To: metafont@ens.fr
Subject: Re: [metafont] problems with accents, encoding
In-Reply-To: <20070720160213.ikaozt6w8o44wc8s@webmail.df.eu>
References: <20070718165718.cbwt5yp9ogcks8cw@webmail.df.eu>
	<20070720160213.ikaozt6w8o44wc8s@webmail.df.eu>
X-Mailer: VM 7.17 under Emacs 21.1.1
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.1.4 (nef2.ens.fr [129.199.96.32]); Tue, 24 Jul 2007 11:27:20 +0200 (CEST)

On Friday, 20 July 2007 16:02:13 +0200,
Heiko Jacobs <jacobs@cousin.de> writes:
 > Zitat von Heiko Jacobs <jacobs@cousin.de>:
 > > And a general problem exists at slanted versions produced with:
 > > I fear the solution is simple... But I didn'nt found it yet...
 > 
 > yes, the solution IS simple:
 > I just view, that I miss a very simple
 > font_slant slant;
 > 
 > > And another question:
 > > Is there anywhere a good overview of most often used
 > > encoding schemes?
 > 
 > I got a good paper, but there still is an open question:
 > 
 > Where did LaTeX know where to find e.g. the cedilla to combine
 > the c with it?
 > (in OT1 on dec 24, in T1 on dec 12)
 > Or:
 > What must I do to say LaTeX, that it should search cedilla
 > on place x in the font?
 > For other accents
 > \DeclareTextAccent{\`}{OT1}{0}
 > will work, if I want to have it on 0 also using OT1
 > or if I will define characters not available in OT1 I use
 > \DeclareTextSymbol{\ng}{OT1}{249}
 > or if I have my own ligatures I define them in *.mf
 > but for cedilla, ogonek & Co. I'm still searching...

The OT1 encoding defines the glyph codes for the cedilla and all the
other accents.  If you want to use another glyph position you have to
define your own font encoding 'Lxyz' ... and tell LaTeX how access all
glyphs by writing a font encoding definition file 'lxyzenc.fd'.

A hint for your initial question, why the umlaut accent is positioned
too low using (n)german.sty with \umlautlow:

german.sty uses TeX's internal calculation inside the \accent
primitive's code to lower the positioning of the umlaut accent
... just by reducing the x-height of the current font a little bit.
Thus if the x-height of the font is wrong in comparison to the height
of a lowercase glyph, you will get wrong results.  To understand this
you have to look at the implementation of TeX's \accent primitive:

 1 Given are two glyphs, an accent and a base glyph, and the current
   font's x-height and slant.

 2 If the height of the base glyph is equal to the x-height, the
   accent glyph is _not_ lowered, the accent is horizontally centered
   over the base glyph.  Normally this is true for all lowercase
   letters withour ascenders.

 3 If the height of the base glyph is not equal to the x-height, the
   accent glyph is vertically moved according to the difference of
   'height of base glyph' - 'x-height'.  The accent is horizontally
   centered over the base glyph and moved according to the slant
   factor multiplied by the vertical movement.

german.sty changes the x-height of a font when placing the umlaut
accent.  Without this change, an `\"a' will fall under case 2, but
with the change, case 3 will apply and TeX will lower the accent glyph
accordingly.  The amount of the x-height change in german.sty (and
Babel's german support) is optimized for the Computer Modern font
family and its derivatives.  If your font has other characteristics,
you have to change the used amount.


Best wishes,
  -bernd
_____________________________________________________________________
Bernd Raichle                                  "Le langage est source
Author of `german.sty' (current: v2.5e)         de malentendus"
DE-TeX-FAQ: http://www.dante.de/faq/de-tex-faq/ (A. de Saint-Exupery)

