Bug 691570 - prefer BaseFont over FontName
Summary: prefer BaseFont over FontName
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: PC Windows 7
: P4 normal
Assignee: Tor Andersson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-22 08:38 UTC by zeniko
Modified: 2012-07-21 20:14 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
sampletest.pdf (9.92 KB, application/pdf)
2010-10-23 16:24 UTC, zeniko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zeniko 2010-08-22 08:38:32 UTC
In the document at http://code.google.com/p/sumatrapdf/issues/detail?id=1014 , a Font's BaseFont differs from its FontDescriptor's FontName, even though the PDF Spec says they should be identical. While MuPDF currently prefers FontName over BaseFont, Adobe Reader seems to do the opposite.

Note: I do have one document (I may not share) where BaseFont is "Arial,Bold+000041" and FontName is "Arial,Bold" and which misrenders with the above change unless either an exception  is made or the trailing "+<digits>" is ignored.
Comment 1 Sebastian Rasmussen 2010-10-23 13:22:00 UTC
Would you mind attaching the .pdf with "Arial,Bold+000041" as BaseFont?
Comment 2 zeniko 2010-10-23 16:24:43 UTC
Created attachment 6823 [details]
sampletest.pdf

Sure, even though I don't quite see why you can't just download it from our own issue tracker.
Comment 3 Sebastian Rasmussen 2010-10-23 23:48:06 UTC
This was a misunderstanding. :) I did download sampletest.pdf from your bugtracker, I meant the one you mentioned in your note.

Upon re-reading the comment I noticed that you already state that you may not share the document. Do you have the possibility to run pdfshow on the file and pass on the output of the Creator/Producer entries from Info-object in the trailer and of course the output of the font object named "Arial,Bold+000041" so that we have some debuginfo at least?
Comment 4 zeniko 2010-10-24 00:24:27 UTC
Ah, that document, that does indeed make more sense:

/Producer (PCL2PDF400 from RJS Software Systems Inc.)

23 0 obj
<<
  /Type /FontDescriptor
  /FontName /Arial,Bold
  /Flags 262176
  /FontBBox [ -200 -300 1200 900 ]
  /Ascent 720
  /CapHeight 660
  /Descent -270
  /ItalicAngle 0
  /StemV 145
>>
endobj

24 0 obj
<<
  /Type /Font
  /Subtype /TrueType
  /Name /Fo41
  /BaseFont /Arial,Bold+000041
  /FontDescriptor 23 0 R
  /Encoding /WinAnsiEncoding
  /FirstChar 32
  /LastChar 255
  /Widths 22 0 R
>>
endobj

27 0 obj
<<
  /Type /Font
  /Subtype /TrueType
  /Name /Fo43
  /BaseFont /Arial,BoldItalic+000043
  /FontDescriptor 26 0 R
  /Encoding /WinAnsiEncoding
  /FirstChar 32
  /LastChar 255
  /Widths 25 0 R
>>
endobj

26 0 obj
<<
  /Type /FontDescriptor
  /FontName /Arial,BoldItalic
  /Flags 262176
  /FontBBox [ -200 -300 1200 900 ]
  /Ascent 720
  /CapHeight 660
  /Descent -270
  /ItalicAngle -15
  /StemV 145
>>
endobj

Anything else that might help you?
Comment 5 Tor Andersson 2012-07-20 11:20:09 UTC
I believe this has already been fixed. The sampletest.pdf file renders as expected with the current code.
Comment 6 zeniko 2012-07-21 20:14:07 UTC
(In reply to comment #5)
> I believe this has already been fixed.

I still have files where your code (current git HEAD) wrongly prefers FontName over BaseFont. Unfortunately, these files are confidential and may not be shared.