s/FT_PALETTE_USABLE_WITH_/FT_PALETTE_FOR_/.
* include/freetype/ftcolor.h, include/freetype/internal/sfnt.h, src/sfnt/ttcolr.c: Do it.
This commit is contained in:
parent
a6b77ba2b3
commit
9027233f75
|
@ -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>
|
2018-06-19 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[sfnt] Fix CPAL heap buffer overflow.
|
[sfnt] Fix CPAL heap buffer overflow.
|
||||||
|
|
|
@ -97,19 +97,19 @@ FT_BEGIN_HEADER
|
||||||
* palette with a given index is usable.
|
* palette with a given index is usable.
|
||||||
*
|
*
|
||||||
* @values:
|
* @values:
|
||||||
* FT_PALETTE_USABLE_WITH_LIGHT_BACKGROUND ::
|
* FT_PALETTE_FOR_LIGHT_BACKGROUND ::
|
||||||
* The palette is appropriate to use when displaying the font on a
|
* The palette is appropriate to use when displaying the font on a
|
||||||
* light background such as white.
|
* 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
|
* The palette is appropriate to use when displaying the font on a
|
||||||
* dark background such as black.
|
* dark background such as black.
|
||||||
*
|
*
|
||||||
* @since:
|
* @since:
|
||||||
* 2.10
|
* 2.10
|
||||||
*/
|
*/
|
||||||
#define FT_PALETTE_USABLE_WITH_LIGHT_BACKGROUND 0x01
|
#define FT_PALETTE_FOR_LIGHT_BACKGROUND 0x01
|
||||||
#define FT_PALETTE_USABLE_WITH_DARK_BACKGROUND 0x02
|
#define FT_PALETTE_FOR_DARK_BACKGROUND 0x02
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
|
@ -137,8 +137,8 @@ FT_BEGIN_HEADER
|
||||||
* palette_types ::
|
* palette_types ::
|
||||||
* A read-only array of palette types with `num_palettes' elements.
|
* A read-only array of palette types with `num_palettes' elements.
|
||||||
* Possible values are an ORed combination of
|
* Possible values are an ORed combination of
|
||||||
* @FT_PALETTE_USABLE_WITH_LIGHT_BACKGROUND and
|
* @FT_PALETTE_FOR_LIGHT_BACKGROUND and
|
||||||
* @FT_PALETTE_USABLE_WITH_DARK_BACKGROUND.
|
* @FT_PALETTE_FOR_DARK_BACKGROUND.
|
||||||
*
|
*
|
||||||
* NULL if the font's `CPAL' table doesn't contain appropriate data.
|
* NULL if the font's `CPAL' table doesn't contain appropriate data.
|
||||||
*
|
*
|
||||||
|
@ -289,7 +289,7 @@ FT_BEGIN_HEADER
|
||||||
* @note:
|
* @note:
|
||||||
* If this function isn't called, the text foreground color is set to
|
* If this function isn't called, the text foreground color is set to
|
||||||
* white opaque (BGRA value 0xFFFFFFFF) if
|
* 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,
|
* palette, and black opaque (BGRA value 0x000000FF) otherwise,
|
||||||
* including the case that no palette types are available in the `CPAL'
|
* including the case that no palette types are available in the `CPAL'
|
||||||
* table.
|
* table.
|
||||||
|
|
|
@ -542,9 +542,8 @@ FT_BEGIN_HEADER
|
||||||
* specified by `color_index'. If `color_index' is 0xFFFF, use
|
* specified by `color_index'. If `color_index' is 0xFFFF, use
|
||||||
* `face->foreground_color' if `face->have_foreground_color' is set.
|
* `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_type': If present and
|
||||||
* @FT_PALETTE_USABLE_WITH_DARK_BACKGROUND is set, use BGRA value
|
* @FT_PALETTE_FOR_DARK_BACKGROUND is set, use BGRA value 0xFFFFFFFF
|
||||||
* 0xFFFFFFFF (white opaque). Otherwise use BGRA value 0x000000FF
|
* (white opaque). Otherwise use BGRA value 0x000000FF (black opaque).
|
||||||
* (black opaque).
|
|
||||||
*
|
*
|
||||||
* @input:
|
* @input:
|
||||||
* face ::
|
* face ::
|
||||||
|
|
|
@ -377,7 +377,7 @@
|
||||||
{
|
{
|
||||||
if ( face->palette_data.palette_types &&
|
if ( face->palette_data.palette_types &&
|
||||||
( face->palette_data.palette_types[face->palette_index] &
|
( face->palette_data.palette_types[face->palette_index] &
|
||||||
FT_PALETTE_USABLE_WITH_DARK_BACKGROUND ) )
|
FT_PALETTE_FOR_DARK_BACKGROUND ) )
|
||||||
{
|
{
|
||||||
/* white opaque */
|
/* white opaque */
|
||||||
b = 0xFF;
|
b = 0xFF;
|
||||||
|
|
Loading…
Reference in New Issue