freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Possible bug in ftxpost.c ?


From: Jean-Christophe Dubacq
Subject: Re: [Devel] Possible bug in ftxpost.c ?
Date: Wed, 3 Jul 2002 10:36:33 +0200
User-agent: Mutt/1.4i

On Tue, Jul 02, 2002 at 06:55:04PM +0200, Jean-Christophe Dubacq wrote:
> I think ftxpost.c is wrong when reading the post table of a ttf font in
> format 0x00020000.

Er... Maybe I was both imprecise and rude, but english is not my first
language.

ftxpost.c is in freetype1-1.5.20020624/lib/extend.

Remark that if the names are given in a striclty increasing order, both
algorithms give a correct result.

Here is the piece of code which does the name indexing part in pdftex,
and which looks (to me) as respecting the specification (but I may be
wrong):
        for (glyph = glyph_tab; glyph - glyph_tab < nnames; glyph++) {
            if (glyph->name_index < NMACGLYPHS) {
                glyph->name = mac_glyph_names[glyph->name_index];
                tex_printf("\nAdding glyph %.4X named '%s' in place
%u",glyph->name_index,glyph->name,(unsigned int)(glyph - glyph_tab));
            }
            else {
                p = glyph_name_buf;
                k = glyph->name_index - NMACGLYPHS;
                for (; k > 0; k--)
                    p = strend(p) + 1;
                glyph->name = p;
                tex_printf("\nAdding glyph %.4X named '%s' in place
%u",glyph->name_index,glyph->name,(unsigned int)(glyph - glyph_tab));
            }
        }

Note the k loop that searches the k-th name instead of taking the first
available.
-- 
Jean-Christophe Dubacq



reply via email to

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