Skip to content

Encoding issue with Pango on Ubuntu (14.04 and 16.04) #757

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

Closed
adrienbaron opened this issue Apr 26, 2016 · 1 comment
Closed

Encoding issue with Pango on Ubuntu (14.04 and 16.04) #757

adrienbaron opened this issue Apr 26, 2016 · 1 comment

Comments

@adrienbaron
Copy link

adrienbaron commented Apr 26, 2016

Hi,

I'm encountering an issue with character encoding on Ubuntu, both on 14.04 with pango 1.36.3 and on 16.04 with pango 1.38.1.
When generating an image with chinese characters for example I get this:

Signature test

My development machine is a Mac, on the latest OS X, with the following version of pango:
pango-view (pango) 1.38.1

I generate some JPEG using Google Roboto font, I load the font from a ttf file like this:
var font = new Canvas.Font('Roboto', __dirname + '/fonts-roboto/Roboto-Regular.ttf'); font.addFace(__dirname + '/fonts-roboto/Roboto-Regular.ttf', 'normal');

Everything works perfectly on the Mac, I get the font and all the character encoding works (chinese for example), but on Ubuntu the encoding is broken for Chinese (and other non latin) characters.

Any idea what could be wrong?

@adrienbaron
Copy link
Author

Found the solution!
#266

Simply install all these font package on Ubuntu:
sudo apt-get install fonts-arphic-uming fonts-ipafont-mincho ttf-wqy-zenhei ttf-unfonts-core fonts-takao fonts-dejavu ttf-mscorefonts-installer

Works like a charm 👍

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

1 participant