freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] SVG "Native" Re: [ft] Three GSoC projects for FreeType


From: Moazin Khatri
Subject: Re: [ft-devel] SVG "Native" Re: [ft] Three GSoC projects for FreeType
Date: Sat, 11 May 2019 15:27:56 +0500

HI Werner,

No, it's the opposite: The function should expect a hook (or a struct
with a bunch of hooks) as an argument, and FreeType is calling these
hooks internally to communicate with the external SVG library.  Have a
look at the function `FT_Set_Debug_Hook' for a very simple example.

Wow. This is really really powerful. I hadn't realized this earlier. I knew things like Function Pointers exist.
But I never knew something this powerful could be done using them. I have totally got it now.  Now I also
see why Toshiya was saying not to link any SVG library directly to FreeType. Totally get it now! :)

To actually try and see if this can be done, I coded a dummy example. It works.
Though I am confident that I have understood it correctly, if you do want to see my dummy example and 
confirm whether I have got it correctly or not, here it is. There's a Readme that explains it too. 

After doing this dummy example, I checked out `FT_Set_Debug_Hook` and it is exactly what I expected it to be.
It's a good and small example. :)
 
Thank you Werner, I am really grateful to you that you took the time to explain this to me. 

Regards,
Moazin

reply via email to

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