[ft-devel] latest patch file for spline flattening

2010-09-06 Thread Graham Asher
Here's a new version of my spline flattening patch. (I would like to be able to push this to the git repository but am having authentication problems; Werner has been helping me, but no success so far, probably because of my ineptitude in these matters.). The nub of the latest change is that I

RE: [ft-devel] latest patch file for spline flattening

2010-09-06 Thread David Bevan
e something like the square-root avoiding estimate above to approximate his L value. David %^> > -Original Message- > From: freetype-devel-bounces+david.bevan=pb@nongnu.org > [mailto:freetype-devel-bounces+david.bevan=pb@nongnu.org] On Behalf Of > Graham Asher >

Re: [ft-devel] latest patch file for spline flattening

2010-09-06 Thread Graham Asher
rrow. I may use something like the square-root avoiding estimate above to approximate his L value. David %^> -Original Message- From: freetype-devel-bounces+david.bevan=pb@nongnu.org [mailto:freetype-devel-bounces+david.bevan=pb....@nongnu.org] On Behalf Of Graham Asher Sent:

RE: [ft-devel] latest patch file for spline flattening

2010-09-06 Thread David Bevan
ieve much today, but hope to spend most of tomorrow on this. David %^> > -Original Message- > From: Graham Asher [mailto:graham.as...@btinternet.com] > Sent: 6 September 2010 12:36 > To: David Bevan > Cc: freetype-devel > Subject: Re: [ft-devel] latest patch file

RE: [ft-devel] latest patch file for spline flattening

2010-09-07 Thread David Bevan
Graham, Here are the results of my performance testing. I was a bit surprised by the results. In gray_convert_glyph, the time is distributed as follows: OLDNEW render_line 20%15% render_cubic 15%33% render_scanline 14%10% split_cubic6%

Re: [ft-devel] latest patch file for spline flattening

2010-09-07 Thread GRAHAM ASHER
a, or a mixture of both? Best regards, Graham - Original Message From: David Bevan To: Graham Asher Cc: freetype-devel Sent: Tuesday, 7 September, 2010 12:40:21 Subject: RE: [ft-devel] latest patch file for spline flattening Graham, Here are the results of my performance testi

RE: [ft-devel] latest patch file for spline flattening

2010-09-07 Thread David Bevan
how it compares. David %^> -Original Message- From: GRAHAM ASHER [mailto:graham.as...@btinternet.com] Sent: 07 September 2010 13:46 To: David Bevan Cc: freetype-devel Subject: Re: [ft-devel] latest patch file for spline flattening That is very interesting and very useful - in fac

Re: [ft-devel] latest patch file for spline flattening

2010-09-07 Thread GRAHAM ASHER
RAHAM ASHER Cc: freetype-devel Sent: Tuesday, 7 September, 2010 13:52:35 Subject: RE: [ft-devel] latest patch file for spline flattening After trying various other fonts, I settled on using a single large (14,000 glyphs; 800,000 Bezier curves) CID-keyed Type 1 font, which seemed to show p

RE: [ft-devel] latest patch file for spline flattening

2010-09-07 Thread David Bevan
I've now implemented something based on Hain's research and it seems to be measurably faster than previous FT approaches. I have used Hain's paper (now available from http://tinyurl.com/HainBez) to provide some sensible heuristics rather than implement all his stuff in detail, and done so witho

Re: [ft-devel] latest patch file for spline flattening

2010-09-07 Thread GRAHAM ASHER
26:24 Subject: RE: [ft-devel] latest patch file for spline flattening I've now implemented something based on Hain's research and it seems to be measurably faster than previous FT approaches. I have used Hain's paper (now available from http://tinyurl.com/HainBez) to provide some

RE: [ft-devel] latest patch file for spline flattening

2010-09-07 Thread David Bevan
Here are some test results with Latin fonts (40 thousand curves from fonts at various point sizes). Trace results: CJK CJK CJK LATIN LATIN OLD NEW HAINNEW HAIN avera

RE: [ft-devel] latest patch file for spline flattening

2010-09-08 Thread David Bevan
Graham, Here's a final revision. It produces exactly the same results as the previous one but the code is a bit faster (and also easier to understand - the previous code was trying to be a bit too clever). David %^> static void gray_render_cubic( RAS_ARG_ const FT_Vector* control1,

Re: [ft-devel] latest patch file for spline flattening

2010-09-08 Thread GRAHAM ASHER
el Sent: Wednesday, 8 September, 2010 8:50:51 Subject: RE: [ft-devel] latest patch file for spline flattening Graham, Here's a final revision. It produces exactly the same results as the previous one but the code is a bit faster (and also easier to understand - the previous code was trying t

RE: [ft-devel] latest patch file for spline flattening

2010-09-08 Thread David Bevan
> -Original Message- > From: GRAHAM ASHER [mailto:graham.as...@btinternet.com] > Sent: 8 September 2010 11:49 > To: David Bevan > Cc: FreeType > Subject: Re: [ft-devel] latest patch file for spline flattening > > That's great - but can you refresh my memo

Re: [ft-devel] latest patch file for spline flattening

2010-09-12 Thread Graham Asher
David, I've tested your code with CartoType, my map rendering library, and it produces a small speedup there too. (The smallness of the speedup is to do with the fact that CartoType's curves are nearly always approximations to arcs of circles, which don't behave too badly with my previous op

Re: [ft-devel] latest patch file for spline flattening

2010-09-12 Thread Graham Asher
On 08/09/2010 08:50, David Bevan wrote: if (s> (s_limit = L * (TPos)(FT_MAX_CURVE_DEVIATION / 0.75))) goto Split; Surely this should be if (s> (s_limit = L * (TPos)(FT_MAX_CURVE_DEVIATION * 0.75))) goto Split; because the limit is 3/4 of the deviation,

Re: [ft-devel] latest patch file for spline flattening

2010-09-12 Thread Graham Asher
No, forget that, I was getting confused. Graham On 12/09/2010 11:16, Graham Asher wrote: On 08/09/2010 08:50, David Bevan wrote: if (s> (s_limit = L * (TPos)(FT_MAX_CURVE_DEVIATION / 0.75))) goto Split; Surely this should be if (s> (s_limit = L * (TPos)(FT_MAX_

Re: [ft-devel] latest patch file for spline flattening

2010-09-12 Thread Werner LEMBERG
> Therefore, combined with the fact that it significantly speeds up font > rendering, and solves the bug that prompted this latest burst of work, > I recommend that it goes into FreeType. Great! Again, thanks a lot, David and Graham, for your hard work on improving this crucial part of FreeType.

Re: [ft-devel] latest patch file for spline flattening

2010-09-12 Thread Behdad Esfahbod
On 09/12/10 09:36, Werner LEMBERG wrote: > >> Werner, can you give a ruling on whether assignments in conditionals >> are allowed in FreeType code? > > If it is allowed in C89, then everything's fine. Please post the > final version I shall commit (I assume that your git access still > doesn't w

RE: [ft-devel] latest patch file for spline flattening

2010-09-13 Thread David Bevan
Yes, I had FT_MAX_CURVE_DEVIATION set to 16 for my tests. David %^> > -Original Message- > From: Graham Asher [mailto:graham.as...@btinternet.com] > Sent: 12 September 2010 10:06 > To: David Bevan > Cc: 'freetype-devel' > Subject: Re: [ft-devel] latest p