|
发表于 2004-10-26 22:02:49
|
显示全部楼层
10-29更新:
将显示音标的字体指定为Lucida,从而可以正确的显示音标。
显示中文的补丁如下:
[code:1]
--- babyword-0.1/src/babyword.cpp.org 2004-10-22 21:02:13.000000000 +0800
+++ babyword-0.1/src/babyword.cpp 2004-10-27 00:18:04.991287880 +0800
@@ -78,7 +78,10 @@
//word_L->setPaletteForegroundColor(Qt::white);
//fnt.setBold(true);
fnt.setPointSize(14);
- word_L->setFont(fnt);
+
+ QFont word_fnt(QFont("Lucida"));
+ word_fnt.setPointSize(14);
+ word_L->setFont(word_fnt);
meaning_L=new QLabel(this);
//meaning_L->setPaletteForegroundColor(Qt::white);
@@ -399,7 +399,7 @@
QString word= *word_List.at(current_W)+" "+*phone_List.at(current_W);
QString mean= *mean_List.at(current_W);
word_L->setText(word);
- meaning_L->setText(QString::fromLocal8Bit(mean));
+ meaning_L->setText(mean);
int a=word_L->fontMetrics().width(word);
int b=meaning_L->fontMetrics().width(QString::fromLocal8Bit(mean));
@@ -425,7 +425,7 @@
QString word= *word_List.at(current_W)+" "+*phone_List.at(current_W);
QString mean= *mean_List.at(current_W);
word_L->setText(word);
- meaning_L->setText(QString::fromLocal8Bit(mean));
+ meaning_L->setText(mean);
int a=word_L->fontMetrics().width(word);
int b=meaning_L->fontMetrics().width(QString::fromLocal8Bit(mean));
@@ -484,7 +484,7 @@
else
{
word_L->setText(word);
- meaning_L->setText(QString::fromLocal8Bit(mean));
+ meaning_L->setText(mean);
readit(*word_List.at(current_W));
int a=word_L->fontMetrics().width(word);
@@ -501,7 +501,7 @@
else
{
word_L->setText(word);
- meaning_L->setText(QString::fromLocal8Bit(mean));
+ meaning_L->setText(mean);
int a=word_L->fontMetrics().width(word);
int b=meaning_L->fontMetrics().width(QString::fromLocal8Bit(mean));
[/code:1]
RPM包下载:
http://www.magiclinux.org/people/kanker/tools/babyword/babyword-0.1-2mgc.i686.rpm
源包:
http://www.magiclinux.org/people/kanker/tools/babyword/babyword-0.1-2mgc.src.rpm |
|