qvfb中不能显示中文

来源:互联网 发布:ghost软件哪个好 编辑:程序博客网 时间:2024/03/28 21:42

在ubuntu10.04中安装了qt-4.8.0  编译了 加了参数

编译x86
./configure -prefix /usr/local/qt-x86_32 -opensource -confirm-license -release -embedded x86  -no-qt3support -fast -no-largefile  -make tools -nomake demos -nomake examples -make docs   -qvfb

在终端启动qvfb -width 800 -height 480 &

./demo -qws 

不能显示中文。。

strace ./demo -qws

发现找安装路径下字体 

stat64("/usr/local/qt-x86_32/lib/fonts/DejaVuSans.ttf", {st_mode=S_IFREG|0644, st_size=493564, ...}) = 0

这个字体好像不能显示中文

于是从 xp中拷贝simhei.ttf 到 /usr/local/qt-x86_32/lib/fonts/ 中,


问题解决。