freetype-devel
[Top][All Lists]
Advanced

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

Re: CFF driver fixed (Re: misalignment with DEC Unix.)


From: David Turner
Subject: Re: CFF driver fixed (Re: misalignment with DEC Unix.)
Date: Wed, 28 Jun 2000 18:55:24 +0200

Hi Tom,

> 
> Well, well, well...  This ROCKS!  The OpenType CJKV fonts I have
> laying around here at the AMS all work very well.
> 
> Unfortunately, I am still getting the mis-aligned access messages for
> the DEC Unix compile.  Note that I don't get a core dump unless I
> force it; the kernel normally just spews tons of unaligned access
> errors to stderr.  Bleah!
> 

Aargh.. I'm still surprised but there is nothing I can do for now..
Do you know if this only happens for the CFF driver, or others too ??

Here is a short route to locate the bug:

compile the engine + demo programs with "make setup devel" in order
to disable optimisation, then run "gdb demos/bin/ftlint"

do:

> "b T2_Load_CFF_Font" 

then

> r 20 path_to_CFF_font

when execution stops, continue with a step by step to see when
the misaligned access happens.. You can also turn on traces
by calling FT_SetTraceLevel after the breakpoints:

> call FT_SetTraceLevel( trace_any, 6 )

then go on step by step..

Hope this helps. I cannot debug this, unless someone allows me
remote access to a DEC Unix console. Any volunteers ?? ;-)

Cheers,

- David

> Tom
> 
> On Wed, 28 Jun 2000, David Turner wrote:
> 
> > Hello,
> >
> >   I'm glad to let you know that the CFF driver is now fixed
> >   and supports CID-keyed fonts correctly :-)
> >
> >   The "unexpected crash" and various misalignment problem came
> >   from a bug in the CFF parser (namely, the definition of the
> >   T2_FIELD_DELTA was incorrect).
> >
> >   The "zero advance width" problem was due to a really mundane
> >   bug too in the glyph loader...
> >
> >   I have only tried it with STSong-Light-Acro, but it seems to
> >   run well. I welcome any comments :-)
> >
> >   The list of font formats supported by FreeType 2 is now:
> >
> >     - TrueType
> >     - Type 1
> >     - Type 1 Multiple Masters
> >     - Type 1 CID-keyed
> >     - OpenType/CFF
> >     - OpenType/CFF CID-keyed
> >
> >   I'll probably add support to pure CFF + the new Adobe SVG "CEF" font
> >   format soon..
> >
> > Cheers,
> >
> > - David
> >
> >
> > PS: For the technicaly inclined, the macro definition now reads:
> >
> > #undef  T2_FIELD_DELTA
> > #define T2_FIELD_DELTA( code, name, max )                    \
> >         {                                                    \
> >           t2_kind_delta,                                     \
> >           code | T2CODE,                                     \
> >           (FT_UInt)(char*)&T2_REF( T2TYPE, name ),           \
> >           sizeof( T2_REF( T2TYPE, name )[0] ),               \
> >           0,                                                 \
> >           max,                                               \
> >           (FT_UInt)(char*)&T2_REF( T2TYPE, num_ ## name )    \
> >         },
> >
> > instead of the previous:
> >
> > #undef  T2_FIELD_DELTA
> > #define T2_FIELD_DELTA( code, name, max )                    \
> >         {                                                    \
> >           t2_kind_delta,                                     \
> >           code | T2CODE,                                     \
> >           (FT_UInt)(char*)&T2_REF( T2TYPE, name ),           \
> > >>>>>>>>  sizeof( T2_REF( T2TYPE, name ) ),               \
> >           0,                                                 \
> >           max,                                               \
> >           (FT_UInt)(char*)&T2_REF( T2TYPE, num_ ## name )    \
> >         },
> >
> > Pretty stupid things, with causes an invalid pointer typecast
> > later..
> >
> > Tom Kacvinsky a écrit :
> > >
> > > Well, the Linux crashing bug is fixed, and I am going to attempt
> > > a new DEC compile.  What was the problem?  I couldn't find it...
> > >
> > > The CFF/CID stuff is coming along nicely.  The glyphs still image over one
> > > another, but I no longer get invalid subr. # errors.  Which is good.
> > >
> > > Tom
> > >
> > > On Tue, 27 Jun 2000, David Turner wrote:
> > >
> > > > Hi Tom,
> > > >
> > > > >
> > > > > 140000190 140000192 140000192 140000194 6
> > > > >
> > > > > It would appear that I am mistaken.  If I change the short to char, I 
> > > > > get this
> > > > > output:
> > > > >
> > > > > 140000190 140000191 140000191 140000192 3
> > > > >
> > > > > Silly me.  But I know casting is one thnig that can cause 
> > > > > mis-alignment.
> > > > > I'll try to find an example...
> > > > >
> > > > Seems normal there. Casting can cause mis-alignment when it is done
> > > > incorrectly (which means a bug in the code, rather than a specific
> > > > nastiness of 64-bit systems, and I'd say that I prefer that than having
> > > > to review all of FreeType's code :-)
> > > >
> > > > Thanks for the output, I'm still trying to find the bug(s)..
> > > >
> > > > Cheers,
> > > >
> > > > - David
> > > >
> > > > > Tom
> > > >
> >



reply via email to

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