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: Werner LEMBERG
Subject: Re: [ft-devel] SVG "Native" Re: [ft] Three GSoC projects for FreeType
Date: Sat, 11 May 2019 06:14:55 +0200 (CEST)

>> (1) Provide one or more API functions in FreeType that set up hooks
>>     (i.e., function pointers) for calling SVG routines.
>>
> 
> I think, whenever people use the term "API functions" in the context
> of a library codebase, they are referring to functions which the
> library exposes to the world (code which is using the library), the
> "public" functions.  Am I correct?  Is this what you mean here too?

Yes.

> My understanding so far is, this "one or more API Function", for
> simplicity assume just one function, will return some sort of data
> structure containing a list of function pointers?

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.

> A list of function pointers pointing to the implementation of SVG
> routines?  And FreeType will just call these functions whenever it
> needs to.

That's it, yes.

> This list of function pointers will point to different
> implementations for each SVG library right?

Exactly.  It's up to the calling application to set the hooks to
whatever library.

On the other hand, I want to have a configure-time default so that it
is only necessary to explicitly set hooks for non-default SVG
libraries (or if the default SVG library is not found at configure
time).  This would allow applications to get SVG OpenType support out
of the box, without any additional code on the application side.


    Werner



reply via email to

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