tdf#113448 fix type1 font subsetter
This fixes verapdf A-1 validation error '6.2.11.5-1 glyph width in
dict and font file inconsistent'
Previous code was writing hard-coded '1000' as glyph width for any
type1 font subsetting - since actual type2 width info only became
available during subsequent convertOneTypeOp() parsing.
Catch was, that loop sometimes already modifies the output buffer
(whenever glyph path info was given), so we fix that by first padding
out 5 bytes for the width (size of integers are sadly variable), then
parsing Type2 glyph code, and in the end putting in the actual width
value we then know.
Can't put hsbw type1 op last, since standard requires that to be first
(and can only be given _once_)...
Could be re-done nicer by buffering Type2 glyph data, then writing it.
Left as an exercise for the reader.
Change-Id: I64ffaa32ded2f0a7c06311d1e0426cf358308a0a
Reviewed-on: https://gerrit.libreoffice.org/69293
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>