Library html-pdf gives font as italic style

327 Views Asked by At

I use html-pdf to convert my html to pdf. But when I include my font as

    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap" rel="stylesheet">

And write in css:

html {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
}

It renders my font as italic. But in HTML it is normal font. How to solve it? I tried font-face, it did not work

0

There are 0 best solutions below