36#ifdef TT_CONFIG_OPTION_COLOR_LAYERS
42#define CPAL_V0_HEADER_BASE_SIZE 12U
70#define FT_COMPONENT ttcpal
105 if ( cpal->version > 1 )
114 if ( CPAL_V0_HEADER_BASE_SIZE +
120 if ( cpal->num_colors * COLOR_SIZE >
table_size - colors_offset )
123 if (
face->palette_data.num_palette_entries > cpal->num_colors )
126 cpal->color_indices =
p;
129 if ( cpal->version == 1 )
131 FT_ULong type_offset, label_offset, entry_label_offset;
137 if ( CPAL_V0_HEADER_BASE_SIZE +
138 face->palette_data.num_palettes * 2U +
142 p +=
face->palette_data.num_palettes * 2U;
152 if (
face->palette_data.num_palettes * 2U >
166 face->palette_data.palette_flags =
array;
173 if (
face->palette_data.num_palettes * 2U >
187 face->palette_data.palette_name_ids =
array;
190 if ( entry_label_offset )
194 if (
face->palette_data.num_palette_entries * 2U >
201 p =
table + entry_label_offset;
203 limit =
q +
face->palette_data.num_palette_entries;
208 face->palette_data.palette_entry_name_ids =
array;
219 face->palette_data.num_palette_entries ) )
249 Cpal* cpal = (Cpal*)
face->cpal;
264 Cpal* cpal = (Cpal*)
face->cpal;
275 if ( !cpal || palette_index >=
face->palette_data.num_palettes )
276 return FT_THROW( Invalid_Argument );
278 offset = cpal->color_indices + 2 * palette_index;
281 if ( color_index +
face->palette_data.num_palette_entries >
285 p = cpal->colors + COLOR_SIZE * color_index;
287 limit =
q +
face->palette_data.num_palette_entries;
static const WCHAR version[]
FT_BEGIN_HEADER struct FT_Color_ FT_Color
#define FT_NEW_ARRAY(ptr, count)
#define FT_QNEW_ARRAY(ptr, count)
#define FT_FRAME_RELEASE(bytes)
#define FT_NEXT_USHORT(buffer)
#define FT_PEEK_USHORT(p)
#define FT_FRAME_EXTRACT(size, bytes)
#define FT_NEXT_ULONG(buffer)
#define FT_NEXT_BYTE(buffer)
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
GLdouble GLdouble GLdouble GLdouble q
GLenum GLuint GLint GLenum face
static char memory[1024 *256]
FT_BEGIN_HEADER tt_face_load_cpal(TT_Face face, FT_Stream stream)
tt_face_palette_set(TT_Face face, FT_UInt palette_index)
tt_face_free_cpal(TT_Face face)