freetype-devel
[Top][All Lists]
Advanced

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

Re: [Freetype-devel] Re: GSOC - Distance Fields


From: Anuj Verma
Subject: Re: [Freetype-devel] Re: GSOC - Distance Fields
Date: Sat, 4 Jul 2020 14:44:32 +0530

Hello All,

>> One more thing.  I think the OpenGL demo is not good for everyone to
>> test, so I will working on a demo similar to 'ftview' in my spare
>> time.
>
> Great!

I have created the demo program, it can be used to view raw SDF without
any bilinear filtering and there is no way to reconstruct fonts from SDF because
again it doesn't have bilinear filtering. I will add that soon.

There is a pretty weird issue that I ran into while testing the demo on linux
which doesn't happen on windows whatsoever. On linux various computations
give wrong output. For example, division of  -328032 by 64 gives 1811934202,
whereas it should be -5125. Moreover FT_Vector_Length returns negative values
even for small vectors. There is no overflow so what am I doing wrong?
(One of the places it happens is: https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/sdf/ftsdf.c?h=anuj-distance-field#n1129
 where the `factor' is wrong after division with 64).

I am using gcc version 9.3.0 (Ubuntu 9.3.0-10ubuntu2)
and GNU Make 4.2.1 to build.
If you need more details please let me know.

You can check out the demo here: https://github.com/preversewharf45/ft2sdf-demo
The build process is the same as ft2-demos. The freetype2 library is added as a submodule
so use --recursive. And it only works properly on windows. There is no comments of help
screen so I'm attaching a text file for that.

Thanks,
Anuj

Attachment: controls.txt
Description: Text document


reply via email to

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