Commit 7edc937fe679d14d66f55cf6f7fa607925d38f3c

Werner Lemberg 2018-07-02T11:50:04

s/palette_types/palette_flags/. Suggested by Behdad.

diff --git a/ChangeLog b/ChangeLog
index 2b6c058..de353fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-07-02  Werner Lemberg  <wl@gnu.org>
 
+	s/palette_types/palette_flags/.
+
+	Suggested by Behdad.
+
+2018-07-02  Werner Lemberg  <wl@gnu.org>
+
 	Make `FT_Get_Color_Glyph_Layer' return FT_Bool.
 
 	* include/freetype/freetype.h, src/base/ftobjs.c
diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h
index 497c2e7..e4fa4af 100644
--- a/include/freetype/ftcolor.h
+++ b/include/freetype/ftcolor.h
@@ -92,7 +92,7 @@ FT_BEGIN_HEADER
    *   FT_PALETTE_XXX
    *
    * @description:
-   *   A list of bit field constants used in the `palette_types' array of
+   *   A list of bit field constants used in the `palette_flags' array of
    *   the @FT_Palette_Data structure to indicate for which background a
    *   palette with a given index is usable.
    *
@@ -134,8 +134,8 @@ FT_BEGIN_HEADER
    *
    *     NULL if the font's `CPAL' table doesn't contain appropriate data.
    *
-   *   palette_types ::
-   *     A read-only array of palette types with `num_palettes' elements.
+   *   palette_flags ::
+   *     A read-only array of palette flags with `num_palettes' elements.
    *     Possible values are an ORed combination of
    *     @FT_PALETTE_FOR_LIGHT_BACKGROUND and
    *     @FT_PALETTE_FOR_DARK_BACKGROUND.
@@ -170,7 +170,7 @@ FT_BEGIN_HEADER
   typedef struct  FT_Palette_Data_ {
     FT_UShort         num_palettes;
     const FT_UShort*  palette_name_ids;
-    const FT_UShort*  palette_types;
+    const FT_UShort*  palette_flags;
 
     FT_UShort         num_palette_entries;
     const FT_UShort*  palette_entry_name_ids;
diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
index 5588f5d..178d892 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -545,7 +545,7 @@ FT_BEGIN_HEADER
    *   Blend the bitmap in `new_glyph' into `base_glyph' using the color
    *   specified by `color_index'.  If `color_index' is 0xFFFF, use
    *   `face->foreground_color' if `face->have_foreground_color' is set.
-   *   Otherwise check `face->palette_data.palette_type': If present and
+   *   Otherwise check `face->palette_data.palette_flags': If present and
    *   @FT_PALETTE_FOR_DARK_BACKGROUND is set, use BGRA value 0xFFFFFFFF
    *   (white opaque).  Otherwise use BGRA value 0x000000FF (black opaque).
    *
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index 5dc41b4..7777db1 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -1814,7 +1814,7 @@
 
     /* freeing glyph color palette data */
     FT_FREE( face->palette_data.palette_name_ids );
-    FT_FREE( face->palette_data.palette_types );
+    FT_FREE( face->palette_data.palette_flags );
     FT_FREE( face->palette_data.palette_entry_name_ids );
     FT_FREE( face->palette );
 
diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c
index 9151ab5..977e149 100644
--- a/src/sfnt/ttcolr.c
+++ b/src/sfnt/ttcolr.c
@@ -375,8 +375,8 @@
       }
       else
       {
-        if ( face->palette_data.palette_types                          &&
-             ( face->palette_data.palette_types[face->palette_index] &
+        if ( face->palette_data.palette_flags                          &&
+             ( face->palette_data.palette_flags[face->palette_index] &
                  FT_PALETTE_FOR_DARK_BACKGROUND                      ) )
         {
           /* white opaque */
diff --git a/src/sfnt/ttcpal.c b/src/sfnt/ttcpal.c
index 9cdcec6..f01d88c 100644
--- a/src/sfnt/ttcpal.c
+++ b/src/sfnt/ttcpal.c
@@ -155,7 +155,7 @@
         while ( q < limit )
           *q++ = FT_NEXT_USHORT( p );
 
-        face->palette_data.palette_types = array;
+        face->palette_data.palette_flags = array;
       }
 
       if ( label_offset )