diff options
author | Daniel Gryniewicz <dang@gentoo.org> | 2008-07-07 15:15:36 +0000 |
---|---|---|
committer | Daniel Gryniewicz <dang@gentoo.org> | 2008-07-07 15:15:36 +0000 |
commit | 57932f223644ff768284436d792f7a214d18928a (patch) | |
tree | 45e703f9d512d2131d0db81f0a2e21634993bc28 /app-text/evince/files | |
parent | Stable on amd64 (bug #231061) (diff) | |
download | gentoo-2-57932f223644ff768284436d792f7a214d18928a.tar.gz gentoo-2-57932f223644ff768284436d792f7a214d18928a.tar.bz2 gentoo-2-57932f223644ff768284436d792f7a214d18928a.zip |
Bump to 2.22.2-r1
- Fix horrible font rendering of dvi files with t1lib. Bug #158172
(Portage version: 2.2_rc1/cvs/Linux 2.6.25-gentoo-r5 x86_64)
Diffstat (limited to 'app-text/evince/files')
-rw-r--r-- | app-text/evince/files/evince-2.22.2-t1lib-fonts.patch | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/app-text/evince/files/evince-2.22.2-t1lib-fonts.patch b/app-text/evince/files/evince-2.22.2-t1lib-fonts.patch new file mode 100644 index 000000000000..39613743d46d --- /dev/null +++ b/app-text/evince/files/evince-2.22.2-t1lib-fonts.patch @@ -0,0 +1,107 @@ +diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN evince-2.22.2.orig/backend/dvi/mdvi-lib/bitmap.c evince-2.22.2/backend/dvi/mdvi-lib/bitmap.c +--- evince-2.22.2.orig/backend/dvi/mdvi-lib/bitmap.c 2008-05-28 17:13:57.000000000 -0400 ++++ evince-2.22.2/backend/dvi/mdvi-lib/bitmap.c 2008-07-07 10:54:03.000000000 -0400 +@@ -125,7 +125,7 @@ static Uchar bit_swap[] = { + * hopelessly slow. + */ + +-BITMAP *bitmap_convert_lsb8(Uchar *bits, int w, int h) ++BITMAP *bitmap_convert_lsb8(Uchar *bits, int w, int h, int stride) + { + BITMAP *bm; + int i; +@@ -147,12 +147,13 @@ BITMAP *bitmap_convert_lsb8(Uchar *bits, + for(i = 0; i < h; i++) { + #ifdef WORD_LITTLE_ENDIAN + memcpy(unit, curr, bytes); +- curr += bytes; ++ curr += stride; + #else + int j; + + for(j = 0; j < bytes; curr++, j++) + unit[j] = bit_swap[*curr]; ++ cur += stride - bytes; + #endif + memzero(unit + bytes, bm->stride - bytes); + unit += bm->stride; +@@ -162,7 +163,7 @@ BITMAP *bitmap_convert_lsb8(Uchar *bits, + return bm; + } + +-BITMAP *bitmap_convert_msb8(Uchar *data, int w, int h) ++BITMAP *bitmap_convert_msb8(Uchar *data, int w, int h, int stride) + { + BITMAP *bm; + Uchar *unit; +@@ -180,9 +181,10 @@ BITMAP *bitmap_convert_msb8(Uchar *data, + + for(j = 0; j < bytes; curr++, j++) + unit[j] = bit_swap[*curr]; ++ curr += stride - bytes; + #else + memcpy(unit, curr, bytes); +- curr += bytes; ++ curr += stride; + #endif + memzero(unit + bytes, bm->stride - bytes); + unit += bm->stride; +diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN evince-2.22.2.orig/backend/dvi/mdvi-lib/bitmap.h evince-2.22.2/backend/dvi/mdvi-lib/bitmap.h +--- evince-2.22.2.orig/backend/dvi/mdvi-lib/bitmap.h 2008-05-28 17:13:57.000000000 -0400 ++++ evince-2.22.2/backend/dvi/mdvi-lib/bitmap.h 2008-07-07 10:54:03.000000000 -0400 +@@ -136,8 +136,8 @@ extern void bitmap_rotate_clockwise __PR + extern void bitmap_rotate_counter_clockwise __PROTO((BITMAP *)); + extern void bitmap_flip_rotate_clockwise __PROTO((BITMAP *)); + extern void bitmap_flip_rotate_counter_clockwise __PROTO((BITMAP *)); +-extern BITMAP *bitmap_convert_lsb8 __PROTO((Uchar *, int, int)); +-extern BITMAP *bitmap_convert_msb8 __PROTO((Uchar *, int, int)); ++extern BITMAP *bitmap_convert_lsb8 __PROTO((Uchar *, int, int, int)); ++extern BITMAP *bitmap_convert_msb8 __PROTO((Uchar *, int, int, int)); + + #include <stdio.h> + extern void bitmap_print __PROTO((FILE *, BITMAP *)); +diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN evince-2.22.2.orig/backend/dvi/mdvi-lib/t1.c evince-2.22.2/backend/dvi/mdvi-lib/t1.c +--- evince-2.22.2.orig/backend/dvi/mdvi-lib/t1.c 2008-05-28 17:13:57.000000000 -0400 ++++ evince-2.22.2/backend/dvi/mdvi-lib/t1.c 2008-07-07 10:54:03.000000000 -0400 +@@ -437,25 +437,16 @@ static int t1_load_font(DviParams *param + + static inline BITMAP *t1_glyph_bitmap(GLYPH *glyph) + { +- BITMAP *bm; +- int w, h; ++ int w, h, pad; + + w = GLYPH_WIDTH(glyph); + h = GLYPH_HEIGHT(glyph); + + if(!w || !h) + return MDVI_GLYPH_EMPTY; +- switch(glyph->bpp << 3) { +- case 8: +- bm = bitmap_convert_lsb8((unsigned char *)glyph->bits, w, h); +- break; +- default: +- warning(_("(t1) unsupported bitmap pad size %d\n"), +- glyph->bpp); +- bm = MDVI_GLYPH_EMPTY; +- break; +- } +- return bm; ++ ++ pad = T1_GetBitmapPad(); ++ return bitmap_convert_lsb8((unsigned char *)glyph->bits, w, h, ROUND(w, pad) * (pad >> 3)); + } + + static void t1_font_shrink_glyph(DviContext *dvi, DviFont *font, DviFontChar *ch, DviGlyph *dest) +diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN evince-2.22.2.orig/backend/dvi/mdvi-lib/tt.c evince-2.22.2/backend/dvi/mdvi-lib/tt.c +--- evince-2.22.2.orig/backend/dvi/mdvi-lib/tt.c 2008-05-28 17:13:57.000000000 -0400 ++++ evince-2.22.2/backend/dvi/mdvi-lib/tt.c 2008-07-07 10:54:03.000000000 -0400 +@@ -382,7 +382,7 @@ static int tt_get_bitmap(DviParams *para + + TT_Translate_Outline(&outline, -bbox.xMin, -bbox.yMin); + TT_Get_Outline_Bitmap(tt_handle, &outline, &raster); +- glyph->data = bitmap_convert_msb8(raster.bitmap, w, h); ++ glyph->data = bitmap_convert_msb8(raster.bitmap, w, h, ROUND(w, 8)); + TT_Done_Outline(&outline); + mdvi_free(raster.bitmap); + |