debian/0000755000000000000000000000000011721674150007172 5ustar debian/libsdl-pango-dev.examples0000644000000000000000000000011011720451304014042 0ustar test/configure.in test/Makefile.am test/README test/*.c test/markup.txt debian/libsdl-pango1.install0000644000000000000000000000003511720451551013211 0ustar usr/lib/*/libSDL_Pango.so.1* debian/libsdl-pango-dev.install0000644000000000000000000000020611720451613013703 0ustar usr/include usr/lib/*/libSDL_Pango.a usr/lib/*/libSDL_Pango.so usr/lib/*/pkgconfig docs/html/*.* /usr/share/doc/libsdl-pango-dev/html debian/rules0000755000000000000000000000034611721463231010251 0ustar #! /usr/bin/make -f export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed %: dh $@ --parallel --with autoreconf override_dh_autoreconf: dh_autoreconf --as-needed override_dh_install: dh_install --fail-missing -XlibSDL_Pango.la debian/control0000644000000000000000000000356211721671416010605 0ustar Source: sdlpango Section: libs Priority: optional Maintainer: Debian SDL packages maintainers Uploaders: Sam Hocevar (Debian packages) , Aurelien Jarno , Josselin Mouette , Felix Geyer DM-Upload-Allowed: yes Standards-Version: 3.9.3 Build-Depends: debhelper (>= 9), dh-autoreconf, libsdl1.2-dev (>= 1.2.4), libpango1.0-dev (>= 1.2.0) Vcs-Git: git://anonscm.debian.org/pkg-sdl/packages/sdlpango.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-sdl/packages/sdlpango.git Homepage: http://sdlpango.sourceforge.net/ Package: libsdl-pango1 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} Description: text rendering with Pango in SDL applications (shared library) SDL_pango is a Simple Directmedia Layer extension for rendering text with the Pango library. Its use cases are similar to those of SDL_ttf, but it benefits from the superior Pango font selection engine for improved rendering of internationalized text. . This package contains the runtime shared library. Package: libsdl-pango-dev Architecture: any Depends: ${misc:Depends}, libsdl-pango1 (= ${binary:Version}), libsdl1.2-dev (>= 1.2.4), libpango1.0-dev (>= 1.2.0) Section: libdevel Description: text rendering with Pango in SDL applications (development) SDL_pango is a Simple Directmedia Layer extension for rendering text with the Pango library. Its use cases are similar to those of SDL_ttf, but it benefits from the superior Pango font selection engine for improved rendering of internationalized text. . This package contains the static library and development headers needed to build applications using SDL_pango. debian/changelog0000644000000000000000000000555311721674116011056 0ustar sdlpango (0.1.2-6) unstable; urgency=low * Really append -Wl,--as-needed to LDFLAGS instead of overwriting the hardening flags. Thanks to Simon Ruderich for spotting this. Closes: #661009. * Use copyright-format 1.0. * Bump Standards-Version to 3.9.3, no changes needed. -- Felix Geyer Fri, 24 Feb 2012 12:45:16 +0100 sdlpango (0.1.2-5) unstable; urgency=low * Switch to source format 3.0 (quilt). * Convert debian/rules from cdbs to dh(1). * Add myself as uploader. * Set DM-Upload-Allowed. * Switch to debhelper compat level v9. - Convert to multiarch. - Exports hardening build flags. * Run dh-autoreconf and remove rebootstrap.patch. * Append -Wl,--as-needed to LDFLAGS. * Bump Standards-Version to 3.9.2, no further changes needed. * Pass --fail-missing to dh_install. -- Felix Geyer Tue, 21 Feb 2012 19:01:38 +0100 sdlpango (0.1.2-4) unstable; urgency=low * debian/control: + bump Standards-Version to 3.7.3 * debian/patches/am_maintainer_mode.patch: + Use the AM_MAINTAINER_MODE. * debian/patches/rebootstrap.patch: + Rebootstrap to support GNU/kFreeBSD. * debian/patches/autotools.patch: + Remove, superseded by the previous patch. -- Aurelien Jarno Fri, 21 Dec 2007 21:59:48 +0100 sdlpango (0.1.2-3) unstable; urgency=low * debian/control: + Set DEB_QUILT_PATCHDIR_LINK to avoid build failures. + Set the SDL team as the maintainer. * debian/patches/blit_overflow.patch: + Fix a blit overflow if rect->x or rect->y < 0 (Closes: #439855). -- Sam Hocevar (Debian packages) Mon, 08 Oct 2007 19:50:42 +0000 sdlpango (0.1.2-2) unstable; urgency=low [ Aurelien Jarno ] * debian/control: + Make the package binNMU safe. [ Josselin Mouette ] * Install the API documentation in the development package. * Thanks to Jens Seidel for the numerous useful bug reports. * matrix_declarations.patch: move the matrix declarations to the .c file instead of the header. Closes: #437517. * Switch to quilt for patch management. + Refresh patches. + Incidentally fix line encoding mess. Closes: #437518. * api_additions.patch: define SDL_PANGO_HAS_GC_EXTENSIONS to provide a macro that can be easily tested against. Closes: #437865. * sans-serif.patch: use sans-serif instead of the deprecated Sans alias. Closes: #439933. * fillrect_crash.patch: fix crash when SDLPango_Draw is called with an empty string. Closes: #439071. * autotools.patch: update config.sub and config.guess. -- Josselin Mouette Tue, 18 Sep 2007 16:36:11 +0200 sdlpango (0.1.2-1) unstable; urgency=low * Initial release (closes: #389648). * api_additions.patch: patch from Guillaume Cottenceau to add some missing functions. -- Josselin Mouette Thu, 28 Sep 2006 23:50:02 +0200 debian/compat0000644000000000000000000000000211720451624010366 0ustar 9 debian/patches/0000755000000000000000000000000011720451641010616 5ustar debian/patches/fillrect_crash.patch0000644000000000000000000000127011720451305014620 0ustar Index: SDL_Pango-0.1.2/src/SDL_Pango.c =================================================================== --- SDL_Pango-0.1.2.orig/src/SDL_Pango.c 2007-09-18 15:56:12.406223540 +0200 +++ SDL_Pango-0.1.2/src/SDL_Pango.c 2007-09-18 15:57:27.986530616 +0200 @@ -932,7 +932,9 @@ width = PANGO_PIXELS (logical_rect.width); height = PANGO_PIXELS (logical_rect.height); - SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 0)); + if (width && height) { + SDL_FillRect(surface, NULL, SDL_MapRGBA(surface->format, 0, 0, 0, 0)); + } if((! context->tmp_ftbitmap) || context->tmp_ftbitmap->width < width || context->tmp_ftbitmap->rows < height) debian/patches/matrix_declarations.patch0000644000000000000000000001034411720451305015672 0ustar Index: SDL_Pango-0.1.2/src/SDL_Pango.c =================================================================== --- SDL_Pango-0.1.2.orig/src/SDL_Pango.c 2007-09-18 15:03:10.732910311 +0200 +++ SDL_Pango-0.1.2/src/SDL_Pango.c 2007-09-18 15:04:41.970109622 +0200 @@ -286,6 +286,59 @@ } contextImpl; +const SDLPango_Matrix _MATRIX_WHITE_BACK + = {255, 0, 0, 0, + 255, 0, 0, 0, + 255, 0, 0, 0, + 255, 255, 0, 0,}; + +/*! + Specifies white back and black letter. +*/ +const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK; + +const SDLPango_Matrix _MATRIX_BLACK_BACK + = {0, 255, 0, 0, + 0, 255, 0, 0, + 0, 255, 0, 0, + 255, 255, 0, 0,}; +/*! + Specifies black back and white letter. +*/ +const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK; + +const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER + = {0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 255, 0, 0,}; +/*! + Specifies transparent back and black letter. +*/ +const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER; + +const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER + = {255, 255, 0, 0, + 255, 255, 0, 0, + 255, 255, 0, 0, + 0, 255, 0, 0,}; +/*! + Specifies transparent back and white letter. +*/ +const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER; + +const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER + = {255, 255, 0, 0, + 255, 255, 0, 0, + 255, 255, 0, 0, + 0, 0, 0, 0,}; +/*! + Specifies transparent back and transparent letter. + This is useful for KARAOKE like rendering. +*/ +const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER; + + /*! Initialize the Glib and Pango API. This must be called before using other functions in this library, Index: SDL_Pango-0.1.2/src/SDL_Pango.h =================================================================== --- SDL_Pango-0.1.2.orig/src/SDL_Pango.h 2007-09-18 15:03:10.732910311 +0200 +++ SDL_Pango-0.1.2/src/SDL_Pango.h 2007-09-18 15:06:24.919976401 +0200 @@ -47,57 +47,27 @@ Uint8 m[4][4]; /*! Matrix variables */ } SDLPango_Matrix; -const SDLPango_Matrix _MATRIX_WHITE_BACK - = {255, 0, 0, 0, - 255, 0, 0, 0, - 255, 0, 0, 0, - 255, 255, 0, 0,}; - /*! Specifies white back and black letter. */ -const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK; - -const SDLPango_Matrix _MATRIX_BLACK_BACK - = {0, 255, 0, 0, - 0, 255, 0, 0, - 0, 255, 0, 0, - 255, 255, 0, 0,}; +extern const SDLPango_Matrix *MATRIX_WHITE_BACK; /*! Specifies black back and white letter. */ -const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK; - -const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER - = {0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 255, 0, 0,}; +extern const SDLPango_Matrix *MATRIX_BLACK_BACK; /*! Specifies transparent back and black letter. */ -const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER; - -const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER - = {255, 255, 0, 0, - 255, 255, 0, 0, - 255, 255, 0, 0, - 0, 255, 0, 0,}; +extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER; /*! Specifies transparent back and white letter. */ -const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER; - -const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER - = {255, 255, 0, 0, - 255, 255, 0, 0, - 255, 255, 0, 0, - 0, 0, 0, 0,}; +extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER; /*! Specifies transparent back and transparent letter. This is useful for KARAOKE like rendering. */ -const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER; +extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER; /*! Specifies direction of text. See Pango reference for detail debian/patches/blit_overflow.patch0000644000000000000000000000141211720451305014507 0ustar Index: sdlpango-0.1.2/src/SDL_Pango.c =================================================================== --- sdlpango-0.1.2.orig/src/SDL_Pango.c 2007-10-08 19:44:15.000000000 +0000 +++ sdlpango-0.1.2/src/SDL_Pango.c 2007-10-08 19:45:27.000000000 +0000 @@ -725,16 +725,23 @@ int x = rect->x; int y = rect->y; + if(x < 0) { + width += x; x = 0; + } if(x + width > surface->w) { width = surface->w - x; - if(width <= 0) - return; + } + if(width <= 0) + return; + + if(y < 0) { + height += y; y = 0; } if(y + height > surface->h) { height = surface->h - y; - if(height <= 0) - return; } + if(height <= 0) + return; if(SDL_LockSurface(surface)) { SDL_SetError("surface lock failed"); debian/patches/series0000644000000000000000000000020111720451646012031 0ustar am_maintainer_mode.patch api_additions.patch matrix_declarations.patch sans-serif.patch fillrect_crash.patch blit_overflow.patch debian/patches/sans-serif.patch0000644000000000000000000000102711720451305013706 0ustar Index: SDL_Pango-0.1.2/src/SDL_Pango.c =================================================================== --- SDL_Pango-0.1.2.orig/src/SDL_Pango.c 2007-09-18 15:12:20.736253215 +0200 +++ SDL_Pango-0.1.2/src/SDL_Pango.c 2007-09-18 15:12:44.621614364 +0200 @@ -234,7 +234,7 @@ //! non-zero if initialized static int IS_INITIALIZED = 0; -#define DEFAULT_FONT_FAMILY "Sans" +#define DEFAULT_FONT_FAMILY "sans-serif" #define DEFAULT_FONT_SIZE 12 #define DEFAULT_DPI 96 #define _MAKE_FONT_NAME(family, size) family " " #size debian/patches/api_additions.patch0000644000000000000000000000770611720451305014455 0ustar Index: SDL_Pango-0.1.2/src/SDL_Pango.c =================================================================== --- SDL_Pango-0.1.2.orig/src/SDL_Pango.c 2004-12-10 10:06:33.000000000 +0100 +++ SDL_Pango-0.1.2/src/SDL_Pango.c 2007-09-18 14:56:35.362379428 +0200 @@ -723,13 +723,9 @@ SDL_UnlockSurface(surface); } -/*! - Create a context which contains Pango objects. - @return A pointer to the context as a SDLPango_Context*. -*/ SDLPango_Context* -SDLPango_CreateContext() +SDLPango_CreateContext_GivenFontDesc(const char* font_desc) { SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context)); G_CONST_RETURN char *charset; @@ -743,8 +739,7 @@ pango_context_set_language (context->context, pango_language_from_string (charset)); pango_context_set_base_dir (context->context, PANGO_DIRECTION_LTR); - context->font_desc = pango_font_description_from_string( - MAKE_FONT_NAME (DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE)); + context->font_desc = pango_font_description_from_string(font_desc); context->layout = pango_layout_new (context->context); @@ -762,6 +757,17 @@ } /*! + Create a context which contains Pango objects. + + @return A pointer to the context as a SDLPango_Context*. +*/ +SDLPango_Context* +SDLPango_CreateContext() +{ + SDLPango_CreateContext_GivenFontDesc(MAKE_FONT_NAME(DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE)); +} + +/*! Free a context. @param *context [i/o] Context to be free @@ -1053,6 +1059,20 @@ pango_layout_set_font_description (context->layout, context->font_desc); } +void +SDLPango_SetText_GivenAlignment( + SDLPango_Context *context, + const char *text, + int length, + SDLPango_Alignment alignment) +{ + pango_layout_set_attributes(context->layout, NULL); + pango_layout_set_text (context->layout, text, length); + pango_layout_set_auto_dir (context->layout, TRUE); + pango_layout_set_alignment (context->layout, alignment); + pango_layout_set_font_description (context->layout, context->font_desc); +} + /*! Set plain text to context. Text must be utf-8. @@ -1067,11 +1087,7 @@ const char *text, int length) { - pango_layout_set_attributes(context->layout, NULL); - pango_layout_set_text (context->layout, text, length); - pango_layout_set_auto_dir (context->layout, TRUE); - pango_layout_set_alignment (context->layout, PANGO_ALIGN_LEFT); - pango_layout_set_font_description (context->layout, context->font_desc); + SDLPango_SetText_GivenAlignment(context, text, length, SDLPANGO_ALIGN_LEFT); } /*! Index: SDL_Pango-0.1.2/src/SDL_Pango.h =================================================================== --- SDL_Pango-0.1.2.orig/src/SDL_Pango.h 2004-12-10 10:06:33.000000000 +0100 +++ SDL_Pango-0.1.2/src/SDL_Pango.h 2007-09-18 15:00:41.736419485 +0200 @@ -26,6 +26,7 @@ #ifndef SDL_PANGO_H #define SDL_PANGO_H +#define SDL_PANGO_HAS_GC_EXTENSIONS #include "SDL.h" @@ -109,12 +110,20 @@ SDLPANGO_DIRECTION_NEUTRAL /*! Neutral */ } SDLPango_Direction; - +/*! + Specifies alignment of text. See Pango reference for detail +*/ +typedef enum { + SDLPANGO_ALIGN_LEFT, + SDLPANGO_ALIGN_CENTER, + SDLPANGO_ALIGN_RIGHT +} SDLPango_Alignment; extern DECLSPEC int SDLCALL SDLPango_Init(); extern DECLSPEC int SDLCALL SDLPango_WasInit(); +extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext_GivenFontDesc(const char* font_desc); extern DECLSPEC SDLPango_Context* SDLCALL SDLPango_CreateContext(); extern DECLSPEC void SDLCALL SDLPango_FreeContext( @@ -157,6 +166,12 @@ const char *markup, int length); +extern DECLSPEC void SDLCALL SDLPango_SetText_GivenAlignment( + SDLPango_Context *context, + const char *text, + int length, + SDLPango_Alignment alignment); + extern DECLSPEC void SDLCALL SDLPango_SetText( SDLPango_Context *context, const char *markup, debian/patches/am_maintainer_mode.patch0000644000000000000000000000042011720451305015440 0ustar --- sdlpango-0.1.2.orig/configure.in +++ sdlpango-0.1.2/configure.in @@ -1,6 +1,7 @@ # Process this file with autoconf to produce a configure script. AC_INIT(README) +AM_MAINTAINER_MODE # Set various version strings - taken gratefully from the GTk sources debian/source/0000755000000000000000000000000011720465200010463 5ustar debian/source/format0000644000000000000000000000001411720451501011670 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000250611721671710011127 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: SDL_Pango Upstream-Contact: NAKAMURA Ken'ichi Source: http://sourceforge.net/projects/sdlpango/ Files: * Copyright: 2004, NAKAMURA Ken'ichi License: LGPL-2.1+ Files: debian/* Copyright: 2006, Josselin Mouette 2012, Felix Geyer License: LGPL-2.1+ License: LGPL-2.1+ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. . This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. . You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU Lesser General Public License version 2.1 can be found in the file `/usr/share/common-licenses/LGPL-2.1'.