CSS font-family not being respected, only default system font working

I’ve been trying to get the HTML Cloud conversion working with my local HTML file and every run of the converter yields the exact same default system font, no matter how many different ways I try to set the fonts through CSS. I’m not using any custom fonts, purely web-friendy ones.

Interestingly enough, I’m seeing the exact same behavior with the online converter tool as well: HTML to PDF Converter - free online app | Convert HTML from anywhere

Please advise.

@jclement
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): HTMLCLOUD-2163

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Any status update on this investigation? Can you reproduce the results?

@jclement

We have investigated the issue and want to update that it is not a bug. Please note that commercial fonts require a license, so they can’t be used out of the box. However, if you want to use some custom fonts in the conversion, then as an option, you can upload the fonts to your own server (for example to AWS S3) and link the font in CSS, as in the example:

@font-face {
font-family: myTahoma;
src: url(https://clientserver.com/tahoma.woff);
}

div {
font-family: myFirstFont;
}

Similarly, any font from CDN can be used. For example, all Google web fonts that are free to use.

Ah, thank you! I managed to get it working with Google web fonts using this approach. I don’t believe I was able to find anything about this in the Aspose.HTML Cloud documentation at HTML Converter - Convert HTML with Cloud SDKs and REST API | Documentation.

I highly recommend you add these instructions in because it’s been a roadblock for me and my team for over a week now simply because we couldn’t find anything about it in the docs.

1 Like

@jclement

Thanks for your feedback. Sure, we will include the information in the documentation as well.