question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ligatures do not seem to render

See original GitHub issue

Hi, thanks for this software. Ligatures seemingly don’t render.

System: Windows 10 GTK: gtk3-runtime-3.24.24-2021-01-30-ts-win64.exe Python: Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] Version: WeasyPrint==52.2

HTML used to reproduce the bug:

<!DOCTYPE html>
<html>
    <head>
    <meta charset="utf-8">
    <style>
        h1 {
            font-family: "Calibri";
        }
    </style>
    </head>
    <body>
        <h1>atib</h1>
    </body>
</html>

weasyprint bug.html bug.pdf output as rendered by SumatraPDF v3.2 64-bit (zoomed in):

image

Expected output (as rendered by Windows settings):

image

If I add font-variant-ligatures: none; to the style, the full text renders, but the font is gone (I guess Calibri lacks a variant with no ligatures):

image

(As a side-note, I’m unable to display the generated .pdf on Firefox, “This PDF document might not be displayed correctly.”, nor Acrobat Reader, “There was an error processing a page. There was a problem reading this document (114).”).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Feb 8, 2021

Note: master doesn’t use Cairo anymore

I can confirm that pip install git+https://github.com/Kozea/WeasyPrint.git@2c919858c881d8d34eff7ba253e2c0462cb8da40#egg=WeasyPrint gets rid of both this and the linked issue, thank you again.

0reactions
ghostcommented, Feb 8, 2021

Okay, thank you for the quick resolution! I also posted a different error on that issue a few minutes ago caused by tables, but yeah, makes sense the Cairo version is buggy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do not render ligatures under cursor (optionally?) #461 - GitHub
I'm playing with font ligatures using Fira Code, it is fun to see them rendered and they convey a meaning quite clearly, however...
Read more >
Stored Ligature HTML is not rendering - Stack Overflow
Stored Ligature HTML is not rendering · It looks like the preview inside your IDE is using a different font than your output...
Read more >
Font ligatures not working - Visual Studio Feedback
I've noticed that the first time I install a font with ligatures, if I start Visual Studio 2019 and choose the font, ligatures...
Read more >
FF does not render text correctly | Firefox Support Forum
Firefox doesn't seem to be able to render the "fh" pair in that font. It works if I disable ligatures with this CSS...
Read more >
[vim] Rendering issues with ligatures (#418) - Google Groups
I am using gvim 7.4.865. When using a font with ligatures (such as Pragmata Pro) rendering issues occur in such a way to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found