8000 GitHub - gongzhxu/SDL_Pango: Lightweight rewrite of SDL_Pango to work with SDL2 · GitHub
[go: up one dir, main page]

Skip to content
8000
gongzhxuPublic

About

Lightweight rewrite of SDL_Pango to work with SDL2

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

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

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0