[sfnt] Minor.
* src/sfnt/ttcolr.c (tt_face_load_colr_layers): s/palette_index/palette_entry_index/ for consistency. Adjust return error code in case of error.
This commit is contained in:
parent
04338a5e52
commit
7de877bbc6
|
@ -1,3 +1,11 @@
|
||||||
|
2018-06-12 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
[sfnt] Minor.
|
||||||
|
|
||||||
|
* src/sfnt/ttcolr.c (tt_face_load_colr_layers):
|
||||||
|
s/palette_index/palette_entry_index/ for consistency.
|
||||||
|
Adjust return error code in case of error.
|
||||||
|
|
||||||
2018-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2018-06-11 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||||
|
|
||||||
[raster] Clean up.
|
[raster] Clean up.
|
||||||
|
|
|
@ -400,18 +400,18 @@
|
||||||
|
|
||||||
for ( layer_idx = 0; layer_idx < glyph_record.num_layers; layer_idx++ )
|
for ( layer_idx = 0; layer_idx < glyph_record.num_layers; layer_idx++ )
|
||||||
{
|
{
|
||||||
FT_UShort gid = FT_NEXT_USHORT( layer_record_ptr );
|
FT_UShort gid = FT_NEXT_USHORT( layer_record_ptr );
|
||||||
FT_UShort palette_index = FT_NEXT_USHORT( layer_record_ptr );
|
FT_UShort palette_entry_index = FT_NEXT_USHORT( layer_record_ptr );
|
||||||
|
|
||||||
|
|
||||||
if ( palette_index != 0xFFFF &&
|
if ( palette_entry_index != 0xFFFF &&
|
||||||
palette_index >= face->palette_data.num_palette_entries )
|
palette_entry_index >= face->palette_data.num_palette_entries )
|
||||||
{
|
{
|
||||||
error = FT_THROW( Invalid_File_Format );
|
error = FT_THROW( Invalid_Table );
|
||||||
goto Error;
|
goto Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
layers[layer_idx].color_index = palette_index;
|
layers[layer_idx].color_index = palette_entry_index;
|
||||||
layers[layer_idx].glyph_index = gid;
|
layers[layer_idx].glyph_index = gid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue