Skip to content

gongzhxu/SDL_Pango

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDL_Pango

SDL_Pango Demo

This project is a lightweight rewrite of SDL_Pango to work with SDL2. The code is much shorter and provides almost similar functionality.

Documentation

See the implemented APIs in the header file SDL_Pango.h and their documentation on the original SDL_Pango project.

Different API from SDL_Pango

Only the following functions are implemented:

SDLPango_Init
SDLPango_WasInit
SDLPango_CreateContext
SDLPango_FreeContext
SDLPango_SetMinimumSize
SDLPango_GetLayoutHeight
SDLPango_GetLayoutWidth
SDLPango_SetMarkup
SDLPango_Draw

The function SDLPango_SetDefaultColor is replaced by:

void
SDLPango_SetColor(SDLPango_Context* context,
                  const SDL_Color* color);

SDL_Color
SDLPango_GetColor(SDLPango_Context* context);

Build

$ gcc -Wall -Wextra -pedantic -std=c99 $(pkg-config --cflags pango sdl2 freetype2 pangoft2) SDL_Pango.c example.c $(pkg-config --libs pango sdl2 freetype2 pangoft2) -o example
$ ./example

About

Lightweight rewrite of SDL_Pango to work with SDL2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages