New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2015
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Built-in PDF viewer renders wrongly

Reported by tsd...@gmail.com, May 5 2014

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.86 Safari/537.36

Steps to reproduce the problem:
1. Visit www.transformation-tool-contest.eu/solutions/fixml/ttc2014_submission_8.pdf
2. The PDF is opened in the built-in PDF viewer
3. Text runs inside each other (see screenshot)

What is the expected behavior?
The PDF is rendered as with any other PDF viewer.  mupdf and evince display the document without text running into other text.

What went wrong?
Text runs into other text.

Did this work before? N/A 

Chrome version: 35.0.1916.86  Channel: beta
OS Version: 
Flash Version: Shockwave Flash 13.0 r0
 
ttc2014_submission_8.pdf
129 KB Download
screenshot.png
358 KB View Download
Labels: Needs-Feedback
Unable to reproduce the issue on Linux and Build: 35.0.1916.86, please review attached screenshot. Can you try in Incognito session or create a new user from chrome://settings and see if this issue is still reproducible
369991.jpeg
327 KB View Download
Labels: Cr-Internals-Plugins-PDF

Comment 4 by tsd...@gmail.com, May 5 2014

I just tried both with an incognito window and a test user account, and the PDF still renders exactly as on my screenshot.  Note that this seems to be very specific to exactly this PDF.  All others I've opened so far displayed correctly.
I can't reproduce this either on 35.x or 36.x.

- What Linux distro are you on?
- Do you have any custom fontconfig settings?
- Do you have either Liberation or MS TrueType fonts installed?

Comment 6 by tsd...@gmail.com, May 6 2014

I'm on Arch Linux with no custom fontconfig settings, and neither Liberation or MS TrueType fonts installed.  Now I've installed Liberation and restarted chrome, and now the PDF displays as intended.

So problem solved.  But shouldn't the PDF render ok even in the absence of some fonts?  At least evince and mupdf were able to render it correctly without Liberation installed.
Not all fonts are embedded in the PDF. The PDF viewer has to choose the font that best matches the requested font.

Can you try Chrome 36 without liberation/mstt and see if it renders better?

Comment 8 by tsd...@gmail.com, May 8 2014

I've tried 36.0.1976.2-1 with liberation fonts deinstalled again, but it renders exactly the same as chrome 35 on the screenshot above.
Labels: -Needs-Feedback
Status: WontFix
Yes, indeed it looks ok without Liberation fonts installed in Evince, but not Chrome. This is because Evince can use Type 1 fonts for font substitution, whereas Chrome cannot. I bet if the Type 1 fonts were not there, the pdf in question would not render right in Evince either.

I don't think we'll ever support Type 1 fonts in the browser, so there's no font substitution magic I can do to make it render right. Your best bet is to have Liberation fonts installed. Your webpages may look better as a result of that too.
I'm also an Arch user and have been having been struggling for this problem for a long time before finding this solution and installing ttf-liberation. I use Chrome for viewing scientific papers, and a large proportion of them trigger this problem (maybe something like 1/3 or 1/4).

So if Chrome *needs* ttf-liberation to display PDFs on Linux, why is that not a package dependency?
I've done a bit of digging and the Arch packages for google-chrome (https://aur.archlinux.org/packages/google-chrome/) and chromium (https://www.archlinux.org/packages/extra/i686/chromium/) both depend on a virtual package called ttf-font. This ttf-font package is provided by many different font packages, one of which is ttf-liberation (https://www.archlinux.org/packages/community/any/ttf-liberation/). Chrome and Chromium will install though if *any* of the packages providing ttf-font is there, and it's a long list (ttf-dejavu, ttf-freefont, ttf-liberation, ttf-bitstream-vera, ttf-linux-libertine, ttf-droid, ttf-ubuntu-font-family, ttf-oxygen). By default it willd just pick the first one: ttf-dejavu.

So how exactly are users supposed to know that it needs to install ttf-liberation manually in order to prevent display artifacts in many PDFs (or to make them go away)? At the moment this is listed as a Troubleshooting issue in the Arch documentation:
https://wiki.archlinux.org/index.php/Chrome#Font_rendering_issues_in_PDF_plugin
but documenting what seems to be a bug is not a very satisfactory solution, I think.

There's no Google Chrome package for Arch, it's just some script to download the Google Chrome .deb/.rpm file and extracting it, right? The Arch Chromium package is not distributed by chromium.org either. So you need to take up these font dependency issues with the Arch Chrome/Chromium packager(s).
Correct, the Google Chrome package for Arch (on AUR) is indeed using internally the binaries in the deb, but Arch has it's own package manager that does dependency tracking that's independent of the deb. The Arch Google Chrome package maintainer has in fact just added ttf-liberation as an optional dependency.

As for the Chromium package, that's not a problem for me, but somebody might want to file a bug in their tracker asking for an optional dependency. There is a link here for filing bugs here: https://www.archlinux.org/packages/extra/i686/chromium/

As for the .deb/.rpm packages, that's even less of my problem. Do these systems even support optional dependencies? Or does Google want to add a real dependency on ttf-liberation?
Cc: phajdan.jr@chromium.org
Owner: thestig@chromium.org
Status: Assigned
I suppose we should consider depending on ttf-liberation for a better user experience.
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 10 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8f7b33b2f79917f2cb2f1df9f926575c070dbae1

commit 8f7b33b2f79917f2cb2f1df9f926575c070dbae1
Author: thestig <thestig@chromium.org>
Date: Mon Aug 10 17:40:32 2015

Linux: Depend on liberation-fonts package.

Without these fonts, text in the built-in PDF viewer may not display correctly.

BUG= 369991 

Review URL: https://codereview.chromium.org/1283543004

Cr-Commit-Position: refs/heads/master@{#342645}

[modify] http://crrev.com/8f7b33b2f79917f2cb2f1df9f926575c070dbae1/chrome/installer/linux/debian/build.sh
[modify] http://crrev.com/8f7b33b2f79917f2cb2f1df9f926575c070dbae1/chrome/installer/linux/rpm/build.sh

Status: Fixed
Project Member

Comment 18 by bugdroid1@chromium.org, Aug 11 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7577de462e5d3d7256f5a86ba8f90aea72193af3

commit 7577de462e5d3d7256f5a86ba8f90aea72193af3
Author: thestig <thestig@chromium.org>
Date: Tue Aug 11 16:38:00 2015

Revert of Linux: Depend on liberation-fonts package. (patchset #1 id:1 of https://codereview.chromium.org/1283543004/ )

Reason for revert:
The liberation-fonts package on Fedora is a lie. See  https://crbug.com/519322 

Original issue's description:
> Linux: Depend on liberation-fonts package.
>
> Without these fonts, text in the built-in PDF viewer may not display correctly.
>
> BUG= 369991 
>
> Committed: https://crrev.com/8f7b33b2f79917f2cb2f1df9f926575c070dbae1
> Cr-Commit-Position: refs/heads/master@{#342645}

TBR=mmoss@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 369991 

Review URL: https://codereview.chromium.org/1286743002

Cr-Commit-Position: refs/heads/master@{#342830}

[modify] http://crrev.com/7577de462e5d3d7256f5a86ba8f90aea72193af3/chrome/installer/linux/debian/build.sh
[modify] http://crrev.com/7577de462e5d3d7256f5a86ba8f90aea72193af3/chrome/installer/linux/rpm/build.sh

Project Member

Comment 19 by bugdroid1@chromium.org, Aug 11 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d98c44a7c597056bcb14b7ff1e73dc5e2589482f

commit d98c44a7c597056bcb14b7ff1e73dc5e2589482f
Author: thestig <thestig@chromium.org>
Date: Tue Aug 11 18:50:09 2015

Linux: Depend on liberation-fonts package. (try 2)

Without these fonts, text in the built-in PDF viewer may not display
correctly.

Unfortunately we can only do this for the .deb packages at the moment.
There's no common liberation-fonts package for RPMs. See
 https://crbug.com/519322 .

BUG= 369991 

Review URL: https://codereview.chromium.org/1274043004

Cr-Commit-Position: refs/heads/master@{#342854}

[modify] http://crrev.com/d98c44a7c597056bcb14b7ff1e73dc5e2589482f/chrome/installer/linux/debian/build.sh
[modify] http://crrev.com/d98c44a7c597056bcb14b7ff1e73dc5e2589482f/chrome/installer/linux/rpm/build.sh

Cc: rponnada@chromium.org tkonch...@chromium.org
 Issue 479414  has been merged into this issue.
Project Member

Comment 21 by bugdroid1@chromium.org, Sep 22 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a6df68559fd91f3bf3273c5e46d1c6a7b2132b8c

commit a6df68559fd91f3bf3273c5e46d1c6a7b2132b8c
Author: thestig <thestig@chromium.org>
Date: Tue Sep 22 03:28:38 2015

Linux: Depend on liberation-fonts package for RPMs.

The previous try in r342645 was reverted because Fedora did not have a
liberation-fonts virtual package. Fedora has since added the missing
virtual pacakge per our request to supported distros - Fedora 21 and
newer.

So now we can fix the mismatch vs .debs, which added this dependency in
r342854.

BUG= 369991 

Review URL: https://codereview.chromium.org/1358903005

Cr-Commit-Position: refs/heads/master@{#350101}

[modify] http://crrev.com/a6df68559fd91f3bf3273c5e46d1c6a7b2132b8c/chrome/installer/linux/rpm/build.sh

Project Member

Comment 22 by bugdroid1@chromium.org, Sep 23 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a6df68559fd91f3bf3273c5e46d1c6a7b2132b8c

commit a6df68559fd91f3bf3273c5e46d1c6a7b2132b8c
Author: thestig <thestig@chromium.org>
Date: Tue Sep 22 03:28:38 2015

Linux: Depend on liberation-fonts package for RPMs.

The previous try in r342645 was reverted because Fedora did not have a
liberation-fonts virtual package. Fedora has since added the missing
virtual pacakge per our request to supported distros - Fedora 21 and
newer.

So now we can fix the mismatch vs .debs, which added this dependency in
r342854.

BUG= 369991 

Review URL: https://codereview.chromium.org/1358903005

Cr-Commit-Position: refs/heads/master@{#350101}

[modify] http://crrev.com/a6df68559fd91f3bf3273c5e46d1c6a7b2132b8c/chrome/installer/linux/rpm/build.sh

Project Member

Comment 23 by bugdroid1@chromium.org, Sep 29 2015

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a103bac9350268c02dea6ab15a54e5eda9e2afb8

commit a103bac9350268c02dea6ab15a54e5eda9e2afb8
Author: thestig <thestig@chromium.org>
Date: Tue Sep 29 05:55:10 2015

Revert of Linux: Depend on liberation-fonts package for RPMs. (patchset #1 id:1 of https://codereview.chromium.org/1358903005/ )

Reason for revert:
Fedora 21 is still broken.

Original issue's description:
> Linux: Depend on liberation-fonts package for RPMs.
>
> The previous try in r342645 was reverted because Fedora did not have a
> liberation-fonts virtual package. Fedora has since added the missing
> virtual pacakge per our request to supported distros - Fedora 21 and
> newer.
>
> So now we can fix the mismatch vs .debs, which added this dependency in
> r342854.
>
> BUG= 369991 
>
> Committed: https://crrev.com/a6df68559fd91f3bf3273c5e46d1c6a7b2132b8c
> Cr-Commit-Position: refs/heads/master@{#350101}

TBR=mmoss@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG= 369991 

Review URL: https://codereview.chromium.org/1380473002

Cr-Commit-Position: refs/heads/master@{#351261}

[modify] http://crrev.com/a103bac9350268c02dea6ab15a54e5eda9e2afb8/chrome/installer/linux/rpm/build.sh

 Issue 830236  has been merged into this issue.

Sign in to add a comment