[{"id":"840f0737-df1d-47ae-bb0a-359b01fe0608","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"d5d9cdef-8854-4505-89be-a2bbc3cb4482","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"3dc3dd55-35b0-4d23-bf62-47bc3650e4ee","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"80d84fbc-d0f8-4e4a-947f-e3e4de9b49b2","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"9152b7ca-0186-4fe3-a26f-5a05f322db07","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]}]
在Linux系统上安装的产品,报表查看或打印预览页面中的汉字可能显示为小方块。
原因应是系统缺少相应的中文字体。
安装中文字体的方法:
从网上下载或者直接拷贝Windows系统中C:\Windows\Fonts文件夹下的字体文件,安装到Linux系统中。安装脚本形如:
#!/bin/sh
sudo cp -r ./Yahei /usr/share/fonts/
sudo fc-cache -fv
其中,/Yahei 是自行创建的包含字体文件的文件夹。
文件夹中的字体文件,如果是从Windows\fonts目录下拷贝,应是以下三个文件:
msyh.ttc
msyhbd.ttc
msyhl.ttc
拷贝字体文件之后,重启产品服务:
在RHEL7,CentOS7,Ubuntu16.04,Ubuntu17.10,Ubuntu18.04等操作系统中,执行以下命令重启Wyn服务:
sudo systemctl stop wyn
sudo systemctl start wyn
在Ubuntu14.04,RHEL6,CentOS6等操作系统中,执行以下命令检查系统状态、启动、停止服务:
sudo service wyn stop
sudo service wyn start
之后,再预览或打印报表,即可看到正常的中文汉字。