Weasyprint: Fonts not loading at all

Created on 17 Feb 2014  路  8Comments  路  Source: Kozea/WeasyPrint

I have this bug where very randomly the whole text of the pdf loads as squares.
I'm not setting the font family anywhere and was hoping the generator would just take the generic system font.

So, very occasionally, the pdf will print replacing ALL characters by squares as if it didnt find the required font.

Is this a bug of the plugin, or should i be setting manually some kind of font family ?

All 8 comments

Not specifying font-family is fine. The initial value will be used: serif.

Does "randomly" means that the exact same HTML and CSS input, rendered multiple times, give different PDF outputs? In that case I鈥檓 sorry, I don鈥檛 know how to begin to debug this :/

I鈥檝e heard of situations where servers did not have any font installed at all, but this does not seem to be the case here.

screen shot 2014-02-17 at 15 25 54

Random in the sense that sometimes the characters show up fine and sometimes they dont. Sometimes in one computer it works fine while in another we get the result attached above.

Content wise, the present test has the same content on all tries.

Please explain precisely what you mean by "sometimes". Maybe it鈥檚 not actually random. Moving to a different computer is important, they may not have the same fonts installed.

So, is there one computer where you get the correct result every time, and one where you get squares every time? If so, what鈥檚 different between these computers?

Well currently the error doesn't seem that random. I have the page opened on 3 diff computers and im getting the squares in all of them ( mac and pc ). I'm testing on multiple machines now and just realized the current generated pdf is showing squares on all.

Previously the error was happening on some machines while working fine on others, but i dont think there was anything particularly different between them.

Thanks for your patience and help!

I think we found the issue.
It wasn't related to any particular computer but more to the server where the pdf was being created. It seems there were no fonts available ( or something like that ) on the server. Backend managed then to install some fonts on the server and the issue seems to have been fixed for now.

Thanks!

Of course it鈥檚 the server! The fact that you鈥檙e talking about a server means you have a web or otherwise networked application. This is essential information that you should have provided in your very first message!

All that matters is the environment where WeasyPrint itself runs. Switching to another client for the same web app on the same server is irrelevant!

Please learn to provide relevant information about your environment when asking for help, and try not to waste the time of people who will provide help for free.

Wow, nice way of being a jackass idiot.

Maybe i didnt mention the server issue because i had no idea that it was related to that. I'm not a back end developer and i was looking at the problem from a front end point of view.

Thanks for nothing then.

Unsubscribed now.

Cheers.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

assuntaw picture assuntaw  路  3Comments

thejasechen picture thejasechen  路  3Comments

muzzamilkhan picture muzzamilkhan  路  3Comments

elyak123 picture elyak123  路  3Comments

grewn0uille picture grewn0uille  路  4Comments