On 16/03/2011 09:33, Werner LEMBERG wrote:
I have discovered some other minor optimisations to the stroker
module, but I'm not sure if it's worth mentioning them - they won't
provide much speed improvement but will get rid of some anomalies
and inefficiencies.
*Any* improvement is highly welcomed! I'm glad that you are actually
looking at the code.
Werner
I have also discovered that CartoType's method of stroking paths
is much faster than FreeType's (more than twice as fast, I think -
at any rate, it makes CartoType benchmark at about 10 seconds as
opposed to 15 seconds, and CartoType does a lot of other things;
this was disappointing to me because I had hoped to speed up
CartoType by using the FreeType method). I don't have time to
create a FreeType version of the CartoType system right now, but I
think it's because CartoType uses the intersections of parallels
to get inner join positions, while FreeType calculates them using
trigonometry.
I'm happy to share CartoType's system with the world if it's of
interest - but again, it's a matter of time, because I am very
busy and CartoType's C++ coding style is very different from
FreeType's C, so I'd have to do a lot of conversion.
Credit for CartoType's system is due to my colleague Lex Warners
(now inactive, alas), who also implemented the fixed-point
trigonometric routines.
Graham
|