title: How can I use Chinese in Alpine headless chrome?
body: <p>I am using headless chrome based on alpine:3.7 image under <a href="https://github.com/einverne/dockerfile/blob/master/headless-chrome/alpine/Dockerfile" rel="noreferrer">docker</a>. However, when I take a screenshot using Chrome DevTools Protocol, I found alpine cannot show languages other than English like the screenshot below.</p>
  
  <p>I have tried to copy font to docker image</p>
  
  <pre><code>COPY NotoSansCJKsc-Regular.otf /usr/share/fonts/
  </code></pre>
  
  <p>and tried to install font in alpine source:</p>
  
  <pre><code>RUN apk add --no-cache bash \
  ttf-ubuntu-font-family \
  font-adobe-100dpi \
  font-noto \
  ttf-dejavu \
  </code></pre>
  
  <p>But all methods failed. So my question is is Alpine support Chinese? And How can I use it using Docker?</p>
  
  <p>python code to take the screenshot:</p>
  
  <pre class="lang-python prettyprint-override"><code>import threading
  
  import pychrome
  import time
  import base64
  
  
  class EventHandler(object):
      screen_lock = threading.Lock()
  
      def __init__(self, browser, tab):
          self.browser = browser
          self.tab = tab
          self.start_frame = None
          self.html_content = None
          self.is_first_request = True
  
      def frame_start_loading(self, frameId):
          if not self.start_frame:
              self.start_frame = frameId
  
      def request_intercepted(self, interceptionId, request, **kwargs):
          if self.is_first_request:
              self.is_first_request = False
              headers = request.get('headers', {})
              self.tab.Network.continueInterceptedRequest(
                  interceptionId=interceptionId,
                  headers=headers,
                  method='POST',
                  postData="hello post data: %s" % time.time()
              )
          else:
              self.tab.Network.continueInterceptedRequest(
                  interceptionId=interceptionId
              )
  
      def frame_stop_loading(self, frameId):
          if self.start_frame == frameId:
              self.tab.Page.stopLoading()
              result = self.tab.Runtime.evaluate(expression="document.documentElement.outerHTML")
              self.html_content = result.get('result', {}).get('value', "")
              print self.html_content
              self.tab.stop()
  
  
  def close_all_tabs(browser):
      if len(browser.list_tab()) == 0:
          return
      for tab in browser.list_tab():
          try:
              tab.stop()
          except pychrome.RuntimeException:
              pass
  
          browser.close_tab(tab)
      assert len(browser.list_tab()) == 0
  
  if __name__ == '__main__':
      # create a browser instance
      browser = pychrome.Browser(url="http://127.0.0.1:9222")
  
      print browser.version()
  
      # create a tab
      tab = browser.new_tab()
  
      # register callback
      def request_will_be_sent(**kwargs):
          print("[start] start loading: %s" % kwargs.get('request').get('url'))
  
      tab.set_listener("Network.requestWillBeSent", request_will_be_sent)
  
      def received_callback(**kwargs):
          print "[received] response type %s" % kwargs.get('type', '')
          resp = kwargs.get('response', {})
          resp_status = resp.get('status', '')
          resp_headers = resp.get('headersText')
          print "response status %s %s" % (resp_status, resp_headers)
  
      tab.set_listener("Network.responseReceived", received_callback)
  
      def frame_stop_loading():
          print "frame stop loading"
  
      tab.set_listener("Page.frameStoppedLoading", frame_stop_loading)
  
      def loading_finished(**kwargs):
          print "[loading finished]"
  
      # when HTTP request has finished loading
      tab.set_listener("Network.loadingFinished", loading_finished)
  
      # start the tab
      tab.start()
  
      net = tab.call_method("Network.enable")
      navi = tab.call_method("Page.navigate", url="https://www.douban.com", _timeout=5)
      tab.wait(5)
  
      screen_data = tab.call_method("Page.captureScreenshot")
      image_data = screen_data.get('data', '')
  
      with open("image.png", "wb") as file:
          file.write(image_data.decode('base64'))
  
      html = tab.Runtime.evaluate(expression="document.documentElement.outerHTML")
      print html['result']['value']
  
      all_cookies = tab.Network.getAllCookies()
      print all_cookies
  
      tab.stop()
  
      browser.close_tab(tab)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/wkxUk.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wkxUk.png" alt="error chinese page"></a></p>