--- a/src/gui/text/qfontdatabase_x11.cpp +++ b/src/gui/text/qfontdatabase_x11.cpp @@ -1333,10 +1333,29 @@ if (! enc) continue; // should not happen either QtFontStyle::Key key = style->key; + // does this style have a bold equivalent? + key.weight = QFont::Bold; + QtFontStyle *equiv = foundry->style(key); + + if (!equiv) { + // let's fake one... + equiv = foundry->style(key, true); + equiv->smoothScalable = true; + + QtFontSize *equiv_size = equiv->pixelSize(SMOOTH_SCALABLE, true); + QtFontEncoding *equiv_enc = equiv_size->encodingID(-1, 0, 0, 0, 0, true); + + // keep the same pitch + equiv_enc->pitch = enc->pitch; + key.weight = QFont::Normal; + } + + // does this style have an italic equivalent? key.style = QFont::StyleItalic; - QtFontStyle *equiv = foundry->style(key); + //QtFontStyle *equiv = foundry->style(key); + equiv = foundry->style(key); if (equiv) continue; // does this style have an oblique equivalent?