[sbit] Minor fixes.
* src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]: Accept overlay format also, but emit warning message in that case. (tt_sbit_decoder_load_metrics): Add missing newline to error message. (tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS 7.1) to the list of unsupported formats.
This commit is contained in:
parent
118e651b0b
commit
cc7bb80bde
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2014-10-20 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[sbit] Minor fixes.
|
||||
|
||||
* src/sfnt/ttsbit.c (tt_face_load_sbit) [TT_SBIT_TABLE_TYPE_SBIX]:
|
||||
Accept overlay format also, but emit warning message in that case.
|
||||
(tt_sbit_decoder_load_metrics): Add missing newline to error
|
||||
message.
|
||||
(tt_sbit_load_sbix_image): Add `rgbl' graphic type (as used on iOS
|
||||
7.1) to the list of unsupported formats.
|
||||
|
||||
2014-10-19 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
[truetype] Clean up bytecode rounding.
|
||||
|
|
|
@ -1016,7 +1016,6 @@
|
|||
if ( is_apple_sbix )
|
||||
has_outline = FALSE;
|
||||
|
||||
|
||||
/* if this font doesn't contain outlines, we try to load */
|
||||
/* a `bhed' table */
|
||||
if ( !has_outline && sfnt->load_bhed )
|
||||
|
|
|
@ -150,12 +150,25 @@
|
|||
error = FT_THROW( Unknown_File_Format );
|
||||
goto Exit;
|
||||
}
|
||||
if ( flags != 0x0001 || num_strikes >= 0x10000UL )
|
||||
|
||||
/* Bit 0 must always be `1'. */
|
||||
/* Bit 1 controls the overlay of bitmaps with outlines. */
|
||||
/* All other bits should be zero. */
|
||||
if ( !( flags == 1 || flags == 3 ) ||
|
||||
num_strikes >= 0x10000UL )
|
||||
{
|
||||
error = FT_THROW( Invalid_File_Format );
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
/* we currently don't support bit 1; however, it is better to */
|
||||
/* draw at least something... */
|
||||
if ( flags == 3 )
|
||||
FT_TRACE1(( "tt_face_load_sbit_strikes:"
|
||||
" sbix overlay not supported yet\n"
|
||||
" "
|
||||
" expect bad rendering results\n" ));
|
||||
|
||||
/*
|
||||
* Count the number of strikes available in the table. We are a bit
|
||||
* paranoid there and don't trust the data.
|
||||
|
@ -518,7 +531,7 @@
|
|||
return FT_Err_Ok;
|
||||
|
||||
Fail:
|
||||
FT_TRACE1(( "tt_sbit_decoder_load_metrics: broken table" ));
|
||||
FT_TRACE1(( "tt_sbit_decoder_load_metrics: broken table\n" ));
|
||||
return FT_THROW( Invalid_Argument );
|
||||
}
|
||||
|
||||
|
@ -1342,6 +1355,7 @@
|
|||
|
||||
case FT_MAKE_TAG( 'j', 'p', 'g', ' ' ):
|
||||
case FT_MAKE_TAG( 't', 'i', 'f', 'f' ):
|
||||
case FT_MAKE_TAG( 'r', 'g', 'b', 'l' ): /* used on iOS 7.1 */
|
||||
error = FT_THROW( Unknown_File_Format );
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue