Weasyprint does not support multiple language like chinese, korean, thai while deploy into Heroku.
Hey guys, you have done a fantastic job. While deploy into Heroku, fonts are not applied for chinese, korean and thai. I have included fonts using @font-face in my external css. Ex: @font-face { font-family: "Source Han Sans SC"; src: local("Source Han Sans SC"), url("static/fonts/SourceHanSansSC-Regular.otf");
}
But if i included the same @font-face inside my style tag. The fonts are applied well. Ex:
Initially, I thought it was a path issue. However, even after multiple attempts to resolve it, the fonts are still not applied. I now believe it is not a path issue.
This is my project folder structure: project/ ├─ app.py ├─ static/ │ ├─ css/report.css │ └─ fonts/SourceHanSansSC-Regular.otf
Hi!
The URLs are relative to your CSS file, so you have to use ../fonts instead of static/fonts.
Hi!
The URLs are relative to your CSS file, so you have to use
../fontsinstead ofstatic/fonts.
I tried that as well, but it’s still not working. That’s why I opened the issue log.
I tried that as well, but it’s still not working. That’s why I opened the issue log.
Could you please explain how you launch WeasyPrint and how you link your CSS to your HTML file?
@hema-ramasamy-softsquare Is there anything more we can do for you?