bugThe FreeType Project - Bugs: bug #31645, >=freetype-2.4.3 makes pdf be...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #31645: >=freetype-2.4.3 makes pdf be shown with ugly fonts

Submitter:  Pacho Ramos <pacho>
Submitted:  Sat 13 Nov 2010 07:54:23 PM UTC
   
 
Severity:  3 - Normal Item Group:  None
Status:  Fixed Privacy:  Public
Assigned to:  mpsuzuki Open/Closed:  Closed
Planned Release:  2.4.4

Jump to the original submission

Mon 22 Nov 2010 06:08:29 PM UTC, comment #10: 

Thanks for very quick reply!
Here I close this bug.

suzuki toshiya <mpsuzuki>
Group administrator
Mon 22 Nov 2010 06:02:03 PM UTC, comment #9: 

Looks to work fine, thanks a lot :-D

Pacho Ramos <pacho>
Mon 22 Nov 2010 05:56:26 PM UTC, comment #8: 

Attached patch is committed to GIT head.
Please test.

(file #22079)

suzuki toshiya <mpsuzuki>
Group administrator
Tue 16 Nov 2010 09:27:48 AM UTC, comment #7: 

Thanks in advance for working on this!

Werner LEMBERG <wl>
Group administrator
Tue 16 Nov 2010 08:39:27 AM UTC, comment #6: 

Yes. To identify problematic fonts by cvt/prep/fpgm checksum,
we have to calculate checksum by ourselves. At present, the
fonts bundled to Microsoft Office for MacOS have correct
checksum, so we can do that.

# if we find some problematic fonts with invalid checksum,
# we have to calculate the checksum always by ourselves
# even if a font provide them.

Now I'm changing my patch to do it. Unfortunately, I have no skill
to write the assembler version of checksum calculator, the faster
version requires a few weeks...

suzuki toshiya <mpsuzuki>
Group administrator
Tue 16 Nov 2010 08:23:39 AM UTC, comment #5: 


> Furthermore, in the TrueType fonts embedded by Quartz
> PDFContext, all tables lack their checksum. Oops.


This basically means that your idea of using cvt checksums fails, right?

Werner LEMBERG <wl>
Group administrator
Tue 16 Nov 2010 06:51:43 AM UTC, comment #4: 

BTW, the creator of the PDF showing this "regression" is
"Quartz PDFContext", a generic framework in Mac OS X
to generate PDF instead of the printing document.
There might be long history that people were asking for
the improvement of its feature to generate well-mannered
PDF, but still the history is ongoing...

On Mac OS X, the genuine TTF for Times Roman is
/System/Library/Fonts/Times.dfont. When Microsoft Office
is installed, /Library/Fonts/Microsoft/Times New Roman.ttf
is added too. Times.dfont doesn't have gasp, but Times New
Roman.ttf has gasp. When I generate a PDF via Microsoft
Word, the gasp table for embedded "Times New Roman" is
removed, as Werner had pointed out.

Furthermore, in the TrueType fonts embedded by Quartz
PDFContext, all tables lack their checksum. Oops.

suzuki toshiya <mpsuzuki>
Group administrator
Mon 15 Nov 2010 04:59:44 AM UTC, comment #3: 

Hi Pachu,
I'm sorry for my change to force hinting for the embedded font
without familyname made you disappointed. For the background
of the change, please find the dicussion in poppler mailing list
and freetype-devel mailing list:

http://lists.freedesktop.org/archives/poppler/2010-August/006271.html
http://lists.nongnu.org/archive/html/freetype-devel/2010-08/msg00020.html

It was for a Traditional Chinese font bundled to Microsoft Windows.

--

In the participants of the discussion, enabling hints for nameless
font objects in PDF was agreed to be the simplest solution.
However,  I expected the comments like "hinted result is worse
for the font XXX, don't enable hinter!" could be posted.
I've ever drafted a way to restrict the hinter to the problematic
fonts without family name.

http://lists.nongnu.org/archive/html/freetype-devel/2010-08/msg00019.html

I can replace the current solution ("nameless font is hinted") by
this one. Werner, what do you think about?

suzuki toshiya <mpsuzuki>
Group administrator
Mon 15 Nov 2010 01:00:11 AM UTC, comment #2: 

It's not a regression per se.  This rendering difference is probably caused by git commit 0eb9b1f5:

  Force hinting when the font lacks its familyname.

For testing purposes, I've extracted font RWNLNK+TimesNewRomanPSMT from the sample PDF file.  Note that it displays fine if you use non-AA rendering.  However, this subfont lacks a `gasp' table – the original fonts (as distributed by Windows) do have one.  Basically, I consider this a bug in the PDF creator program: Without this table, the PDF viewer has no chance to decide whether to use the hints or not.

I don't know how to proceed.  Comments, please.

Werner LEMBERG <wl>
Group administrator
Sat 13 Nov 2010 07:57:24 PM UTC, comment #1: 
Pacho Ramos <pacho>
Sat 13 Nov 2010 07:54:23 PM UTC, original submission:  

Originally reported downstream at:
http://bugs.gentoo.org/show_bug.cgi?id=342515


This is a regression introduced in 2.4.3, downgrading to
2.4.2 solves it.

When I open a pdf using evince or acroread, fonts are shown like "sharpened",
attached screenshots show the issue (if you open them with eog, please disable
"Smooth" when zooming in preferences to prevent it from "hiding" the problem).


Pacho Ramos <pacho>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #22079:  mps20101123a.diff added by mpsuzuki (5KiB - text/x-patch)
file #22007:  freetype-2.4.3.png added by pacho (146KiB - image/png - Screenshots showing the problem and pdf file to test)
file #22006:  freetype-2.4.2.png added by pacho (168KiB - image/png - Screenshots showing the problem and pdf file to test)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mpsuzuki (Posted a comment)
  • -email is unavailable- added by wl (Please comment!)
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by pacho (Submitted the item)
  • -email is unavailable- added by pacho
  • -email is unavailable- added by pacho
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-11-22 mpsuzuki Open/ClosedOpen Closed
    2010-11-22 mpsuzuki StatusReady For Test Fixed
    2010-11-22 mpsuzuki Attached File- Added mps20101123a.diff, #22079
        StatusNeed Info Ready For Test
        Planned ReleaseNone 2.4.4
    2010-11-16 mpsuzuki Assigned towl mpsuzuki
    2010-11-15 wl Carbon-Copy- Added -email is unavailable-
    2010-11-15 wl StatusNone Need Info
        Assigned toNone wl
    2010-11-13 pacho Attached File- Added freetype-2.4.2.png, #22006
        Attached File- Added freetype-2.4.3.png, #22007
        Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code