Репозитории ALT
S: | 118.0-alt1 |
4.1: | 3.0.9-alt0.M41.1 |
+updates: | 3.0.4-alt0.M41.2 |
4.0: | 2.0.0.18-alt0.M40.1 |
3.0: | 1.0.7-alt3 |
+updates: | 1.0.8-alt0.M30.1 |
Группа :: Сети/WWW
Пакет: firefox
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: firefox-1.5.0.6-gtk2+xft-xrender-workaround.patch
Скачать
Скачать
diff -u -r1.51.6.2.2.2 nsFontMetricsXft.cpp
--- gfx/src/gtk/nsFontMetricsXft.cpp 16 Feb 2005 17:09:21 -0000 1.51.6.2.2.2
+++ gfx/src/gtk/nsFontMetricsXft.cpp 19 Aug 2005 19:55:17 -0000
@@ -2217,19 +2217,27 @@
nsAutoDrawSpecBuffer::Flush()
{
if (mSpecPos) {
- // Some Xft libraries will crash if none of the glyphs have any
- // area. So before we draw, we scan through the glyphs. If we
- // find any that have area, we can draw.
- for (PRUint32 i = 0; i < mSpecPos; i++) {
- XftGlyphFontSpec *sp = &mSpecBuffer[i];
- XGlyphInfo info;
- XftGlyphExtents(GDK_DISPLAY(), sp->font, &sp->glyph, 1, &info);
- if (info.width && info.height) {
- // If we get here it means we found a drawable glyph. We will
- // Draw all the remaining glyphs and then break out of the loop
- XftDrawGlyphFontSpec(mDraw, mColor, mSpecBuffer+i, mSpecPos-i);
- break;
+ // There are two Xft problems to work around here:
+ // 1. Some Xft libraries reportedly crash if none of the
+ // glyphs have any area.
+ // 2. Because of an apparent X server bug (see bug 252033),
+ // a glyph with no area may cause all following glyphs to be
+ // dropped under some circumstances.
+ // For this reason, we manually ship out blocks of glyphs with
+ // area and skip blocks of glyphs with no area.
+ PRUint32 start = 0;
+ while (start < mSpecPos) {
+ PRUint32 i;
+ for (i = start; i < mSpecPos; i++) {
+ XftGlyphFontSpec *sp = &mSpecBuffer[i];
+ XGlyphInfo info;
+ XftGlyphExtents(GDK_DISPLAY(), sp->font, &sp->glyph, 1, &info);
+ if (!info.width || !info.height)
+ break;
}
+ if (i > start)
+ XftDrawGlyphFontSpec(mDraw, mColor, mSpecBuffer+start, i-start);
+ start = i + 1;
}
mSpecPos = 0;
}