Re: [ft-devel] "Inside the fastest font renderer in the world" - new version available

2016-08-19 Thread Graham Asher
Right now I think the supposed bug doesn't exist, but was caused by 
forcibly closing a debug session in Visual Studio 2015.


On 19/08/2016 14:02, Graham Asher wrote:
I've fixed the clipping and winding rule bugs, and it now works well 
with CartoType map rendering, and seems fast although I have not 
benchmarked it against the older renderer. However, one note of 
caution: I think there is still a bug somewhere, probably a write 
beyond the end of an array; no doubt that is my fault. I will try to 
reproduce and fix it.


I have uploaded the new version.

On 19/08/2016 11:16, Graham Asher wrote:

New version uploaded at

http://www.cartotype.com/assets/downloads/raster_fp/

which is going to be its home for now.

More news when I have done some more testing.



___
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" - new version available

2016-08-19 Thread Graham Asher
I've fixed the clipping and winding rule bugs, and it now works well 
with CartoType map rendering, and seems fast although I have not 
benchmarked it against the older renderer. However, one note of caution: 
I think there is still a bug somewhere, probably a write beyond the end 
of an array; no doubt that is my fault. I will try to reproduce and fix it.


I have uploaded the new version.

On 19/08/2016 11:16, Graham Asher wrote:

New version uploaded at

http://www.cartotype.com/assets/downloads/raster_fp/

which is going to be its home for now.

More news when I have done some more testing.



___
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" - new version available

2016-08-19 Thread Graham Asher

New version uploaded at

http://www.cartotype.com/assets/downloads/raster_fp/

which is going to be its home for now.

More news when I have done some more testing.


On 19/08/2016 09:27, Graham Asher wrote:
This isn't the final version; as always, after releasing a piece of 
code into the wild, one sees problems and omissions. Some notes:


1. My code does clipping, so that you can happily draw lines outside 
the raster. That isn't quite right yet - I need to make a simple change.


2. I am using a different winding rule from Raph. I will also fix 
that. Raph, can you comment on your winding-rule code? It takes the 
absolute value of the coverage then clamps it to 0...1 in your code; 
that seems to implement the non-zero winding rule.


3. It would be great to get Raph's comments on my cubic-spline code, 
built on the analogy of his quadratic code; and on the use of the 
magic constants 0.333 and 3.0 in determining the number of iterations 
when splitting a curve, and on the taking of a fourth root.


4. Raph's code uses 32-bit floating point numbers (float); it might be 
better to use 64-bit (double), because I believe that C always 
calculates to double-precision in any case, and so there is a 
conversion cost. I believe Raph uses float because floats are handled 
faster than doubles by hardware-accelerated SIMD code; but if not 
using SIMD, double may be better. There is also the raster working 
data size question. I use rasterization for large shapes in maps: a 
1000 x 1000 pixel display needs 4Mb of working data in this system, 
with floats, and 8Mb with doubles. Not really a problem nowadays, but 
much larger than the typical FreeType rasterizer's render pool.


I'll report back when I've tried it in CartoType.

Note that my code runs fastest when formatted in Whitesmith's style 
;-) Any attempt at reformatting will be stoutly resisted.


- Graham


On 19/08/2016 06:16, Werner LEMBERG 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

___
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


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