Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF.js on Chrome with Win 7 Fails to do Subpixel Anti-Aliasing #5196

Closed
speedplane opened this issue Aug 15, 2014 · 12 comments
Closed

PDF.js on Chrome with Win 7 Fails to do Subpixel Anti-Aliasing #5196

speedplane opened this issue Aug 15, 2014 · 12 comments

Comments

@speedplane
Copy link

Continued from #4252.

Subpixel font rendering does not work in Chrome for the tracemonkey document example. In the image below, pdf.js in Chrome renders the document on top and adobe renders it directly below. Notice that there are tiny artifacts in the pdf.js around the fonts (it's hard to tell because of image compression in the screenshot). This becomes more obvious when you zoom in (see image further down).

Zoomed In (pdf.js on top, adobe reader on bottom):

Notice how the image in adobe reader is not just black and white, but is also red and blue. That's the subpixel antialiasing, which makes documents much easier to read.

@yurydelendik
Copy link
Contributor

Can you also file upstream bug at https://code.google.com/p/chromium/issues ?

@speedplane
Copy link
Author

It looks like this is the issue exists and more than a few are unhappy with it:
https://code.google.com/p/chromium/issues/detail?id=7508

Maybe star the issue to attract some of their attention.

@yurydelendik
Copy link
Contributor

The issue about talks only about drawImage and not related to the text subpixeling

@speedplane
Copy link
Author

It's in there, search for the word fillText.

@agoode
Copy link

agoode commented Aug 18, 2014

According to http://blogs.adobe.com/webplatform/2014/04/01/new-canvas-features/ this is supported, but you have to do canvas.getContext("2d", {alpha: false}); to get an opaque canvas first.

@yurydelendik
Copy link
Contributor

@agoode thanks. It works for me on chrome http://jsbin.com/bolusaceyufo/2 for mac osx.

Hmm, we had patch for this once #4556 , but it was reverted due to black flashing on Chrome. Probably somebody can revive this pr.

@varghesethomase
Copy link

Can i take up this bug? Is there someone i could get as a mentor?

@yurydelendik
Copy link
Contributor

Sure. I can be a mentor. Look at the PR 4556 and look for reason why it was reject.

@varghesethomase
Copy link

Do you mean a solution to the black white flickering in chrome?

@yurydelendik
Copy link
Contributor

Do you mean a solution to the black white flickering in chrome?

Yes. There are time when canvas is added (which is black with alpha:false) and first drawing happens. Possible multiple solutions: a) add canvas when first drawing happens, or b) set background to white (? not sure if possible)

@timvandermeij
Copy link
Contributor

@speedplane Is this still an issue with the latest version of Chrome for you? https://code.google.com/p/chromium/issues/detail?id=7508#c83 indicates that it might work.

@speedplane
Copy link
Author

Yup it works now, feel free to close.

Michael Sander
[email protected]
607-227-9859

On Thu, Apr 30, 2015 at 5:34 PM, Tim van der Meij [email protected]
wrote:

@speedplane https://github.com/speedplane Is this still an issue with
the latest version of Chrome for you?
https://code.google.com/p/chromium/issues/detail?id=7508#c83 indicates
that it might work.


Reply to this email directly or view it on GitHub
#5196 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants