[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lout 3.21 core dumps when requesting PDF output

From: Valeriy E. Ushakov
Subject: Re: lout 3.21 core dumps when requesting PDF output
Date: Sat, 27 May 2000 23:39:25 +0400

On Fri, May 26, 2000 at 20:25:28 +0400, Valeriy E. Ushakov wrote:

> On Fri, May 26, 2000 at 14:45:54 +0100, Jeffrey Howard Kingston wrote:
> > What you need to do is uncomment the first and comment out the
> > second, producing this:
> > 
> > --------------------------------------------------------------------
> > KernLength(word_font(x), unacc, *(p-1), *p, ksize);
> > /* KernLength(font_num(finfo[word_font(x)].original_font),
> >       unacc, *(p-1), *p, ksize); */
> > --------------------------------------------------------------------
> Which will also mangle PDF kerning (see PDFText_Kern).

So don't do this.  Leave z24.c as it is.
Apply attached patch to z37.c instead.

Gory details:

TJ operator expects kerning in 0.001f (using lout notation).  Since
PostScript fonts are designed in 1000:1 space, the kerning value is
the value specified for this KPX in the AFM file.

    OBJECT unscaled = finfo[word_font(x)].original_font;

used to be a font object for unscaled font, so font_num(unscaled) used
to point to stock AFM values.  Recent changes to font management
shuffled things around a bit, so unscaled font is now:

    OBJECT face = finfo[word_font(x)].original_font;
    OBJECT unscaled;
    Child(unscaled, NextDown(NextDown(Down(face))));

bug going through this many indirections for every word is an
overkill.  OTOH, font_num(face) is now unused and I think setting it
to the font_num of unscaled font is a logical choice.  This is what
attached patch does.

I still doubt that PDF backend is working.  This code is orphaned and
has not been touched for a long time.

SY, Uwe
address@hidden                         |       Zu Grunde kommen
http://www.ptc.spbu.ru/~uwe/            |       Ist zu Grunde gehen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]