diff --git a/ChangeLog b/ChangeLog index de4ea869d..84c29a997 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2019-07-04 Werner Lemberg + + [psaux] (2/2) Handle fonts that use SEAC for ligatures (#56580). + + The same as previous commit but for the old engine. + + * src/psaux/t1decode.c (t1operator_seac): Implement it. + 2019-07-04 Chris Liddell [psaux] (1/2) Handle fonts that use SEAC for ligatures (#56580). diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index c2b3729b5..06059a685 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -367,6 +367,12 @@ FT_GlyphLoader_Prepare( decoder->builder.loader ); /* prepare loader */ + /* save the left bearing and width of the SEAC */ + /* glyph as they will be erased by the next load */ + + left_bearing = decoder->builder.left_bearing; + advance = decoder->builder.advance; + /* the seac operator must not be nested */ decoder->seac = TRUE; error = t1_decoder_parse_glyph( decoder, (FT_UInt)bchar_index ); @@ -374,11 +380,14 @@ if ( error ) goto Exit; - /* save the left bearing and width of the base character */ - /* as they will be erased by the next load. */ + /* If the SEAC glyph doesn't have a (H)SBW of its */ + /* own use the values from the base glyph. */ - left_bearing = decoder->builder.left_bearing; - advance = decoder->builder.advance; + if ( decoder->builder.parse_state != T1_Parse_Have_Width ) + { + left_bearing = decoder->builder.left_bearing; + advance = decoder->builder.advance; + } decoder->builder.left_bearing.x = 0; decoder->builder.left_bearing.y = 0; @@ -396,8 +405,8 @@ if ( error ) goto Exit; - /* restore the left side bearing and */ - /* advance width of the base character */ + /* restore the left side bearing and advance width */ + /* of the SEAC glyph or base character (saved above) */ decoder->builder.left_bearing = left_bearing; decoder->builder.advance = advance;