garris/BackstopJS

Add CJK (Chinese, Japanese, Korean) language support to the docker image

Closed this issue · 5 comments

Feature request: It would be great if the chrome browser supplied with the Docker image supported the Japanese and other Asian languages.

I'm trying to test a Japanese language site with this and none of the text is rendered:

test2

I don't know what needs to be done to get Japanese support working, but I do know I use the Selenium headless chrome image and that displays Japanese properly:
https://hub.docker.com/r/selenium/standalone-chrome-debug/

I also just ran into this. Big +1 from me. Our biggest projects are all multilingual right now and we can't test these characters.

The StandaloneChrome Docker image at one point has this in it's inheritance:

https://github.com/SeleniumHQ/docker-selenium/blob/cab7e4b0a2357ae36902ff47bcd827ed96f95c32/NodeBase/Dockerfile#L59-L71

RUN apt-get -qqy update \
  && apt-get -qqy --no-install-recommends install \
    libfontconfig \
    libfreetype6 \
    xfonts-cyrillic \
    xfonts-scalable \
    fonts-liberation \
    fonts-ipafont-gothic \
    fonts-wqy-zenhei \
    fonts-tlwg-loma-otf \
    ttf-ubuntu-font-family \
  && rm -rf /var/lib/apt/lists/* \
  && apt-get -qyy clean

I have to wonder if that is what installs the library.

I bashed into the running container and installed all libraries listed above except for fonts-tlwg-loma-otf and ttf-ubuntu-font-family because they were not available in an existing apt list.

I can confirm that this allowed the Japanese language to render as expected.

@ptmkenny if you extend the Dockerfile to include that RUN command (minus the above mentioned font packages) you should be good to go.

@lpeabody -- great work! Thanks for the insight. If someone can PR the docker file change I would be happy to pull that in!

@garris PR opened.