fdemmer / django-weasyprint

A Django class-based view generating PDF resposes using WeasyPrint
Other
352 stars 53 forks source link

Add font_config to handle @font-config rules #27

Closed JaakkoRoponen closed 5 years ago

JaakkoRoponen commented 5 years ago

An additional argument called font_config must be provided to handle @font-config rules. The same fonts.FontConfiguration object must be used for different CSS objects applied to the same document.

https://weasyprint.readthedocs.io/en/latest/api.html#weasyprint.CSS

fdemmer commented 5 years ago

The documentation you quoted explicitly says:

The same fonts.FontConfiguration object must be used for different CSS objects applied to the same document.

but your patch created a new one for each stylesheet and your remote branch seems to be gone, so I cannot adapt/merge this.

Added via 6f5d9b7610b79d156050e309dbfd113e027a9604.