Graham,
That's looking much closer to what I would have thought we needed; only
splitting the curve when required. However, your "fast heuristic" can be very
inaccurate.
Consider
P0: 0,0
P1: 5,5
P2: 95,5
P3: 100,0
The max deviation is 3.75 (0.75 * 5 since Hain's v == 1), but your heur
David,
in fact I coded up and tested a different version using an accurate
calculation of the control point deviation, but it was slower than the
version I am proposing. I'll try your version; and I would be grateful
if you could also do some benchmarking, because obviously we are not
trying
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
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%
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
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
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
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
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
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
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,
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
> -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
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
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,
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_
> 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.
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
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
19 matches
Mail list logo