Issue 106704 - Type 1 fonts in PDF export have incorrect /Length3
Summary: Type 1 fonts in PDF export have incorrect /Length3
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: OOo 3.1.1
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 3.3
Assignee: hdu@apache.org
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks: 110326
  Show dependency tree
 
Reported: 2009-11-08 09:04 UTC by adrianjohnson
Modified: 2010-05-19 12:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
OpenOffice test case (7.30 KB, application/vnd.oasis.opendocument.text)
2009-11-08 09:05 UTC, adrianjohnson
no flags Details
PDF output (101.59 KB, application/pdf)
2009-11-08 09:06 UTC, adrianjohnson
no flags Details
Uncompressed PDF (103.59 KB, application/pdf)
2009-11-08 09:06 UTC, adrianjohnson
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description adrianjohnson 2009-11-08 09:04:22 UTC
The attached PDF output contains a Nimbus Roman Type 1 font. /Length3 in the
FontFile stream has value 521. It should be 544.
Comment 1 adrianjohnson 2009-11-08 09:05:32 UTC
Created attachment 66000 [details]
OpenOffice test case
Comment 2 adrianjohnson 2009-11-08 09:06:05 UTC
Created attachment 66001 [details]
PDF output
Comment 3 adrianjohnson 2009-11-08 09:06:41 UTC
Created attachment 66002 [details]
Uncompressed PDF
Comment 4 adrianjohnson 2009-11-08 09:11:05 UTC
In the uncompressed PDF it can be seen that the fixed-content portion of the
font in object 5 is

512 '0' characters and 8 newlines followed by the text:

cleartomark
{restore}if

ie 24 characters including new lines.

This is a total of 544 bytes. But /Length3 is 521.
Comment 5 hdu@apache.org 2009-11-09 09:52:40 UTC
Indeed, thanks Adrian!
Comment 6 philipp.lohmann 2009-11-11 14:47:08 UTC
target
Comment 7 philipp.lohmann 2009-11-23 18:16:21 UTC
Actually in the font installed on my system there is no closing newline after
"{restore}if" (which one would expect), so the correct number is 543. This is
now the case in CWS vcl108. However /Length3 will now be the length from the
beginning of the 512 zero block to basically end of the font file, so if any
further PostScript code or junk data follows, it will be part of Length3. Which
is probably not wrong.

Fixed in CWS vcl108
Comment 8 philipp.lohmann 2009-12-17 18:49:17 UTC
Found a case of PFA font where Length3 still was wrong, fixed now also in CWS
vcl108 (one should think counting 512 '0' characters wasn't that hard, but there
goes :-( )
Comment 9 philipp.lohmann 2010-01-07 13:12:23 UTC
please verify in CWS vcl108
Comment 10 hdu@apache.org 2010-01-07 13:21:24 UTC
Looks good to me -> verfied
Comment 11 hdu@apache.org 2010-05-19 12:51:50 UTC
Closing resolved issue.