diff --git a/ChangeLog b/ChangeLog index 2b6c0588a..de353fd7d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-07-02 Werner Lemberg + + s/palette_types/palette_flags/. + + Suggested by Behdad. + 2018-07-02 Werner Lemberg Make `FT_Get_Color_Glyph_Layer' return FT_Bool. diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h index 497c2e778..e4fa4afd4 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 5588f5ddf..178d892d3 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 5dc41b4a3..7777db148 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 9151ab5fa..977e149b6 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 9cdcec69c..f01d88c63 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 )