Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#80131 - [python-weasyprint] segfault when no font installed
Attached to Project:
Arch Linux
Opened by Hector Urbina (ajendrex) - Wednesday, 01 November 2023, 14:01 GMT
Last edited by George Rawlinson (rawlinsong) - Friday, 03 November 2023, 21:09 GMT
Opened by Hector Urbina (ajendrex) - Wednesday, 01 November 2023, 14:01 GMT
Last edited by George Rawlinson (rawlinsong) - Friday, 03 November 2023, 21:09 GMT
|
DetailsDescription:
I can't produce any pdf, always get a Segmentation Fault error. If I try with the same html input in Mac Os it works fine. Additional info: * package version(s) weasyprint 60.1-1 fontconfig 2:2.14.2-1 pango 1:1.51.1-1 * config and/or log files etc. Full output is: ``` (process:194): Pango-CRITICAL **: 13:49:19.232: pango_font_describe: assertion 'font != NULL' failed (process:194): Pango-CRITICAL **: 13:49:19.232: pango_font_description_unset_fields: assertion 'desc != NULL' failed (process:194): Pango-CRITICAL **: 13:49:19.232: pango_font_description_hash: assertion 'desc != NULL' failed (process:194): Pango-CRITICAL **: 13:49:19.232: pango_font_get_hb_font: assertion 'PANGO_IS_FONT (font)' failed Segmentation fault ``` * link to upstream bug report, if any # TODO Steps to reproduce: 1. In a clean directory, create a file named `Dockerfile` with this content: ``` FROM archlinux/archlinux RUN pacman -Sy --noconfirm python-weasyprint ``` 2. Build with `docker build . -t wbug` 3. Enter a terminal in the created image with `docker run -ti wbug` 4. In the terminal, run `python` 5. In python, run the following: ``` from weasyprint import HTML doc = HTML(string="<html><body><h1>Title</h1></body></html>") doc.write_pdf("output.pdf") ``` Any string that you pass which needs to render text will fail. I also tried this: ``` from weasyprint.text.fonts import FontConfiguration from weasyprint import HTML doc = HTML(string="<html><body><h1>Title</h1></body></html>") doc.write_pdf("output.pdf", font_config=FontConfiguration()) ``` but it keeps failing. |
This task depends upon
Closed by George Rawlinson (rawlinsong)
Friday, 03 November 2023, 21:09 GMT
Reason for closing: Fixed
Additional comments about closing: 60.1-2
Friday, 03 November 2023, 21:09 GMT
Reason for closing: Fixed
Additional comments about closing: 60.1-2
Please respect the guidelines [1].
[1] https://wiki.archlinux.org/title/Bug_reporting_guidelines#Severity
>>> from weasyprint import HTML
/usr/lib/python3.11/site-packages/weasyprint/text/fonts.py:65: UserWarning: No fonts configured in FontConfig. Expect ugly output.
warn('No fonts configured in FontConfig. Expect ugly output.')
Edit: Maybe a simple dep on "ttf-font" would do the trick?
I'm sorry Toolybird! It felt critical to me but didn't really look for guidelines.
> Maybe a simple dep on "ttf-font" would do the trick?
Yep, that did it. Thank you a lot!! I ended up installing gnu-free-fonts because there are several providers for ttf-font.
Should I do something to close this?