You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PostScript Type42 embedding is broken in various ways #18191
In euro.ps the font is actually embedded as Type 3, not Type 42 (as can be checked by opening the file in a text editor).
In zeroeuro.ps the font is correctly embedded as Type 42, but the euro sign fails to display correctly (we get a rectangular box instead). sqrt.ps causes an error with the viewer (Error: /invalidfont in definefont).
Given that in all likelihood this has been broken for a loooooong time (as ttconv is rarely touched) it may be worth waiting for a decision on #18143 first before trying to fix this.
On the other hand, note that this also affects the ps.fonttype = 3 case when rendering more than 255 characters, because we fall back to type 42 in that case (example below). By the spec, a type 3 font cannot contain more than 255 glyphs, but empirically, things work just fine for us, likely because we always refer to glyphs by glyph name rather than by glyph index? If we want to be super safe wrt. the spec, I guess we could split a >255-glyph font into multiple fonts and call setfont as needed (we're positioning glyphs one at a time anyways).
Updating this issue: euro.ps, zeroeuro.ps and test.ps outputs are now correct with #20391 pulled in.
(both of them are subsetted, as well as are embedded as Type 42 (test.ps is a hybrid Type3/Type42 output, since chars > 255))
sqrt.ps however, is still broken. I wonder if recent PRs by @sauerburger ends up fixing this as well?
Since we don't have more examples/references about how and what more is broken for Type42 embedding, I think we can close this with #20391.. every example here has been fixed either by subsetting PR or #20597
Activity
aitikgupta commentedon Mar 27, 2021
Or sometimes fail to display anything at all.
The font has the glyphs (Type 3 works fine), but the output is blank (even though the whole font is embedded).
aitikgupta commentedon Jul 13, 2021
Updating this issue:
euro.ps,zeroeuro.psandtest.psoutputs are now correct with #20391 pulled in.(both of them are subsetted, as well as are embedded as Type 42 (
test.psis a hybrid Type3/Type42 output, since chars > 255))sqrt.pshowever, is still broken. I wonder if recent PRs by @sauerburger ends up fixing this as well?sauerburger commentedon Jul 13, 2021
I think the issue with
sqrt.pswas the missing header bytes in the embedded font and should be fixed with #20597.aitikgupta commentedon Jul 13, 2021
I just checked, #20597 indeed fixes the
sqrt.psbug too!aitikgupta commentedon Jul 22, 2021
Since we don't have more examples/references about how and what more is broken for Type42 embedding, I think we can close this with #20391.. every example here has been fixed either by subsetting PR or #20597