December 28, 2010

bellnas bellnas
Lab Rat
14 posts

the font in QML is not smooth, in windows

Page  
1

I found font in QML is not smooth in windows, whatever font-type I chosen ,
but in linux/ubuntu, the font is good.

20 replies

December 28, 2010

Kxyu Kxyu
Lab Rat
145 posts

what is your Windows version? XP has troubles with QML and custom fonts

December 28, 2010

qtrahul qtrahul
Lab Rat
188 posts

This may be because QML file is not UTF-8 formated.

You have to convert that file into UTF-8 format.

I found this bugreport while searching deep into the matter.
Chinese font Bugreport [bugreports.qt.nokia.com]

December 28, 2010

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

qtrahul, are you sure that smoothness of fonts can depend on encoding? As for me these two things re totally unrelated.

December 28, 2010

Volker Volker
Robot Herder
5428 posts

If it’s not “smooth” it seems that there are problems with anti aliasing or something like that. Or there are not any “good” chinese fonts installed on the windows box.

If the encoding was wrong, there would be garbage on the screen.

December 28, 2010

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

Volker, yes. Maybe wrong graphicssystem is chosen?

December 29, 2010

bellnas bellnas
Lab Rat
14 posts

winxp and win7 is the same question
font can display correctly in windows and ubuntu,
and the font look better in ubuntu than windows
you can see here
!http://www.flickr.com/photos/42560763@N06/5301788393/()!
upper is in win7 ,and following is in ubuntu, at the same computer,
you can see carefully ,carefully

December 29, 2010

xsacha xsacha
Lab Rat
517 posts

The bottom one looks smoother/nicer on my screen. That is Windows 7?

However, on closer inspection, the only issue with the top one appears to be JPEG artifacting.

 Signature 

- Sacha

December 29, 2010

bellnas bellnas
Lab Rat
14 posts

I was confused , sorry. the upper is in win7 and the following is in ubuntu

December 29, 2010

xsacha xsacha
Lab Rat
517 posts

Do you have Windows ClearType on?

Also, can you take your screenshots as PNG? There is crazy JPEG artifacting in the Windows image which makes it hard to compare.

I think it is all down to the operating systems rendering unfortunately. Qt doesn’t mess with that.

 Signature 

- Sacha

December 29, 2010

bellnas bellnas
Lab Rat
14 posts

I take shot from win7 and ubuntu at my laptop
in win7
http://www.flickr.com/photos/42560763@N06/5302659990/

in linux
http://www.flickr.com/photos/42560763@N06/5302064907/

  1. ///////////////////
  2. import QtQuick 1.0
  3.  
  4. Item {
  5.     width: 800; height: 600
  6.     Text {
  7.         anchors.fill: parent
  8.         text: "As a boy, Chris Cooley watched his father dabble at the potter’s wheel; after his football career, he plans to keep pottery in his life.核心提示:由于上座率低,上海至北京的一趟动卧车将在2011年1月5日被全部改造成普通软卧。此前媒体曝光上海至成都的豪华动卧最贵票价达2330元,有舆论批评开出这种低上座率班次是浪费春运的运力,铁路方面则回应这是中国发展的需要。"
  9.         font.family: "simhei"; font.pointSize: 30
  10.         wrapMode: Text.WordWrap
  11.     }
  12. }
  13. ///////////////////////////

[EDIT: added @-tags for code formatting, Volker]

December 29, 2010

ixSci ixSci
Lab Rat
203 posts

It seems you are right. I’ve just tested your example and it is not smooth in the QML but smooth in the MS Word. Maybe you should file bugreport?

December 29, 2010

xsacha xsacha
Lab Rat
517 posts

It seems nothing to do with the Chinese characters either. The English ones in that screenshot have the same problem.

 Signature 

- Sacha

December 29, 2010

bellnas bellnas
Lab Rat
14 posts

No one has enconter the problem in windows?

December 29, 2010

ixSci ixSci
Lab Rat
203 posts

bellnas, maybe no one use such a big font in their projects. You’ve encountered the problem feel free to file a bug to trolls if you want this bug to be fixed.

December 29, 2010

CreMindES CreMindES
Robot Herder
208 posts

I’ve created a bugreport [bugreports.qt.nokia.com] . ;)

Page  
1

  ‹‹ Lock orientation of the phone for specific QML pages      how to integrate c++ and qt quick(qml) ››

You must log in to post a reply. Not a member yet? Register here!