49 lines
1.6 KiB
Diff
49 lines
1.6 KiB
Diff
From: Jan Engelhardt <jengelh@inai.de>
|
|
Date: 2024-08-21 14:44:53.847192112 +0200
|
|
|
|
SDL_Pango.c: In function 'drawGlyphString':
|
|
SDL_Pango.c:349:5: error: implicit declaration of function 'SDLPango_CopyFTBitmapToSurface' [-Wimplicit-function-declaration]
|
|
349 | SDLPango_CopyFTBitmapToSurface(
|
|
Take inspiration from
|
|
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e529a13405f08edca871efbe73a0392f507051c
|
|
|
|
---
|
|
src/SDL_Pango.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
Index: SDL_Pango-0.1.2/src/SDL_Pango.c
|
|
===================================================================
|
|
--- SDL_Pango-0.1.2.orig/src/SDL_Pango.c
|
|
+++ SDL_Pango-0.1.2/src/SDL_Pango.c
|
|
@@ -228,6 +228,7 @@
|
|
|
|
#include <pango/pango.h>
|
|
#include <pango/pangoft2.h>
|
|
+#define __FT2_BUILD_UNIX_H__
|
|
|
|
#include "SDL_Pango.h"
|
|
|
|
@@ -298,7 +299,6 @@ typedef struct _contextImpl {
|
|
int
|
|
SDLPango_Init()
|
|
{
|
|
- g_type_init();
|
|
|
|
IS_INITIALIZED = -1;
|
|
|
|
@@ -727,12 +727,12 @@ SDLPango_Context*
|
|
SDLPango_CreateContext_GivenFontDesc(const char* font_desc)
|
|
{
|
|
SDLPango_Context *context = g_malloc(sizeof(SDLPango_Context));
|
|
- G_CONST_RETURN char *charset;
|
|
+ const char *charset;
|
|
|
|
context->font_map = pango_ft2_font_map_new ();
|
|
pango_ft2_font_map_set_resolution (PANGO_FT2_FONT_MAP (context->font_map), DEFAULT_DPI, DEFAULT_DPI);
|
|
|
|
- context->context = pango_ft2_font_map_create_context (PANGO_FT2_FONT_MAP (context->font_map));
|
|
+ context->context = pango_font_map_create_context (PANGO_FONT_MAP (context->font_map));
|
|
|
|
g_get_charset(&charset);
|
|
pango_context_set_language (context->context, pango_language_from_string (charset));
|