Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it doesn't support other language. #46

Closed
LiQingMuBai opened this issue Oct 31, 2016 · 1 comment
Closed

it doesn't support other language. #46

LiQingMuBai opened this issue Oct 31, 2016 · 1 comment

Comments

@LiQingMuBai
Copy link

this is my html.
`

WHITE 白い(default)

`

but when i run TestcaseRunner, the pdf display
WHITE ##(default)

@danfickle
Copy link
Owner

Hi @ibyoung - Outside of Western European languages you need to provide a font for PDFs. Fortunately, Google has organised noto fonts for most scripts. Unfortunately, they are only in otf format which this project does not support. So I searched the web, and found someone had nicely converted the cjk preview of noto to ttf which this project does support.

Long story short, you can download cjk fonts from noto-sans-cjk and use them like so:

<html>
<head>
<style>
@font-face {
    font-family: 'cjk';
    src: url(NotoSansCJKtc-Regular.ttf);
}
</style>
</head>
<body>
<p style="font-family: 'cjk';font-size: 40px;">WHITE 白い(default)</p>
</body>
</html>

and you will get this:
cjk-screenshot

@song7619072
Copy link

song7619072 commented Dec 22, 2016

Can you paste the java code?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants