LibPDF: Construct accented characters with Type1 seac command

The seac command provides the base and accented character that are
needed to create an accented character glyph. Storing these values is
all that was left to properly support these composed glyphs.
This commit is contained in:
Rodrigo Tobar 2023-02-05 14:25:57 +08:00 committed by Andreas Kling
parent 3eaa27f53a
commit e4a7606b81

View file

@ -397,11 +397,21 @@ PDFErrorOr<Type1FontProgram::Glyph> Type1FontProgram::parse_glyph(ReadonlyBytes
case DotSection:
case VStem3:
case HStem3:
case Seac:
// FIXME: Do something with these?
state.sp = 0;
break;
case Seac: {
auto achar = pop();
auto bchar = pop();
auto ady = pop();
auto adx = pop();
// auto asb = pop();
state.glyph.set_accented_character(AccentedCharacter { (u8)bchar, (u8)achar, adx, ady });
state.sp = 0;
break;
}
case Div: {
auto num2 = pop();
auto num1 = pop();