freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Accelerating freetype rendering with SSE/AVX


From: Alexei Podtelezhnikov
Subject: Re: [ft-devel] Accelerating freetype rendering with SSE/AVX
Date: Fri, 23 Mar 2018 10:17:52 -0400



On Fri, Mar 23, 2018 at 8:48 AM, Дмитрий Леонтьев <address@hidden> wrote:
> I've developed an algorithm which can rasterize paths with SIMD instructions. I believe this algorithm may be useful for freetype library. It draws characters in 1-bit resolution(it can be useful for HiDPI displays) but can be adapted to 256-color rendering by reducind hi-res images down to 8bpp ones.

This sounds similar to font-rs. The efforts to port that to FreeType has fizzled.
 
> 1)what is the correct way to add my path rendering algorithm to freetype?
> I can redesign API in whatever way suitable to freetype, but I don't know where to start.

It is possible to use external render with FreeType. https://www.freetype.org/freetype2/docs/reference/ft2-raster.html
FreeType is modular. Your algorithm could be a separate module. FreeType itself uses 2 completely separate rendering algorithms for 1bpp and 8bpp

> 2)my algorithm is best in rendering paths combines of lines. quadratic curves are also ok, and the algorithm does not care about order of primitives as long as they make a closed path. But I've no idea how to handle cubic curves. Is there any built-in-freetype option to decompose them before drawing?

The entire FreeType 8bpp algorithm is in one file. Cubic and conic Bezier curves are approximated by a reasonable number of straight segments

Good luck,
Alexei

reply via email to

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