Re: [ft-devel] "Inside the fastest font renderer in the world" - conversion started

2016-08-13 Thread Graham Asher

Behdad,

It might be faster, but then again it might not be, depending on the 
value of n, the cost of the test for subdivision, and other things. I 
shall leave all of ftsmooth untouched; this will be an independent piece 
of software that may be connected to FreeType afterwards. However, I 
shall not be engaging in a general discussion about this, except for the 
odd question to Raph, but getting on with it, using my judgement as to 
how to proceed - committee programming is not for me. Anyone who wants 
to try other ways of converting what is a small piece of software can 
try their hand; as I said, there's no rocket science involved.


- Graham


On 12/08/2016 21:38, Behdad Esfahbod wrote:


Because it's faster to subdivide into n segments in a single loop.  
But yeah, that doesn't really matter here, I think you can leave that 
part of ftsmooth untouched.



On Aug 12, 2016 7:15 AM, "Graham Asher" > wrote:


Hi Werner,

yes, I e-mailed him yesterday, and asked a question about his code
too, but with no great hope of an early reply, knowing he's busy.
I asked him why his code to handle quadratic splines used a
division into a number of evenly spaced values for the t parameter
rather than recursive Casteljau splitting. The question was
triggered by seeing that there is a handler for quadratic splines
but not for cubics in his code (it was written for TrueType only).
I suspect the answer has to do with the use of floating-point
rather than integer arithmetic, but if there is no good reason I
will be tempted to (for now) use Casteljau splitting for cubic
splines, or for both types. I am almost certain that it will have
little impact on efficiency, or even improve it, but let's see.

- Graham


On 12/08/2016 06:45, Werner LEMBERG wrote:

Hello Graham,

I have started converting it to C++.  I will do that for
now because
C would adds an extra layer of difficulty and slow the
work down;
but don't worry, there's no rocket science, and it should
be easy to
produce a C version when I've done it.

great!  Please inform Raph also (in case you haven't done so);
I think
he is not on this list.

Wish me luck...

I do :-)


 Werner

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




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




--
Graham Asher
founder and CTO
CartoType Ltd
graham.as...@cartotype.com
+44 (0) 7718 895191
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] "Inside the fastest font renderer in the world" - conversion started

2016-08-12 Thread Behdad Esfahbod
Because it's faster to subdivide into n segments in a single loop.  But
yeah, that doesn't really matter here, I think you can leave that part of
ftsmooth untouched.

On Aug 12, 2016 7:15 AM, "Graham Asher"  wrote:

> Hi Werner,
>
> yes, I e-mailed him yesterday, and asked a question about his code too,
> but with no great hope of an early reply, knowing he's busy. I asked him
> why his code to handle quadratic splines used a division into a number of
> evenly spaced values for the t parameter rather than recursive Casteljau
> splitting. The question was triggered by seeing that there is a handler for
> quadratic splines but not for cubics in his code (it was written for
> TrueType only). I suspect the answer has to do with the use of
> floating-point rather than integer arithmetic, but if there is no good
> reason I will be tempted to (for now) use Casteljau splitting for cubic
> splines, or for both types. I am almost certain that it will have little
> impact on efficiency, or even improve it, but let's see.
>
> - Graham
>
>
> On 12/08/2016 06:45, Werner LEMBERG wrote:
>
>> Hello Graham,
>>
>> I have started converting it to C++.  I will do that for now because
>>> C would adds an extra layer of difficulty and slow the work down;
>>> but don't worry, there's no rocket science, and it should be easy to
>>> produce a C version when I've done it.
>>>
>> great!  Please inform Raph also (in case you haven't done so); I think
>> he is not on this list.
>>
>> Wish me luck...
>>>
>> I do :-)
>>
>>
>>  Werner
>>
>> ___
>> Freetype-devel mailing list
>> Freetype-devel@nongnu.org
>> https://lists.nongnu.org/mailman/listinfo/freetype-devel
>>
>>
>
> ___
> Freetype-devel mailing list
> Freetype-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/freetype-devel
>
___
Freetype-devel mailing list
Freetype-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/freetype-devel


Re: [ft-devel] "Inside the fastest font renderer in the world" - conversion started

2016-08-12 Thread Graham Asher

Hi Werner,

yes, I e-mailed him yesterday, and asked a question about his code too, 
but with no great hope of an early reply, knowing he's busy. I asked him 
why his code to handle quadratic splines used a division into a number 
of evenly spaced values for the t parameter rather than recursive 
Casteljau splitting. The question was triggered by seeing that there is 
a handler for quadratic splines but not for cubics in his code (it was 
written for TrueType only). I suspect the answer has to do with the use 
of floating-point rather than integer arithmetic, but if there is no 
good reason I will be tempted to (for now) use Casteljau splitting for 
cubic splines, or for both types. I am almost certain that it will have 
little impact on efficiency, or even improve it, but let's see.


- Graham


On 12/08/2016 06:45, Werner LEMBERG wrote:

Hello Graham,


I have started converting it to C++.  I will do that for now because
C would adds an extra layer of difficulty and slow the work down;
but don't worry, there's no rocket science, and it should be easy to
produce a C version when I've done it.

great!  Please inform Raph also (in case you haven't done so); I think
he is not on this list.


Wish me luck...

I do :-)


 Werner

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




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


Re: [ft-devel] "Inside the fastest font renderer in the world" - conversion started

2016-08-11 Thread Werner LEMBERG

Hello Graham,

> I have started converting it to C++.  I will do that for now because
> C would adds an extra layer of difficulty and slow the work down;
> but don't worry, there's no rocket science, and it should be easy to
> produce a C version when I've done it.

great!  Please inform Raph also (in case you haven't done so); I think
he is not on this list.

> Wish me luck...

I do :-)


Werner

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