Thank you for replying so quickly.
So, from what I understand till now is that freetype generate a texture for each character (which is a glyph) which can then be drawn in the fragment shader.
Now to generate signed distance field I have thought of two methods.
1. When the glyph is created we can add a post-processing step which will generate distance fields for the glyph which can then be accessed.
There are several algorithms to generate distance fields from textures and this method is also discussed in the valve's paper where they used
high resolution images and converted them to low resolution distance fields.
which generate distance field images from vector graphics. This method will be faster as there is no post-processing step involved and will be simpler because
msdfgen
can be used as a reference. (There is a paper by the author of
msdfgen which discuss this method)
Either way we can implement these in the freetype library and then the user can request distance field either by passing a flag while creating a new face using FT_New_Face,
or we can add a new render mode in FT_Render_Mode. Moreover, the first method discussed can be made faster by using the GPU.
Thank you,
Anuj
On Wed, Mar 18, 2020 at 11:57 AM Werner LEMBERG <
address@hidden> wrote:
[Original message sent to the list deleted since it contains a 7MByte
PDF attachment of a potentially non-public file]
[Please subscribe to the `freetype-devel` mailing list!]
Hello Anuj,
> My name is Anuj and I am a 3rd year computer science student. I am
> interested in game engine development and font rendering is one of
> it's features. A paper published by valve shows how good is
> distance field white rendering font. It also reduce memory usage.
> So this year I would like to add distance field to freetype.
This sounds interesting – and it's very nice that you propose
something that is not on our GSOC ideas list! Please elaborate how
you would do that.
Werner
PS: > I have linked the Valve's paper on distance field.
You didn't link, you sent the original paper!