-
-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WOFF font not included in PDF #1237
Comments
Hi @schettino72! WOFF is not FreeType, and so it’s currently not supported. |
Thanks for quick answer: Documentation links to this Wikipedia page: https://en.wikipedia.org/wiki/FreeType#File_formats
Anyway even if not supported I guess it should display an error message, and maybe use a fallback font instead of generating gibberish PDF output. |
As far as I can remember, WOFF (and now WOFF2) fonts are supported by FreeType, but for some reason they’re not included in the PDF, probably because of Cairo. It’s sad because FreeType doesn’t complain, Cairo doesn’t complain, and everything works as if the font could be embedded. At least when the format is not supported we have a warning and we can get another fallback format if possible… This will be solved when Cairo is replaced by another library (you can follow #1232 for more news about this topic). |
It is. Woff support is quite slow but works very well. We have to fix this issue in master too before the next version (with Cairo). |
WOFF and WOFF2 support has been disabled for the next release (52), with a clean fallback to other formats if possible. Documentation has been fixed too. Unless someone finds a better solution, we’ll have to wait for version 53 (without Cairo) to have WOFF fonts supported by WeasyPrint. |
If I follow the example below but use a WOFF font.
font-face
is parsed correctly but the actual font file is NOT included in the PDF,resulting in output with "missing unicode characters" blocks...
Documentation claims any FreeType font format should be supported.
The text was updated successfully, but these errors were encountered: