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

Font rendering issue #14450

Closed
perhanid opened this issue Aug 4, 2016 · 8 comments
Closed

Font rendering issue #14450

perhanid opened this issue Aug 4, 2016 · 8 comments
Labels

Comments

@perhanid
Copy link

@perhanid perhanid commented Aug 4, 2016

  1. Which version of PhantomJS are you using?
    2.1.1
  2. Which operating system are you using?
    Windows Server 2012R2
  3. Did you use binary PhantomJS or did you compile it from source?
    binary
  4. Please provide any additional information below.
    Font rendering isn't working properly. It shows different results on browsers and phantomjs. We tried turning off ClearType and it was still different. Ideally we would like to produce the same results as chrome. Is it possible to configure the font antialiasing mechanism that phantomjs is using?

image

HTML
html.txt [in text form]

phantomjs code
phantomjs.txt [in text form]

command
phantomjs C:\Users\user\Desktop\phantomjs.js

@vitallium

This comment has been minimized.

Copy link
Collaborator

@vitallium vitallium commented Aug 4, 2016

PhantomJS relies on Qt font antialiasing. I suspect this is not possible to get font rendering same as in Google Chrome.

@annulen

This comment has been minimized.

Copy link

@annulen annulen commented Aug 4, 2016

Chrome uses DirectWrite on Windows (since 52 it's the only option, previously GDI could also be used). Qt can use it as one of font engines, if it is not disabled when Qt is compiled. If Qt actually uses DirectWrite and results are still different, it should be possible to eleminate difference by adjusting DirectWrite settings (change in Qt API wuld be required in worst case).

So it's probably feasible, but requires some groundwork

@annulen

This comment has been minimized.

Copy link

@annulen annulen commented Aug 4, 2016

However, if you are looking for pixel perfect equality in generic case, it's not possible. There always will be subtle-almost-invisible differences in canvas rendering, gradients and shadows (or not so subtle in case of bugs :)

@perhanid

This comment has been minimized.

Copy link
Author

@perhanid perhanid commented Aug 4, 2016

ok, thank you very much :)
I'll look further into it.

@perhanid

This comment has been minimized.

Copy link
Author

@perhanid perhanid commented Aug 5, 2016

Could you point us where these options are located and where/how to change them? Or is there any guide available for that?

@annulen

This comment has been minimized.

Copy link

@annulen annulen commented Aug 5, 2016

PhantomJS 2.1.1 is using Qt 5.5 which does not activate DirectWrite support in default build configuration. It will be fixed in the next version as a consequence of Qt update.

@perhanid

This comment has been minimized.

Copy link
Author

@perhanid perhanid commented Aug 8, 2016

After some testing, I found out that on fonts of 14px and above, fonts are rendering almost perfectly, and below 13 the difference is too great.
Is there a way to know when the next update will come out? Hopefully this will be fixed by then.

Thank you for your time and help :)

@stale stale bot added the stale label Dec 26, 2019
@stale

This comment has been minimized.

Copy link

@stale stale bot commented Dec 29, 2019

Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!

@stale stale bot closed this Dec 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.