Hello community, here is the log from the commit of package xorg-x11-libs checked in at Mon Nov 27 18:34:02 CET 2006. -------- --- xorg-x11-libs/xorg-x11-libs.changes 2006-11-10 14:59:12.000000000 +0100 +++ /mounts/work_src_done/STABLE/STABLE/xorg-x11-libs/xorg-x11-libs.changes 2006-11-27 12:41:46.000000000 +0100 @@ -1,0 +2,6 @@ +Mon Nov 27 12:40:56 CET 2006 - dmueller@suse.de + +- reduce p_xft_cjk.diff to only disable antialiasing on + fonts with embedded bitmaps (Bug #223682) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11-libs.spec ++++++ --- /var/tmp/diff_new_pack.y0vydD/_old 2006-11-27 18:33:43.000000000 +0100 +++ /var/tmp/diff_new_pack.y0vydD/_new 2006-11-27 18:33:43.000000000 +0100 @@ -19,7 +19,7 @@ %endif URL: http://xorg.freedesktop.org/ Version: 7.2 -Release: 12 +Release: 17 License: X11/MIT BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/Libraries @@ -130,7 +130,7 @@ %if %suse_version > 1010 %patch2 -p1 %endif -%patch3 -p2 +%patch3 -p1 %patch4 -p3 popd pushd libxkbui-* @@ -200,6 +200,9 @@ %{_mandir}/man3/* %changelog -n xorg-x11-libs +* Mon Nov 27 2006 - dmueller@suse.de +- reduce p_xft_cjk.diff to only disable antialiasing on + fonts with embedded bitmaps (Bug #223682) * Fri Nov 10 2006 - sndirsch@suse.de - fixed typo in libxkbui (Bug #219732) * Wed Nov 08 2006 - sndirsch@suse.de ++++++ p_xft_cjk.diff ++++++ --- /var/tmp/diff_new_pack.y0vydD/_old 2006-11-27 18:33:44.000000000 +0100 +++ /var/tmp/diff_new_pack.y0vydD/_new 2006-11-27 18:33:44.000000000 +0100 @@ -1,6 +1,5 @@ -diff -u -r ../libXft-2.1.10.orig/src/xftfreetype.c ./src/xftfreetype.c ---- ../libXft-2.1.10.orig/src/xftfreetype.c 2006-06-03 12:30:56.000000000 +0200 -+++ ./src/xftfreetype.c 2006-08-05 20:58:43.000000000 +0200 +--- src/xftfreetype.c ++++ src/xftfreetype.c @@ -387,6 +387,7 @@ FcChar32 hash, *hashp; FT_Face face; @@ -31,234 +30,3 @@ - if (fi->antialias || fi->transform) + if ((!bitmap && fi->antialias) || fi->transform) fi->load_flags |= FT_LOAD_NO_BITMAP; - - /* disable hinting if requested */ -@@ -680,6 +695,19 @@ - default: - goto bail1; - } -+ -+ /* -+ * Check for weight -+ */ -+ switch (FcPatternGetInteger (pattern, FC_WEIGHT, 0, &fi->weight_value)) { -+ case FcResultNoMatch: -+ fi->weight_value = FC_WEIGHT_MEDIUM; -+ break; -+ case FcResultMatch: -+ break; -+ default: -+ goto bail1; -+ } - - /* - * Step over hash value in the structure -@@ -991,6 +1019,54 @@ - font->max_glyph_memory = max_glyph_memory; - font->use_free_glyphs = info->use_free_glyphs; - -+ /* -+ * Extra bitmap strokes -+ */ -+ font->extra_strokes = 0; -+ font->extra_advanceX = 0; -+ if (fi->weight_value >= FC_WEIGHT_DEMIBOLD && -+ (face->style_flags & FT_STYLE_FLAG_BOLD) == 0) -+ { -+ font->extra_strokes = -+ 32 + FT_MulDiv (fi->xsize, fi->weight_value - 160, 1600); -+ -+ if (fi->weight_value >= FC_WEIGHT_BOLD) -+ font->extra_advanceX = -+ (font->extra_strokes > 64)? font->extra_strokes : 64; -+ } -+ -+ /* -+ * CJK fixed widths fields -+ */ -+ font->long_advance.x = 0; -+ font->long_advance.y = 0; -+ font->short_advance.x = 0; -+ font->short_advance.y = 0; -+ if (font->info.spacing == FC_MONO && fi->char_width == 0 && -+ (fi->load_flags & FT_LOAD_VERTICAL_LAYOUT) == 0 && -+ (fi->load_flags & FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH) != 0) -+ { -+ if (!FT_Select_Charmap (face, ft_encoding_unicode)) -+ { -+ font->long_advance.x = -+ face->size->metrics.max_advance + font->extra_advanceX; -+ if (fi->transform) -+ FT_Vector_Transform (&font->long_advance, &fi->matrix); -+ font->long_advance.x = (font->long_advance.x + 32) >> 6; -+ font->long_advance.y = (font->long_advance.y + 32) >> 6; -+ -+ if (font->long_advance.x > 0) -+ font->short_advance.x = (font->long_advance.x + 1) >> 1; -+ else -+ font->short_advance.x = font->long_advance.x >> 1; -+ -+ if (font->long_advance.y > 0) -+ font->short_advance.y = (font->long_advance.y + 1) >> 1; -+ else -+ font->short_advance.y = font->long_advance.y >> 1; -+ } -+ } -+ - _XftUnlockFile (fi->file); - - return &font->public; -diff -u -r ../libXft-2.1.10.orig/src/xftglyphs.c ./src/xftglyphs.c ---- ../libXft-2.1.10.orig/src/xftglyphs.c 2006-06-03 12:30:56.000000000 +0200 -+++ ./src/xftglyphs.c 2006-08-05 20:58:43.000000000 +0200 -@@ -219,6 +219,7 @@ - bottom = FLOOR( glyphslot->metrics.horiBearingY - glyphslot->metrics.height ); - } - -+ right += CEIL(font->extra_strokes); - width = TRUNC(right - left); - height = TRUNC( top - bottom ); - -@@ -226,7 +227,8 @@ - * Clip charcell glyphs to the bounding box - * XXX transformed? - */ -- if (font->info.spacing >= FC_CHARCELL && !font->info.transform) -+ if (font->info.spacing >= FC_CHARCELL && !font->info.transform && -+ font->long_advance.x == 0 && font->long_advance.y == 0) - { - if (font->info.load_flags & FT_LOAD_VERTICAL_LAYOUT) - { -@@ -267,7 +269,21 @@ - - if (font->info.spacing >= FC_MONO) - { -- if (font->info.transform) -+ if (font->long_advance.x != 0 || font->long_advance.y != 0) -+ { -+ if (glyphslot->metrics.horiAdvance > -+ face->size->metrics.max_advance * 3/4) -+ { -+ xftg->metrics.xOff = font->long_advance.x; -+ xftg->metrics.yOff = -font->long_advance.y; -+ } -+ else -+ { -+ xftg->metrics.xOff = font->short_advance.x; -+ xftg->metrics.yOff = -font->short_advance.y; -+ } -+ } -+ else if (font->info.transform) - { - if (font->info.load_flags & FT_LOAD_VERTICAL_LAYOUT) - { -@@ -304,6 +320,15 @@ - } - else - { -+ if (font->extra_advanceX > 0 && -+ (font->info.load_flags & FT_LOAD_VERTICAL_LAYOUT) == 0) -+ { -+ glyphslot->advance.x = -+ glyphslot->metrics.horiAdvance + font->extra_advanceX; -+ glyphslot->advance.y = 0; -+ if (font->info.transform) -+ FT_Vector_Transform (&glyphslot->advance, &font->info.matrix); -+ } - xftg->metrics.xOff = TRUNC(ROUND(glyphslot->advance.x)); - xftg->metrics.yOff = -TRUNC(ROUND(glyphslot->advance.y)); - } -@@ -406,6 +431,53 @@ - continue; - } - -+ if (font->extra_strokes > 0) -+ { -+ int extra = font->extra_strokes; -+ int degree; -+ int i, h, g, d, k; -+ -+ if (glyphslot->format == ft_glyph_format_bitmap) -+ extra += 8; -+ /* extra *= hmul; */ -+ degree = TRUNC(CEIL(extra)); -+ -+ for (i = 0; i < degree; i++) -+ { -+ d = (i == 0)? (extra % 64) : 64; -+ if (d == 0) -+ d = 64; -+ for (h = 0; h < height; h++) -+ { -+ unsigned char *pos = bufBitmap + h * pitch; -+ k = pitch; -+ if (font->info.antialias) -+ { -+ if (i > 0) -+ while (--k > 0) -+ pos[k] = (pos[k] > pos[k - 1])? pos[k] : pos[k - 1]; -+ else -+ { -+ while (--k > 0) -+ { -+ g = pos[k]; -+ g += d * ((pos[k - 1] > 0)? pos[k - 1]/64 : g/128); -+ pos[k] = (g > 0xff)? 0xff : g; -+ } -+ g = pos[0] + pos[0] * d / 128; -+ pos[0] = (g > 0xff)? 0xff : g; -+ } -+ } -+ else -+ { -+ while (--k > 0) -+ pos[k] = pos[k] | (pos[k] >> 1) | (pos[k - 1] << 7); -+ pos[0] = pos[0] | (pos[0] >> 1); -+ } -+ } -+ } -+ } -+ - if (XftDebug() & XFT_DBG_GLYPH) - { - printf ("glyph %d:\n", (int) glyphindex); -diff -u -r ../libXft-2.1.10.orig/src/xftint.h ./src/xftint.h ---- ../libXft-2.1.10.orig/src/xftint.h 2006-06-06 18:35:37.000000000 +0200 -+++ ./src/xftint.h 2006-08-05 20:58:43.000000000 +0200 -@@ -157,6 +157,7 @@ - int spacing; - FcBool minspace; - int char_width; -+ int weight_value; - }; - - /* -@@ -193,6 +194,16 @@ - unsigned long glyph_memory; - unsigned long max_glyph_memory; - FcBool use_free_glyphs; /* Use XRenderFreeGlyphs */ -+ /* -+ * CJK fixed widths infomation -+ */ -+ FT_Vector long_advance; -+ FT_Vector short_advance; -+ /* -+ * Extra bitmap strokes -+ */ -+ int extra_strokes; -+ int extra_advanceX; - } XftFontInt; - - typedef enum _XftClipType { -diff -u -r ../libXft-2.1.10.orig/src/xftname.c ./src/xftname.c ---- ../libXft-2.1.10.orig/src/xftname.c 2006-06-06 18:34:54.000000000 +0200 -+++ ./src/xftname.c 2006-08-05 20:59:52.000000000 +0200 -@@ -32,7 +32,7 @@ - - #define NUM_OBJECT_TYPES (sizeof _XftObjectTypes / sizeof _XftObjectTypes[0]) - --_X_HIDDEN FcBool _XftNameInitialized; -+_X_HIDDEN FcBool _XftNameInitialized = FcFalse; - - _X_HIDDEN void - _XftNameInit (void) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@suse.de