[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.
This commit is contained in:
parent
f2b64583cb
commit
05439f5cc6
|
@ -1,3 +1,11 @@
|
||||||
|
2019-07-04 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
[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 <chris.liddell@artifex.com>
|
2019-07-04 Chris Liddell <chris.liddell@artifex.com>
|
||||||
|
|
||||||
[psaux] (1/2) Handle fonts that use SEAC for ligatures (#56580).
|
[psaux] (1/2) Handle fonts that use SEAC for ligatures (#56580).
|
||||||
|
|
|
@ -367,6 +367,12 @@
|
||||||
|
|
||||||
FT_GlyphLoader_Prepare( decoder->builder.loader ); /* prepare loader */
|
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 */
|
/* the seac operator must not be nested */
|
||||||
decoder->seac = TRUE;
|
decoder->seac = TRUE;
|
||||||
error = t1_decoder_parse_glyph( decoder, (FT_UInt)bchar_index );
|
error = t1_decoder_parse_glyph( decoder, (FT_UInt)bchar_index );
|
||||||
|
@ -374,11 +380,14 @@
|
||||||
if ( error )
|
if ( error )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
/* save the left bearing and width of the base character */
|
/* If the SEAC glyph doesn't have a (H)SBW of its */
|
||||||
/* as they will be erased by the next load. */
|
/* own use the values from the base glyph. */
|
||||||
|
|
||||||
left_bearing = decoder->builder.left_bearing;
|
if ( decoder->builder.parse_state != T1_Parse_Have_Width )
|
||||||
advance = decoder->builder.advance;
|
{
|
||||||
|
left_bearing = decoder->builder.left_bearing;
|
||||||
|
advance = decoder->builder.advance;
|
||||||
|
}
|
||||||
|
|
||||||
decoder->builder.left_bearing.x = 0;
|
decoder->builder.left_bearing.x = 0;
|
||||||
decoder->builder.left_bearing.y = 0;
|
decoder->builder.left_bearing.y = 0;
|
||||||
|
@ -396,8 +405,8 @@
|
||||||
if ( error )
|
if ( error )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
/* restore the left side bearing and */
|
/* restore the left side bearing and advance width */
|
||||||
/* advance width of the base character */
|
/* of the SEAC glyph or base character (saved above) */
|
||||||
|
|
||||||
decoder->builder.left_bearing = left_bearing;
|
decoder->builder.left_bearing = left_bearing;
|
||||||
decoder->builder.advance = advance;
|
decoder->builder.advance = advance;
|
||||||
|
|
Loading…
Reference in New Issue