s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/. * include/freetype/ftcolor.h, include/freetype/internal/sfnt.h, src/sfnt/ttcolr.c: Do it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
diff --git a/ChangeLog b/ChangeLog
index 0b2a7ee..12e8468 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-06-21 Werner Lemberg <wl@gnu.org>
+
+ s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
+
+ * include/freetype/ftcolor.h, include/freetype/internal/sfnt.h,
+ src/sfnt/ttcolr.c: Do it.
+
2018-06-19 Werner Lemberg <wl@gnu.org>
[sfnt] Fix CPAL heap buffer overflow.
diff --git a/include/freetype/ftcolor.h b/include/freetype/ftcolor.h
index 90015e3..497c2e7 100644
--- a/include/freetype/ftcolor.h
+++ b/include/freetype/ftcolor.h
@@ -97,19 +97,19 @@ FT_BEGIN_HEADER
* palette with a given index is usable.
*
* @values:
- * FT_PALETTE_USABLE_WITH_LIGHT_BACKGROUND ::
+ * FT_PALETTE_FOR_LIGHT_BACKGROUND ::
* The palette is appropriate to use when displaying the font on a
* light background such as white.
*
- * FT_PALETTE_USABLE_WITH_DARK_BACKGROUND ::
+ * FT_PALETTE_FOR_DARK_BACKGROUND ::
* The palette is appropriate to use when displaying the font on a
* dark background such as black.
*
* @since:
* 2.10
*/
-#define FT_PALETTE_USABLE_WITH_LIGHT_BACKGROUND 0x01
-#define FT_PALETTE_USABLE_WITH_DARK_BACKGROUND 0x02
+#define FT_PALETTE_FOR_LIGHT_BACKGROUND 0x01
+#define FT_PALETTE_FOR_DARK_BACKGROUND 0x02
/**************************************************************************
@@ -137,8 +137,8 @@ FT_BEGIN_HEADER
* palette_types ::
* A read-only array of palette types with `num_palettes' elements.
* Possible values are an ORed combination of
- * @FT_PALETTE_USABLE_WITH_LIGHT_BACKGROUND and
- * @FT_PALETTE_USABLE_WITH_DARK_BACKGROUND.
+ * @FT_PALETTE_FOR_LIGHT_BACKGROUND and
+ * @FT_PALETTE_FOR_DARK_BACKGROUND.
*
* NULL if the font's `CPAL' table doesn't contain appropriate data.
*
@@ -289,7 +289,7 @@ FT_BEGIN_HEADER
* @note:
* If this function isn't called, the text foreground color is set to
* white opaque (BGRA value 0xFFFFFFFF) if
- * @FT_PALETTE_USABLE_WITH_DARK_BACKGROUND is present for the current
+ * @FT_PALETTE_FOR_DARK_BACKGROUND is present for the current
* palette, and black opaque (BGRA value 0x000000FF) otherwise,
* including the case that no palette types are available in the `CPAL'
* table.
diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
index 918a8b6..deb1ed4 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -542,9 +542,8 @@ FT_BEGIN_HEADER
* 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
- * @FT_PALETTE_USABLE_WITH_DARK_BACKGROUND is set, use BGRA value
- * 0xFFFFFFFF (white opaque). Otherwise use BGRA value 0x000000FF
- * (black opaque).
+ * @FT_PALETTE_FOR_DARK_BACKGROUND is set, use BGRA value 0xFFFFFFFF
+ * (white opaque). Otherwise use BGRA value 0x000000FF (black opaque).
*
* @input:
* face ::
diff --git a/src/sfnt/ttcolr.c b/src/sfnt/ttcolr.c
index b12ebe2..4dab972 100644
--- a/src/sfnt/ttcolr.c
+++ b/src/sfnt/ttcolr.c
@@ -377,7 +377,7 @@
{
if ( face->palette_data.palette_types &&
( face->palette_data.palette_types[face->palette_index] &
- FT_PALETTE_USABLE_WITH_DARK_BACKGROUND ) )
+ FT_PALETTE_FOR_DARK_BACKGROUND ) )
{
/* white opaque */
b = 0xFF;