Re: [ft-devel] Incremental font support

2009-02-18 Thread Werner LEMBERG

 We've been trying to resurrect the freetype bridge code in
 ghostscript, and have been testing against the freetype 2.3.8 release.
 I think there may be some bit rot in the incremental font support.

Indeed.  After Graham has stopped to work on this, noone has
maintained this code; from time to time we've checked that compilation
doesn't fail, but it hasn't been verified that it really works.

 In particular, at t1gload.c:287 T1_Load_Glyph() throws
 T1_Err_Invalid_Argument if the requested glyph index is larger than
 num_glyphs in the face.  Yet as far as I can tell this was never set
 through the incremental font api.

 Similarly, version 1.205 of ttgload.c broke incremental truetype
 handling.

To help in debugging it would be great if you can provide a small
stand-alone snippet which I can compile easily, together with small
input data if necessary.

 What can we do to fix this up?  Is our code wrong?  How is this
 supposed to work.

I rather suspect that a bug has crept into FreeType.

 Do you have any tests for the incremental api?

No, unfortunately.


Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


RE: [ft-devel] Incremental font support

2009-02-18 Thread Graham Asher
I'm sorry to say that there is no chance that I shall work on this again. I
have too much on my plate for the foreseeable future.

But I claim (as always ;-) that the parts of the bridge code I wrote are
relatively easy to follow and can probably be debugged by single-stepping
and thinking hard.

Best regards,

Graham


-Original Message-
From: freetype-devel-bounces+graham.asher=btinternet@nongnu.org
[mailto:freetype-devel-bounces+graham.asher=btinternet@nongnu.org] On
Behalf Of Werner LEMBERG
Sent: 18 February 2009 06:51
To: gi...@ghostscript.com
Cc: ray.johns...@artifex.com; henry.sti...@artifex.com;
freetype-devel@nongnu.org
Subject: Re: [ft-devel] Incremental font support


 We've been trying to resurrect the freetype bridge code in
 ghostscript, and have been testing against the freetype 2.3.8 release.
 I think there may be some bit rot in the incremental font support.

Indeed.  After Graham has stopped to work on this, noone has
maintained this code; from time to time we've checked that compilation
doesn't fail, but it hasn't been verified that it really works.

 In particular, at t1gload.c:287 T1_Load_Glyph() throws
 T1_Err_Invalid_Argument if the requested glyph index is larger than
 num_glyphs in the face.  Yet as far as I can tell this was never set
 through the incremental font api.

 Similarly, version 1.205 of ttgload.c broke incremental truetype
 handling.

To help in debugging it would be great if you can provide a small
stand-alone snippet which I can compile easily, together with small
input data if necessary.

 What can we do to fix this up?  Is our code wrong?  How is this
 supposed to work.

I rather suspect that a bug has crept into FreeType.

 Do you have any tests for the incremental api?

No, unfortunately.


Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Incremental font support

2009-02-18 Thread Werner LEMBERG

 I'm sorry to say that there is no chance that I shall work on this
 again.  I have too much on my plate for the foreseeable future.

OK.

 But I claim (as always ;-) that the parts of the bridge code I wrote
 are relatively easy to follow and can probably be debugged by
 single-stepping and thinking hard.

I probably have difficulties with the latter :-)


Werner


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Incremental font support

2009-02-18 Thread Ralph Giles
On Wed, Feb 18, 2009 at 7:59 AM, Henry Stiles henry.sti...@artifex.com wrote:

 to build gs with freeype:

 make FT_BRIDGE=1 FT_CFLAGS=-I../freetype-2.3.8/include
 FT_LIB=./freetype-2.3.8/objs/libfreetype.a debug

Just to follow up for anyone trying this; this is with the 'freetype'
branch from my personal git tree;
http://git.ghostscript.com/?p=gs-giles;a=summary With the current tip
you need:

make FT_BRIDGE=1 FT_CFLAGS=-I../freetype-2.3.8/include
FT_LIBS=./freetype-2.3.8/objs/libfreetype.a debug

Assuming you've compiled freetype-2.3.8 in a parallel directory.

I also had to copy lib/FAPI* to the run directory for the bridge to work.

 -r


___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] Incremental font support

2009-02-18 Thread Henry Stiles

 To help in debugging it would be great if you can provide a small
 stand-alone snippet which I can compile easily, together with small
 input data if necessary.


Hi Werner

ttgload.c revision 1.205 broke incremental font support for type 42
fonts (postscript embedded truetype fonts), revision 1.95 t1gload.c
broke type 1 incremental fonts.  The cvs logs seem to explain why each
change was made, each change effectively prohibits the loading of a
font without glyphs.  In the incremental interface all fonts load with
0 glyphs, glyph information is provided later.

To reproduce the problem build ghostscript with freetype and send any
postscript job with a type1 or type42 font, here is a simple test:

/Palatino-Italic findfont 20 scalefont setfont 250 250 moveto (freetype)
show showpage


to build gs with freeype:

make FT_BRIDGE=1 FT_CFLAGS=-I../freetype-2.3.8/include
FT_LIB=./freetype-2.3.8/objs/libfreetype.a debug


If the incremental API is for use only by ghostscript the fix is to
predicate the the two changes on the incremental interface being
undefined as the gs parser will check these conditions before
synthesizing the font.  If you have other clients of this interface
we'll need to study this more.

Thanks

Henry

 What can we do to fix this up?  Is our code wrong?  How is this
 supposed to work.

 I rather suspect that a bug has crept into FreeType.

 Do you have any tests for the incremental api?

 No, unfortunately.


Werner



___
Freetype-devel mailing list
Freetype-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/freetype-devel