Issues with fonts when trying to convert html to image using imgkit and wkhtmltoimage
Trying to convert the HTML content into image using ImgKit and wkhtmltoimage. Image is converted successfully but facing the issues with fonts (Font Awesome).
The image is not look as it as HTML content.
Attaching 2 images one which have HTML content (HTML-CONTENT.png) and other one is converted to image (HTML-Converted-To-IMAGE.png). You can see the difference in fonts between the 2 images.


Could you please anyone suggest me on this, how can I achieve exact html conversion into image.
Thanks for the help in advance.
You're definitely right that wkhtmltoimage doesn't seem to be picking up your fonts. To troubleshoot I'd recommend you try using wkhtmtoimage outside of IMGKit with a small html file that just imports your fonts.
Here's a stack overflow article on getting fonts working with wkhtmltopdf: http://stackoverflow.com/questions/10611828/use-custom-fonts-with-wkhtmltopdf
You can download the required ttf file and use it in your css, This will work, Anyway sorry for the late support! :-)
@Magesh-B If you have any example can you please share it. I have html file in which I had included custom fonts from assets, while I am trying to convert html file to image I am facing issue for fonts.
@csquared , Hey there, Your lib is absolutely fantastic made my work so easy except one stage. I am not able to get the set font family in the final image result. If you could help me out it would be really great help to me.