[Pkg-sdl-commits] r92 - in unstable/sdl-ttf2.0/debian: . patches

Samuel Mimram smimram at costa.debian.org
Tue Aug 22 17:06:19 UTC 2006


Author: smimram
Date: 2006-08-22 17:06:18 +0000 (Tue, 22 Aug 2006)
New Revision: 92

Added:
   unstable/sdl-ttf2.0/debian/patches/pixel_mode_mono.dpatch
Modified:
   unstable/sdl-ttf2.0/debian/changelog
   unstable/sdl-ttf2.0/debian/patches/00list
Log:
Fix a bug with monochrome bitmaps.

Modified: unstable/sdl-ttf2.0/debian/changelog
===================================================================
--- unstable/sdl-ttf2.0/debian/changelog	2006-08-22 16:51:55 UTC (rev 91)
+++ unstable/sdl-ttf2.0/debian/changelog	2006-08-22 17:06:18 UTC (rev 92)
@@ -1,3 +1,10 @@
+sdl-ttf2.0 (2.0.8-3) unstable; urgency=low
+
+  * Added pixel_mode_mono.dpatch to fix a bug with monochrome bitmaps
+    (thanks Guillaume Cottenceau).
+
+ -- Samuel Mimram <smimram at debian.org>  Tue, 22 Aug 2006 17:02:35 +0000
+
 sdl-ttf2.0 (2.0.8-2) unstable; urgency=low
 
   * Update config.sub and config.guess in order to be able to build on

Modified: unstable/sdl-ttf2.0/debian/patches/00list
===================================================================
--- unstable/sdl-ttf2.0/debian/patches/00list	2006-08-22 16:51:55 UTC (rev 91)
+++ unstable/sdl-ttf2.0/debian/patches/00list	2006-08-22 17:06:18 UTC (rev 92)
@@ -1 +1,2 @@
 no_freetype_internals
+pixel_mode_mono

Added: unstable/sdl-ttf2.0/debian/patches/pixel_mode_mono.dpatch
===================================================================
--- unstable/sdl-ttf2.0/debian/patches/pixel_mode_mono.dpatch	2006-08-22 16:51:55 UTC (rev 91)
+++ unstable/sdl-ttf2.0/debian/patches/pixel_mode_mono.dpatch	2006-08-22 17:06:18 UTC (rev 92)
@@ -0,0 +1,58 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## pixel_mode_mono.dpatch by Guillaume Cottenceau <gcottenc at gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix a bug with monochrome bitmaps which was causing some Japanese fonts
+## DP: not to render correctly.
+
+ at DPATCH@
+diff -urNad sdl-ttf2.0-2.0.8~/SDL_ttf.c sdl-ttf2.0-2.0.8/SDL_ttf.c
+--- sdl-ttf2.0-2.0.8~/SDL_ttf.c	2006-08-22 16:53:10.000000000 +0000
++++ sdl-ttf2.0-2.0.8/SDL_ttf.c	2006-08-22 16:58:47.000000000 +0000
+@@ -524,7 +524,7 @@
+ 		 * a freetype2 bug because it is inconsistent with the
+ 		 * freetype2 documentation under FT_Render_Mode section.
+ 		 * */
+-		if ( mono || !FT_IS_SCALABLE(face) ) {
++		if ( mono || !FT_IS_SCALABLE(face) || src->pixel_mode == FT_PIXEL_MODE_MONO ) {
+ 			dst->pitch *= 8;
+ 		}
+ 
+@@ -550,27 +550,28 @@
+ 			for( i = 0; i < src->rows; i++ ) {
+ 				int soffset = i * src->pitch;
+ 				int doffset = i * dst->pitch;
+-				if ( mono ) {
++				if ( mono || src->pixel_mode == FT_PIXEL_MODE_MONO ) {
+ 					unsigned char *srcp = src->buffer + soffset;
+ 					unsigned char *dstp = dst->buffer + doffset;
++                                        unsigned char value = mono ? 1 : 255;
+ 					int j;
+ 					for ( j = 0; j < src->width; j += 8 ) {
+ 						unsigned char ch = *srcp++;
+-						*dstp++ = (ch&0x80) >> 7;
++						*dstp++ = ch&0x80 ? value : 0;
+ 						ch <<= 1;
+-						*dstp++ = (ch&0x80) >> 7;
++						*dstp++ = ch&0x80 ? value : 0;
+ 						ch <<= 1;
+-						*dstp++ = (ch&0x80) >> 7;
++						*dstp++ = ch&0x80 ? value : 0;
+ 						ch <<= 1;
+-						*dstp++ = (ch&0x80) >> 7;
++						*dstp++ = ch&0x80 ? value : 0;
+ 						ch <<= 1;
+-						*dstp++ = (ch&0x80) >> 7;
++						*dstp++ = ch&0x80 ? value : 0;
+ 						ch <<= 1;
+-						*dstp++ = (ch&0x80) >> 7;
++						*dstp++ = ch&0x80 ? value : 0;
+ 						ch <<= 1;
+-						*dstp++ = (ch&0x80) >> 7;
++						*dstp++ = ch&0x80 ? value : 0;
+ 						ch <<= 1;
+-						*dstp++ = (ch&0x80) >> 7;
++						*dstp++ = ch&0x80 ? value : 0;
+ 					}
+ 				} else if ( !FT_IS_SCALABLE(face) ) {
+ 					/* This special case wouldn't


Property changes on: unstable/sdl-ttf2.0/debian/patches/pixel_mode_mono.dpatch
___________________________________________________________________
Name: svn:executable
   + *




More information about the Pkg-sdl-commits mailing list