We use PhantomJS to auto generate images of user generated content. All was fine, until we entered the Asian markets.
It was not the usual black squares issue that you can get with Phantom, it just had spaces where the Korean characters should have been.
The font itself was loading fine, as Latin characters were in the correct type face.
After following lots of posts about installing font support packs on linux, and non of them working, I finally got it running on
sudo yum groupinstall "Korean Support" "Chinese Support" "Japanese Support"
Then we had to get this up an running on AWS on their standard Linux AMI.
As well as not supporting any Asian characters out the box, it doesn't have them in any of its Amazon repositories, so no amount of
yum was going to help!
However, we did manage to register the
centos repository for yum on the box, so we could install packs from that. Add this to you beanstalk configuration and it will create the centos repo file, and then install the packs.
files: /etc/yum.repos.d/centos.repo: mode: "000755" owner: root group: root content: | [centos] name=CentOS $releasever - $basearch baseurl=http://ftp.heanet.ie/pub/centos/6/os/$basearch/ enabled=1 gpgcheck=0 container_commands: 01_install_font_dependencies_for_phantomjs: command: sudo yum -y --skip-broken groupinstall "Korean Support" "Chinese Support" "Japanese Support"
If you do this, i would run the command without --skip-broken and check the dependency conflicts / warnings to check it won't affect your app.