freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Re: address@hidden: Bug#149575: freetype1-tools: Bad computation


From: Jean-Christophe Dubacq
Subject: [Devel] Re: address@hidden: Bug#149575: freetype1-tools: Bad computation of heights in vpl files with ttf2tfm]
Date: Fri, 21 Jun 2002 17:39:14 +0200
User-agent: Mutt/1.4i

Hi,

I checked the patch, and it works much better. I also used the last
recent CVS, but reading through the code, it looks OK.

However, some problems remain. For those that do not want to browse
through all the mails about this, I prepared six examples of the current
state of affairs. Please see the pdf files at
http://www.lri.fr/~jcdubacq/ttf2pkbug/

First file, the current debian version:
http://www.lri.fr/~jcdubacq/ttf2pkbug/stocktoolsandbadxheight.pdf

Putting unusual accents on letters works ok, but the bounding boxes of
some letters are no good (see the capital A).

Same problem arises when vplaux.c is not modified to ignore some stupid
computations made by afm2tfm to overrule the x-height problem.

See also the second file:
http://www.lri.fr/~jcdubacq/ttf2pkbug/stockdebiantools.pdf where the
x-height has been adjusted manually (by editing the .vpl file), and
http://www.lri.fr/~jcdubacq/ttf2pkbug/cvsgoodautomaticxheight.pdf
which is just the tools from current CVS.

As one can see, the A still doesn't have the right size, and if one
wants to make an fbox of a word like "Amen", the box will cut through
the A. The amount of shifting done is more or less important according
to the way the x-height was important in the design of the font (for
fonts like Times New, the difference is just a few units, but in the
thryomanes font, there is a big difference -- the macron char has been
built to appear much higher on x-height letters than the grave on the
Agrave, hence the difference)(comparing A, Agrave and grave is the way
current ttf2tfm acts to compute the "new" bounding box of the char).

OK. So, these bounding box should be left alone. That's what was done in
the patched versions:
http://www.lri.fr/~jcdubacq/ttf2pkbug/patchedautomaticxheight.pdf

In this file, I show how the badly computed x-height of 400 led to
accents much too high above the letters, especially in Verdana.
But this problem is over, as seen in:
http://www.lri.fr/~jcdubacq/ttf2pkbug/patchedcvs.pdf

I also added (in the attached patch, I hope the format is ok: if not,
just give me what instructions I should type, I still have CVS and
working trees) a patch to give "manual" x-height. In some fonts, the 'x'
can have a strange shape (italic, especially), and be higher than the
average lowercase letter. So, in some cases, it could be possible to
want to manually adjust the x-height. I added an option in ttf2tfm to do
that (I used -X INT as the syntax, and one global variable).

The function static int texheight(...) {...} could be deleted
completely. It is no more used.

Any remarks? I can explain obscure points and consider any information I
didn't have.

By the way, good work. As you can see, I can now use any Truetype font
in pdftex (and latex, thanks to ttf2pk). I will soon provide the
installing scripts, but as they depend of a correct ttf2pk...

-- 
Jean-Christophe Dubacq -- ATER en informatique à la faculté d'Orsay.
Tel: 01 69 15 76 43 / 06 64 86 10 56 --- Email: address@hidden

Attachment: patch.jcdubacq
Description: Text document


reply via email to

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