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

Issue rendering Font Awesome 5 in Chrome #1881

Closed
2 tasks done
LillaLillian opened this issue Jun 11, 2019 · 8 comments · Fixed by #2202 or #2219
Closed
2 tasks done

Issue rendering Font Awesome 5 in Chrome #1881

LillaLillian opened this issue Jun 11, 2019 · 8 comments · Fixed by #2202 or #2219

Comments

@LillaLillian
Copy link

Please make sure you are testing with the latest release of html2canvas.
Old versions are not supported and issues reported for them will be closed.

Please follow the general troubleshooting steps first:

  • You are using the latest version
  • You are testing using the non-minified version of html2canvas and checked any potential issues reported in the console

Bug reports:

I have an issue with rendering of font awesome 5 icons, they will only show up as squares. I'm using Google Chrome and Font Awesome 5 Pro.
2019-06-11 14_59_28-Performance Report Post TG 2
2019-06-11 14_59_41-Performance Report Post TG 2

Specifications:

  • html2canvas version tested with: 1.0.0-rc.3
  • Browser & version: Google Chrome 75.0.3770.80
  • Operating system: Windows 10
@ngspinu
Copy link

ngspinu commented Jul 2, 2019

Same issue here. Any updates on this one? Thank you

@queejie
Copy link

queejie commented Jul 15, 2019

Same issue.

@dheerajkumarmadaan
Copy link

Exactly the same issue. Any updates so far? Thanks.

@grahamkane
Copy link
Contributor

I did some digging around and think this is down to the number within the CSS font family value (e.g. "Font Awesome 5 Free"). This causes an issue in the canvas renderer, since it uses the short-hand CSS syntax for setting the canvas context font.

Wrapping the font names in quotes fixed the issue for me. Submitted a PR for it.

@ghafooridev
Copy link

hey, I have the same issue, I tried many solutions that exist in Github reported the issue but it still the same. any practical solution?

@hedi-edelbloute
Copy link

@ghafooridev use this PR (thank you @grahamkane)

@aaroncrawford
Copy link

For those having issues with this, also try to remove the spaces from your all.min.css file in Font awesome. Your classnames should be this, for example FontAwesome5Pro, FontAwesome5Brands, etc.

My class names were in quotes and still not working, but after changing them to be without space my icons started rendering in html2canvas.

@Chandand76
Copy link

same issue for me?
using html2canvas 1.0.0-rc.5 version.

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