freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] "Inside the fastest font renderer in the world" - first C


From: Raph Levien
Subject: Re: [ft-devel] "Inside the fastest font renderer in the world" - first C version attached
Date: Thu, 18 Aug 2016 22:48:24 -0700

Graham's question to me actually ended up in my Gmail spam folder - almost never happens. In any case, I'll answer it here for the curious.

The reason for the subdivision by n is that I expect the "flatness" computation to be semi-expensive (it's done once rather than on each potential subdivision) and also because you'll often get fewer subdivisions. Taking a circular arc as a simplifying assumption (ie a spherical 🐄), where I get n, a recursive approach would get 2^⌈lg n⌉, which, if I haven't made any horrible mistakes, is expected to be 33% more in the limit.

It probably doesn't make a huge difference. I didn't carefully benchmark one against the other (which should in general be done when making these sorts of decisions). But given my goal of extreme speed, it seemed like the better choice.

Hope this clears things up.

Raph


On Thu, Aug 18, 2016 at 10:28 PM, Raph Levien <address@hidden> wrote:
I'm looking into the licensing question and will get back to you soon.

Raph

On Thu, Aug 18, 2016 at 10:16 PM, Werner LEMBERG <address@hidden> wrote:

> I have successfully converted part of Raph Levien's code - that is,
> the floating-point rasterizer, not the TTF parser - into C, and it
> seems to work well, although I have run only a few small tests so
> far and have not yet benchmarked the speed.

A big thank you, Graham!  Very much appreciated.  I don't know yet,
however, when I will find some time to work on it.

In case you want to do further integration into FreeType, please post
your results here :-)

> One point that I may have to address is that there are declarations
> after statements, which seems to be OK in C nowadays, but wasn't
> formerly, I know; but that can be fixed trivially.

OK.

> The code is attached. Naturally I have credited Raph and used the
> same license. There are documentation comments in the source.

Regarding the license: Raph, would it be possible to add
dual-licensing with GPL2 to the C code, or to change the C code to the
two licenses that come with FreeType?  Reason is that Apache 2.0 is
not compatible with GPL2.


    Werner



reply via email to

[Prev in Thread] Current Thread [Next in Thread]