Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

CSS @font-face not loading with TTF font #1600

Open
bpbhat77 opened this issue Mar 26, 2014 · 7 comments
Open

CSS @font-face not loading with TTF font #1600

bpbhat77 opened this issue Mar 26, 2014 · 7 comments
Labels
Verified The issue is verified.

Comments

@bpbhat77
Copy link

I am using wkhtmltopdf to convert a Hindi(kruti) font html document to pdf .But the Hindi font is not rendering in the generated PDF.
HTML if i open in chrome its showing correct.
version :0.12
OS: winxp

@ashkulz
Copy link
Member

ashkulz commented Mar 26, 2014

can you post sample HTML/CSS to reproduce the issue?

@bpbhat77
Copy link
Author

html :

html dir="ltr">
head>
title>Preview</title>
link type="text/css" rel="stylesheet" href="contents.css">
link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Aclonica">
link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Allan">
/head>
body class="cke_editable cke_editable_themed cke_contents_ltr cke_show_borders">
p>span style="font-family:krutibold">Initial value.


/body>
/html>
CSS:
@font-face {
font-family: 'krutibold';
src: url(krutibold.ttf) format('truetype');
}

And krutibold.ttf is in same folder
If i open my html in browser its showing in hindi but in PDF its not

@ashkulz
Copy link
Member

ashkulz commented Mar 26, 2014

Are you viewing this from a web server or from filesystem? Also, please upload the file somewhere so that I can verify it..

@bpbhat77
Copy link
Author

I have attached files here .I have attached font(ttf) file also. I checked in both server and file-system same issue

@Sanbornh
Copy link

Did this get resolved? I'm having a similar issue with wkhtmltoimage. I've mocked something up quickly and I'm running it locally. I've linked to a google font that I want preserved in the image but when I run wkhtmltoimage it reverts to the default sans-serif font instead of using the font specified. If you have any insight into this, it would be great.

@ashkulz
Copy link
Member

ashkulz commented May 13, 2014

Sorry, I haven't been able to investigate this issue yet.

@ashkulz ashkulz changed the title Font issue with kruti font CSS @font-face not loading with TTF font Jul 8, 2014
@ashkulz ashkulz added Verified and removed NeedInfo labels Jul 8, 2014
@ashkulz
Copy link
Member

ashkulz commented Jan 9, 2015

Can you verify if the output is better with 0.13-alpha available from the downloads page?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Verified The issue is verified.
Development

No branches or pull requests

3 participants