freetype-devel
[Top][All Lists]
Advanced

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

Re: A few questions about the new SDF render


From: Anuj Verma
Subject: Re: A few questions about the new SDF render
Date: Tue, 6 Jul 2021 19:55:33 +0530

Hello Zhuyie,

> 1. From the comments in ftsdf.c, [...]

The implementation only supports single channel SDF. So the documentation
for ` FT_RENDER_MODE_SDF ` is correct. Thanks though, the comment might
need some editing.

> 2. Are there any tutorials about [...]

The output is a pretty basic SDF, there is a comment on how to convert the output
values to unsigned pixel values (https://gitlab.freedesktop.org/freetype/freetype/-/blob/master/include/freetype/freetype.h#L3324).
As for tutorial, you can use the `ftsdf` demo program implementation in the shaders.
It should work exactly the same. https://gitlab.freedesktop.org/freetype/freetype-demos/-/blob/master/src/ftsdf.c#L598

Thanks,
Anuj


reply via email to

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