mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.2 KiB

  1. This is the a workaround for a newly introduced font problem in Qt-3.3.1 -
  2. official patch.
  3. - Rene Rebe <rene@rocklinux.org>
  4. --- /tmp/tmp.17383.0 2004-03-04 17:53:01.000000000 +0100
  5. +++ qt-3/src/kernel/qfontdatabase_x11.cpp 2004-03-04 17:47:59.000000000 +0100
  6. @@ -1508,6 +1516,24 @@
  7. XftResult res;
  8. XftPattern *result =
  9. XftFontMatch( QPaintDevice::x11AppDisplay(), fp->screen, pattern, &res );
  10. +#ifdef QT_XFT2
  11. + if (script == QFont::Latin) {
  12. + // since we added the Euro char on top, check we actually got the family
  13. + // we requested. If we didn't get it correctly, remove the Euro from the pattern
  14. + // and try again.
  15. + FcChar8 *f;
  16. + res = FcPatternGetString(result, FC_FAMILY, 0, &f);
  17. + if (res == FcResultMatch && QString::fromUtf8((char *)f) != family->rawName) {
  18. + qDebug("trying without Euro");
  19. + FcPatternDel(pattern, FC_CHARSET);
  20. + FcCharSet *cs = FcCharSetCreate();
  21. + QChar sample = sampleCharacter(script);
  22. + FcCharSetAddChar(cs, sample.unicode());
  23. + FcPatternAddCharSet(pattern, FC_CHARSET, cs);
  24. + result = XftFontMatch( QPaintDevice::x11AppDisplay(), fp->screen, pattern, &res );
  25. + }
  26. + }
  27. +#endif
  28. XftPatternDestroy(pattern);
  29. // We pass a duplicate to XftFontOpenPattern because either xft font