[webkit-qt] font-family cause chinese cann't paint?

RyanYee/叶晔 godyee at gmail.com
Wed Apr 7 20:14:59 PDT 2010


my orignal question is here:
https://lists.webkit.org/pipermail/webkit-qt/2010-March/000220.html

when I open "define QT_DEBUG_DRAW" in qpainter.cpp.
I got these debug infomation:

QPainter::setFont(), family=??,Arial,Helvetica,-webkit-sans-serif, pointSize=-1
QPainter::setBrush(), color=ffffffff, style=1
QPainter::setPen(), color=ffffffff
QPainter::setFont(), family=??,Arial,Helvetica,-webkit-sans-serif, pointSize=-1
QPainter::drawText(), pos=[411.00,53.00], str='??'
QPainter::drawTextItem(), pos=[411,53], str='棣栭〉'

in qte 4.6.1 text display right
I got these :
QPainter::setBrush(), color=ffffffff, style=1
QPainter::setPen(), color=ffffffff
QPainter::setFont(), family=Arial, pointSize=-1
QPainter::drawText(), pos=[188.00,54.00], str='??'
QPainter::drawTextItem(), pos=[188,54], str='棣栭〉'

so font-family in qpainter different.
what's happened in 4.6.1

then ,I try to modify a html source to test.
if I use this one ,chinese show null
 <style>
 body { font-family:Arial,Helvetica, sans-serif;  font-size:12px;
text-align:center;}
 </style>

but this one ok ,(or I delete font file helvetica*)
 <style>
 body { font-family:Arial,sans-serif;  font-size:12px; text-align:center;}
 </style>
so what I can do to make my qte4.5.1 do show chinese ok with
font-family has "helvetice"?

-- 
RyanYee


More information about the webkit-qt mailing list