|
|
发表于 2004-5-14 13:43:51
|
显示全部楼层
diff -uNrp qt-x11-free-3.3.0.orig/src/kernel/qfontdatabase_x11.cpp qt-x11-free-3.3.0/src/kernel/qfontdatabase_x11.cpp
--- qt-x11-free-3.3.0.orig/src/kernel/qfontdatabase_x11.cpp 2004-01-30 21:03:00.000000000 +0800
+++ qt-x11-free-3.3.0/src/kernel/qfontdatabase_x11.cpp 2004-02-11 12:23:21.000000000 +0800
@@ -711,6 +711,10 @@ static unsigned char encodingLoaded[numE
static void loadXlfds( const char *reqFamily, int encoding_id )
{
+ // Add by Firefly (firefly@firefly.idv.tw)
+ if (qt_has_xft)
+ return;
+
QtFontFamily *fontFamily = reqFamily ? db->family( reqFamily ) : 0;
// make sure we don't load twice
@@ -933,6 +937,20 @@ static void loadXft()
QtFontEncoding *enc = size->encodingID( -1, 0, 0, 0, 0, TRUE );
enc->pitch = ( spacing_value >= XFT_CHARCELL ? 'c' :
( spacing_value >= XFT_MONO ? 'm' : 'p' ) );
+ // Add by Firefly (firefly@firefly.idv.tw)
+ if (weight_value <= XFT_WEIGHT_MEDIUM) {
+ QtFontStyle *fakeStyle;
+ styleKey.weight = getXftWeight(XFT_WEIGHT_BOLD);
+ fakeStyle = foundry->style(styleKey);
+ if ( !fakeStyle ) {
+ fakeStyle = foundry->style(styleKey, TRUE);
+ fakeStyle->smoothScalable = TRUE;
+ QtFontSize *fake_size = fakeStyle->pixelSize(SMOOTH_SCALABLE, TRUE);
+ QtFontEncoding *fake_enc = fake_size->encodingID(-1,0,0,0,0,TRUE
+);
+ fake_enc->pitch = enc->pitch;
+ }
+ }
}
XftFontSetDestroy (fonts);
就这几句代码会有那么大差距吗? 没有做过测试,最好谁能做个测试说明一下。 |
|