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: Zhuyie
Subject: Re: A few questions about the new SDF render
Date: Tue, 6 Jul 2021 22:43:42 +0800

Thank you for the clarification! 

One more question: Do you have a recommended font size for the SDF render? (I think low resolution SDF will hurts rendering quality) 


On Tue, Jul 6, 2021 at 10:25 PM Anuj Verma <anujv@iitbhilai.ac.in> wrote:
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]