Minor fixes.

* include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}:
Rearrange `ps_builder_init' arguments to conventional order.

* src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and
notice for `SubFont' in Type 1 mode.
This commit is contained in:
Ewald Hew 2017-09-25 08:31:52 +02:00 committed by Werner Lemberg
parent 6e7da50bc3
commit a1a6a1f679
5 changed files with 33 additions and 15 deletions

View File

@ -1,3 +1,13 @@
2017-09-25 Ewald Hew <ewaldhew@gmail.com>
[psaux] Minor fixes.
* include/freetype/internal/psaux.h, src/psaux/psobjs.{c,h}:
Rearrange `ps_builder_init' arguments to conventional order.
* src/psaux/psft.c (cf2_decoder_parse_charstrings): Add a check and
notice for `SubFont' in Type 1 mode.
2017-09-25 Ewald Hew <ewaldhew@gmail.com>
[psaux] Move `psdecode' into `psobjs'.

View File

@ -473,9 +473,9 @@ FT_BEGIN_HEADER
typedef struct PS_Builder_FuncsRec_
{
void
(*init)( void* builder,
FT_Bool is_t1,
PS_Builder* ps_builder );
(*init)( PS_Builder* ps_builder,
void* builder,
FT_Bool is_t1 );
void
(*done)( PS_Builder* builder );

View File

@ -315,6 +315,13 @@
FT_ASSERT( decoder &&
( is_t1 || decoder->cff ) );
if ( is_t1 && !decoder->current_subfont )
{
FT_ERROR(( "cf2_decoder_parse_charstrings (Type 1): "
"SubFont missing. Use `t1_make_subfont' first\n" ));
return FT_THROW( Invalid_Table );
}
memory = decoder->builder.memory;
/* CF2 data is saved here across glyphs */

View File

@ -2054,9 +2054,9 @@
/* hinting :: Whether hinting should be applied. */
/* */
FT_LOCAL_DEF( void )
ps_builder_init( void* builder,
FT_Bool is_t1,
PS_Builder* ps_builder )
ps_builder_init( PS_Builder* ps_builder,
void* builder,
FT_Bool is_t1 )
{
FT_ZERO( ps_builder );
@ -2356,9 +2356,9 @@
{
T1_Decoder t1_decoder = (T1_Decoder)decoder;
ps_builder_init( &t1_decoder->builder,
is_t1,
&ps_decoder->builder );
ps_builder_init( &ps_decoder->builder,
&t1_decoder->builder,
is_t1 );
ps_decoder->cf2_instance = &t1_decoder->cf2_instance;
ps_decoder->psnames = t1_decoder->psnames;
@ -2382,9 +2382,9 @@
{
CFF_Decoder* cff_decoder = (CFF_Decoder*)decoder;
ps_builder_init( &cff_decoder->builder,
is_t1,
&ps_decoder->builder );
ps_builder_init( &ps_decoder->builder,
&cff_decoder->builder,
is_t1 );
ps_decoder->cff = cff_decoder->cff;
ps_decoder->cf2_instance = &cff_decoder->cff->cf2_instance;

View File

@ -242,9 +242,10 @@ FT_BEGIN_HEADER
/*************************************************************************/
FT_LOCAL( void )
ps_builder_init( void* builder,
FT_Bool is_t1,
PS_Builder* ps_builder );
ps_builder_init( PS_Builder* ps_builder,
void* builder,
FT_Bool is_t1 );
FT_LOCAL( void )
ps_builder_done( PS_Builder* builder );