Comments (4)
@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.
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.
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.
great, thnks for posting your solution!
from phantom-html-to-pdf.
Related Issues (20)
- Blurred, overlapping text when generating a PDF HOT 1
- PDF image not shown and format issue HOT 1
- Module not found: Can't resolve 'cluster' in... HOT 1
- Table Header HOT 1
- "file" argument must be a non-empty string HOT 3
- is this repo dead HOT 1
- phantomjs in electron
- occasionally I get "phantom manager could not start all workers" error HOT 4
- error occurs in electron (workerErrors) HOT 1
- Local Language Support
- fix footer
- Background color with gradient isn't working when generating via Mobile
- No support for phantom debug option
- No support for specifying TLS version
- Error: spawn EACCES HOT 5
- Cant render chinese character HOT 2
- How to do the page break in the pdf? HOT 1
- This library doesn't seem to support OnResourceRequested HOT 1
- Custom Headers is not working
- Update lodash version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phantom-html-to-pdf.