s/palette_types/palette_flags/.

Suggested by Behdad.
This commit is contained in:
Werner Lemberg 2018-07-02 11:50:04 +02:00
parent 4e3b2473d8
commit 7edc937fe6
6 changed files with 15 additions and 9 deletions

View File

@ -1,3 +1,9 @@
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.

View File

@ -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;

View File

@ -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).
*

View File

@ -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 );

View File

@ -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 */

View File

@ -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 )