[BACK]Return to patch-SDL_ttf_c CVS log [TXT][DIR] Up to [local] / ports / devel / sdl-ttf / patches

File: [local] / ports / devel / sdl-ttf / patches / patch-SDL_ttf_c (download)

Revision 1.3, Tue Jul 28 08:40:59 2020 UTC (23 months ago) by namtsui
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +4 -4 lines

Summary: reformat comment

$OpenBSD$

Backport fix for TTF_RenderGlyph_Shaded not rendering font. Before, it
was caching pixmap but using an empty bitmap cache; change it to
cache/use pixmap. This is consistent with the _Solid and _Blended
variants, which cache/use bitmap and pixmap, respectively.

Sources:
https://bugzilla.libsdl.org/show_bug.cgi?id=1433
https://hg.libsdl.org/SDL_ttf/rev/6d7fe24793a4

Index: SDL_ttf.c
--- SDL_ttf.c.orig
+++ SDL_ttf.c
@@ -1747,7 +1747,7 @@ SDL_Surface* TTF_RenderGlyph_Shaded( TTF_Font* font,
 	/* Copy the character from the pixmap */
 	src = glyph->pixmap.buffer;
 	dst = (Uint8*) textbuf->pixels;
-	for ( row = 0; row < glyph->bitmap.rows; ++row ) {
+	for ( row = 0; row < glyph->pixmap.rows; ++row ) {
 		memcpy( dst, src, glyph->pixmap.width );
 		src += glyph->pixmap.pitch;
 		dst += textbuf->pitch;