[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [ft-devel] latest patch file for spline flattening
From: |
David Bevan |
Subject: |
RE: [ft-devel] latest patch file for spline flattening |
Date: |
Tue, 7 Sep 2010 12:39:12 -0400 |
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 HAIN NEW HAIN
average line segs per arc 13.5 11.3 2.1 30.9 6.1
max line segs per arc 32 133 16 163 18
average deviation per line seg 0.29 0.44 6.5 0.37 7.4
max deviation per line seg 22.2 15.8 15.7 7.9 15.7
Performance results:
In gray_convert_glyph, the time is distributed as follows:
CJK CJK CJK LATIN LATIN
OLD NEW HAIN NEW HAIN
render_line 20% 15% 12% 14% 11%
render_cubic 15% 33% 9% 34% 11%
render_scanline 14% 10% 10% 10% 11%
split_cubic 6% 9% 2% 10% 3%
Including children, we have the following actual times per call for handling
cubic curves:
CJK CJK CJK LATIN LATIN
OLD NEW HAIN NEW HAIN
render_cubic 142us 220us 61us 546us 176us
Conclusions:
The performance improvement is as evident with Latin fonts as with CJK ones.
However, on average Bezier curves from Latin fonts require more flattening (6
segments versus 2 with the Hain implementation), so processing them takes
longer. As Graham pointed out to me: "The curves used in Latin and other
Latin-like alphabets are very often used to navigate 90-degree corners; P0 and
P1 lie on a grid line, and so do P2 and P3. This is very rarely true in Han
characters."
On the other hand, Latin glyphs contain fewer Bezier curves than CJK (6 versus
57 on average with my data).
The upshot of both of these together is that the performance change is very
similar (the CJK and Latin time distribution figures are so similar they could
be from the same test).
David %^>
- [ft-devel] latest patch file for spline flattening, Graham Asher, 2010/09/06
- RE: [ft-devel] latest patch file for spline flattening, David Bevan, 2010/09/06
- Re: [ft-devel] latest patch file for spline flattening, Graham Asher, 2010/09/06
- RE: [ft-devel] latest patch file for spline flattening, David Bevan, 2010/09/06
- Message not available
- RE: [ft-devel] latest patch file for spline flattening, David Bevan, 2010/09/07
- Re: [ft-devel] latest patch file for spline flattening, GRAHAM ASHER, 2010/09/07
- RE: [ft-devel] latest patch file for spline flattening, David Bevan, 2010/09/07
- Re: [ft-devel] latest patch file for spline flattening, GRAHAM ASHER, 2010/09/07
- Message not available
- RE: [ft-devel] latest patch file for spline flattening, David Bevan, 2010/09/07
- Re: [ft-devel] latest patch file for spline flattening, GRAHAM ASHER, 2010/09/07
- Message not available
- RE: [ft-devel] latest patch file for spline flattening,
David Bevan <=
- Message not available
- Message not available
- RE: [ft-devel] latest patch file for spline flattening, David Bevan, 2010/09/08
- Re: [ft-devel] latest patch file for spline flattening, GRAHAM ASHER, 2010/09/08
- RE: [ft-devel] latest patch file for spline flattening, David Bevan, 2010/09/08
- Re: [ft-devel] latest patch file for spline flattening, Graham Asher, 2010/09/12
- Re: [ft-devel] latest patch file for spline flattening, Werner LEMBERG, 2010/09/12
- Re: [ft-devel] latest patch file for spline flattening, Behdad Esfahbod, 2010/09/12
- RE: [ft-devel] latest patch file for spline flattening, David Bevan, 2010/09/13
- Re: [ft-devel] latest patch file for spline flattening, Graham Asher, 2010/09/12
- Re: [ft-devel] latest patch file for spline flattening, Graham Asher, 2010/09/12