[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] controlling FreeType modules
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] controlling FreeType modules |
Date: |
Wed, 22 Aug 2012 10:47:15 +0200 (CEST) |
>> FreeType. If there is ever a need to pass a new string to the
>> library (for which I currently don't have a use case), the data
>> will be copied.
>
> Wait .... how does that work?
>
> That suggests that freetype will copy any structure passed in into
> malloced memory or something; otherwise, one couldn't pass in any
> dynamically calculated values.
Yes.
> But since (AFAICT) the property mechanism is generic, the type of
> the data structure wouldn't be known except to the eventual caller
> of FT_Property_Get. Given this, how can FT_Property_Set know the
> size of the data structure passed in, to malloc/copy it?
The property mechanism has a generic interface to accept any data
structures so that it stays extensible, but the data structures
themselves aren't generic; they are always controlled by FreeType.
For example, to pass a string of arbitrary length, a possible
structure might be
struct foo
{
int len;
char* str;
}
Werner
Re: [ft-devel] controlling FreeType modules, Werner LEMBERG, 2012/08/28
- Re: [ft-devel] controlling FreeType modules, Alexei Podtelezhnikov, 2012/08/29
- Re: [ft-devel] controlling FreeType modules, Behdad Esfahbod, 2012/08/29
- Re: [ft-devel] controlling FreeType modules, Werner LEMBERG, 2012/08/29
- Re: [ft-devel] controlling FreeType modules, Alexei Podtelezhnikov, 2012/08/30
- Re: [ft-devel] controlling FreeType modules, Akira TAGOH, 2012/08/30
- Re: [ft-devel] controlling FreeType modules, suzuki toshiya, 2012/08/30
- Re: [ft-devel] controlling FreeType modules, Werner LEMBERG, 2012/08/30
Message not availableRe: [ft-devel] controlling FreeType modules, Ken Sharp, 2012/08/30