@ -570,25 +570,20 @@
/* For incremental fonts get the character data using the */
/* callback function. */
if ( face - > root . internal - > incremental_interface )
{
FT_Data data ;
FT_Error error = face - > root . internal - > incremental_interface - > funcs - > get_glyph_data (
face - > root . internal - > incremental_interface - > object ,
glyph_index , & data ) ;
{
FT_Data data ;
FT_Error error = face - > root . internal - > incremental_interface - > funcs - > get_glyph_data (
face - > root . internal - > incremental_interface - > object ,
glyph_index , & data ) ;
* pointer = ( FT_Byte * ) data . pointer ;
* length = data . length ;
* length = data . length ;
return error ;
}
else
# endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
CFF_Font cff = ( CFF_Font ) ( face - > extra . data ) ;
CFF_Font cff = ( CFF_Font ) ( face - > extra . data ) ;
return cff_index_access_element ( & cff - > charstrings_index , glyph_index ,
pointer , length ) ;
}
@ -608,12 +603,10 @@
/* For incremental fonts get the character data using the */
/* callback function. */
if ( face - > root . internal - > incremental_interface )
{
FT_Data data ;
data . pointer = * pointer ;
data . length = length ;
{
FT_Data data ;
data . pointer = * pointer ;
data . length = length ;
face - > root . internal - > incremental_interface - > funcs - > free_glyph_data (
face - > root . internal - > incremental_interface - > object , & data ) ;
}
@ -621,9 +614,7 @@
# endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
CFF_Font cff = ( CFF_Font ) ( face - > extra . data ) ;
CFF_Font cff = ( CFF_Font ) ( face - > extra . data ) ;
cff_index_forget_element ( & cff - > charstrings_index , pointer ) ;
}
}
@ -640,14 +631,26 @@
FT_Int bchar_index , achar_index , n_base_points ;
FT_Outline * base = decoder - > builder . base ;
TT_Face face = decoder - > builder . face ;
CFF_Font cff = ( CFF_Font ) ( face - > extra . data ) ;
FT_Vector left_bearing , advance ;
FT_Byte * charstring ;
FT_ULong charstring_len ;
# ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Incremental fonts don't necessarily have valid charsets. */
/* They use the character code, not the glyph index, in this case. */
if ( face - > root . internal - > incremental_interface )
{
bchar_index = bchar ;
achar_index = achar ;
}
else
# endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
CFF_Font cff = ( CFF_Font ) ( face - > extra . data ) ;
bchar_index = cff_lookup_glyph_by_stdcharcode ( cff , bchar ) ;
achar_index = cff_lookup_glyph_by_stdcharcode ( cff , achar ) ;
bchar_index = cff_lookup_glyph_by_stdcharcode ( cff , bchar ) ;
achar_index = cff_lookup_glyph_by_stdcharcode ( cff , achar ) ;
}
if ( bchar_index < 0 | | achar_index < 0 )
{
@ -699,7 +702,8 @@
& charstring , & charstring_len ) ;
if ( ! error )
{
error = cff_decoder_parse_charstrings ( decoder , charstring , charstring_len ) ;
error = cff_decoder_parse_charstrings ( decoder , charstring ,
charstring_len ) ;
if ( error )
goto Exit ;
@ -2312,7 +2316,7 @@
# ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Control data and length may not be available for incremental */
/* Control data and length may not be available for incremental */
/* fonts. */
if ( face - > root . internal - > incremental_interface )
{
@ -2326,13 +2330,11 @@
/* See how charstring loads at cff_index_access_element() in */
/* cffload.c. */
{
CFF_IndexRec csindex = cff - > charstrings_index ;
glyph - > root . control_data =
csindex . bytes + csindex . offsets [ glyph_index ] - 1 ;
glyph - > root . control_len =
charstring_len ;
CFF_IndexRec csindex = cff - > charstrings_index ;
glyph - > root . control_data =
csindex . bytes + csindex . offsets [ glyph_index ] - 1 ;
glyph - > root . control_len =
charstring_len ;
}
}