freetype-devel
[Top][All Lists]
Advanced

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

Re: Add support for FT_Face cloning


From: Tayyab Akram
Subject: Re: Add support for FT_Face cloning
Date: Wed, 23 Feb 2022 14:29:18 +0000 (UTC)

Hi David,

Did you get a chance to review my reply on the feedback?

Another thought also occurred to my mind regarding restructuring. We can reorganize with nested structures whose fields would point to upper level fields in the first migration stage. For example:

typedef struct ABC {
  struct {
    FT_UInt *first;
  } mutable;
  struct {
    FT_UInt *second;
  } lazy;

  FT_UInt first;
  FT_UInt second;
} ABC;

The inner pointers will be set during initialization and will be used in clone methods to provide readability.
On Wednesday, February 9, 2022, 10:54:02 PM GMT+5, Tayyab Akram <dear_tayyab@yahoo.com> wrote:


Yeah, but I guess there is only one public data structure involved, that is `FT_Face`. We can write comments for it as its not gonna change but we can reorganize the internal ones.
On Wednesday, February 9, 2022, 10:48:02 PM GMT+5, Werner LEMBERG <wl@gnu.org> wrote:



> So basically, we need to organize the fields in such a way that they
> reflect their traits.  It can be having a prefix describing the
> trait or organizing like the following:
>
> typedef struct ABC {
>  struct {
>    /* Mutable Properties. */
>  } mutable;
>
>  struct {
>    /* Lazy Properties. */
>  } lazy;
>
>  /* Immutable Properties. */
>  FT_UInt first;
>  FT_UInt second;
> } ABC;

Alas, this is not possible for public structures, which can't be
changed in any way to retain backwards compatibility.



    Werner

reply via email to

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