Giter Club home page Giter Club logo

Comments (4)

kalius avatar kalius commented on July 20, 2024 2

@bjrmatos font has italic support.

But in the meantime I found the solution for that (or workaround). It seems that if I add properties

font-weight: normal;
font-style: normal;

to every font-face declaration and then use font-style:italic in CSS style prop that italic does work.

Here is also one suggestion for solution if others have similar problems: ariya/phantomjs#13561 (comment) but for me it worked for ttf as well.

By using that workaround it works in 1.9 and 2.x.

Thanks for quick response btw!

from phantom-html-to-pdf.

bjrmatos avatar bjrmatos commented on July 20, 2024

hmm just note that in order to have italic support in a font, the font itself needs to have italic support in it, if you have confirmed that your font has support for italic, maybe the font file that you have downloaded is not the full version of the font (with italic support on it). also, you can also use fonts in phantomjs using assets extensions as described here.

from phantom-html-to-pdf.

pofider avatar pofider commented on July 20, 2024

I would recommend to try the phantomjs2, see here. The font support in the default phantomjs included in this package is not very good.

https://github.com/pofider/phantom-html-to-pdf#phantomjs2

from phantom-html-to-pdf.

bjrmatos avatar bjrmatos commented on July 20, 2024

great, thnks for posting your solution!

from phantom-html-to-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.