-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
Don’t hang with NotoColorEmoji SVG #1935
Comments
Hi, The size of the Google Emoji fonts are 56MB and 23MB and that is causing this issue. If I remove these two fonts, the system is able to convert HTML To PDF but color emojis are not displayed. It's printing black & white emojis. Any suggestions on how can we print color emojis in PDF? |
It’s a known problem. A quick fix is just to use the version proposed by your distribution: If it’s OK for you, we can close this issue. |
(Using this font system-wide actually breaks many applications, so WeasyPrint is not the only one having trouble with this terrible file that includes a stupidly large amount of SVG images…) |
Actually, there may be a way to fix this. Let’s keep this issue open. |
OK, that’s fixed. Here’s the truth: this font is awful. It uses a 14MB SVG (!!!) and lets users automatically parse, change and render it differently for each glyph. It should be possible to do something smart to avoid reparsing this SVG each time a new glyph is found, but I’m not sure that we want to spend some time on this. On my computer, when using this font, even browsers lag when they first try to display an emoji. So, that’s slow, but it doesn’t crash and renders quite well (when SVG is not too complicated). If someone reads this thread: just use the raster version of NotoColorEmoji, it’s packaged with your Linux distribution. |
Yes, that worked for me. I have removed Google Noto fonts and have installed them using and that worked :) Thanks 👍 |
Version 60.1 ------------ Released on 2023-09-29. Bug fixes: * `#1973 <https://github.com/Kozea/WeasyPrint/issues/1973>`_: Fix crash caused by wrong UTF-8 indices Version 60.0 ------------ Released on 2023-09-25. New features: * `#1903 <https://github.com/Kozea/WeasyPrint/issues/1903>`_: Print form fields * `#1922 <https://github.com/Kozea/WeasyPrint/pull/1922>`_: Add support for textLength and lengthAdjust in SVG text elements * `#1965 <https://github.com/Kozea/WeasyPrint/issues/1965>`_: Handle <wbr> tag * `#1970 <https://github.com/Kozea/WeasyPrint/pull/1970>`_: Handle y offset of glyphs * `#1909 <https://github.com/Kozea/WeasyPrint/issues/1909>`_: Add a --timeout option Bug fixes: * `#1887 <https://github.com/Kozea/WeasyPrint/pull/1887>`_: Fix footnote-call displayed incorrectly for some fonts * `#1890 <https://github.com/Kozea/WeasyPrint/pull/1890>`_: Fix page-margin boxes layout algorithm * `#1908 <https://github.com/Kozea/WeasyPrint/pull/1908>`_: Fix IndexError when rendering PDF version 1.4 * `#1906 <https://github.com/Kozea/WeasyPrint/issues/1906>`_: Apply text transformations to first-letter pseudo elements * `#1915 <https://github.com/Kozea/WeasyPrint/pull/1915>`_: Avoid footnote appearing before its call * `#1934 <https://github.com/Kozea/WeasyPrint/pull/1934>`_: Fix balance before "column-span: all" * `#1935 <https://github.com/Kozea/WeasyPrint/issues/1935>`_: Only draw required glyph with OpenType-SVG fonts * `#1595 <https://github.com/Kozea/WeasyPrint/issues/1595>`_: Don’t draw clipPath when defined after reference * `#1895 <https://github.com/Kozea/WeasyPrint/pull/1895>`_: Don’t ignore min-width when computing cell size * `#1899 <https://github.com/Kozea/WeasyPrint/pull/1899>`_: Fix named pages inheritance * `#1936 <https://github.com/Kozea/WeasyPrint/pull/1936>`_: Avoid page breaks caused by children of overflow hidden boxes * `#1943 <https://github.com/Kozea/WeasyPrint/issues/1943>`_: Use bleed area for page’s painting area * `#1946 <https://github.com/Kozea/WeasyPrint/issues/1946>`_: Use margin box of children to define available width for leaders
Hi,
I am using the latest version of Weasyprint and using it in docker.
Also, I have installed all the Google fonts into my docker.
Here is my docker file config to install Weasyprint and Google fonts.
Here is the Weasyprint version & config
Here is my HTML content.
When I am trying to convert this HTML file to PDF using Weasyprint, the entire process hangs and I need to restart the server in order to recover it.
Command
weasyprint --verbose emoji.html out.pdf
Output
It is not creating PDF after step 6.
I tried removing the google fonts from the docker and It is working fine but not printing Emojis.
Please help.
The text was updated successfully, but these errors were encountered: