[Top][All Lists]

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

Re: Fw: GSoc 2020 project : Integrate distance fields to freetype

Subject: Re: Fw: GSoc 2020 project : Integrate distance fields to freetype
Date: Thu, 19 Mar 2020 11:41:54 +0530

Hello Nikolaus,
So I did look around for a different method and this is what I found. I am not considering valve's method of generating distance field from images because it is more time consuming and it is unnecessary because we have vector fonts which can be directly converted to distance fields.
So the core concept in all the methods is more or less similar, we have questions that define a shape, we then calculate the nearest distance from each point of the image to the edge of the shape. This distance is used as the values for the distance field. The more detailed explanation of the process is described in Chlumsky paper which I have linked below. One of the main disadvantages of this method is that we cannot produce sharp corner so Chlumsky has also proposed a better method which uses multiple color channels and divide the shape to preserve sharp corner.
I have created a simple demo to demonstrate the method.
As well as one more demo which uses quadratic bezier curve and compute distance field in the GPU itself.

Now since freetype can create glyphs with multiple color channels such as FT_PIXEL_MODE_BGRA, we can integrate both these methods. One which output distance field in a single channel and one which output multiple channel distance fields for high precision.

Also please let me know if this project is added to GSoc list so that I can start writing a proposal. Moreover along with this I would also like to contribute to the ftinspect demo program.


Link to Chlumsky paper on multiple channel signed distance fields :
And the link to Chlumsk's msdfgen library :

On Thu, Mar 19, 2020 at 2:59 AM Nikolaus Waxweiler <address@hidden> wrote:
I faintly remember that there has been some additional research on this
topic since Valve presented their approach. I think there even was
something in Qt. Might be worth snooping around for different

reply via email to

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