5

I am trying to build a snap but Chinese characters are rendered as squares. Does anyone know how to solve this?

chinese characters rendered as squares

Here is my snapcraft.yaml:

name: cloudmusic
version: 1.4.3+snap2
summary: Cloud Music
description:
    Search, listen and download your favorite music
apps:
  cloudmusic:
    command: cloudmusic
    plugs: [unity7,opengl,home,network,network-bind,pulseaudio]

parts:
  cloudmusic:
    plugin: qmake
    qt-version: qt5
    options: [PREFIX=/usr]
    project-files: [CloudMusic.pro]
    source: src/
    build-packages:
      - build-essential
      - gettext
      - intltool
      - suru-icon-theme
      - qml-module-qt-labs-settings
      - qml-module-qtquick-localstorage
      - qml-module-qtgraphicaleffects
      - qtdeclarative5-ubuntu-download-manager0.1
      - qtdeclarative5-qtmultimedia-plugin
      - qtdeclarative5-ubuntu-content1
      - qt5-default
      - qtbase5-dev
      - qtdeclarative5-dev
      - qtdeclarative5-dev-tools
      - qtdeclarative5-ubuntu-ui-toolkit-plugin
      - xvfb
    stage-packages:
      - ubuntu-sdk-libs
      - qtubuntu-desktop
      - qml-module-qtsysteminfo
      - fonts-freefont-ttf
    snap:
      - -usr/share/doc
      - -usr/include
  environment:
    plugin: copy
    files:
      cloudmusic.wrapper: bin/cloudmusic
      snappy-qt5.conf: etc/xdg/qtchooser/snappy-qt5.conf

Pastebin for the snapcraft.yaml above can be found at http://paste.ubuntu.com/19511184/.

5
  • 1
    I hope you get an answer here, but it might be a good idea to also file an official bug report. Snaps are new technology and it's quite possible this is an issue that needs to be addressed by the developers Jul 10, 2016 at 17:36
  • Which package in Ubuntu usually provides Chinese fonts? Maybe it helps to add it to stage-packages?
    – dholbach
    Jul 11, 2016 at 9:13
  • fonts-noto-cjk maybe? (I'm just guessing.)
    – dholbach
    Jul 14, 2016 at 15:42
  • 1
    Do you have a link to your snapcraft.yaml file maybe?
    – dholbach
    Jul 14, 2016 at 15:42
  • i added the link to my snapcraft.yaml
    – johangm90
    Jul 15, 2016 at 16:33

1 Answer 1

4

sudo apt-get install fonts-wqy-zenhei

This provides the required Chinese fonts.

Or you can download from here

And install from the GUI based font installed in Ubuntu.

1
  • Best comment, thanks for the link. Nov 23, 2023 at 2:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .