# chicken-sdl2-ttf [CHICKEN Scheme](http://call-cc.org/) bindings to [SDL_ttf](http://www.libsdl.org/projects/SDL_ttf/) 2, a.k.a. the `sdl2-ttf` egg. - Version: 0.1.0 (2015-12-25) - Project: https://gitlab.com/chicken-sdl2/chicken-sdl2-ttf - Issues: https://gitlab.com/chicken-sdl2/chicken-sdl2-ttf/issues - API Docs: http://api.call-cc.org/doc/sdl2-ttf - License: [BSD 2-Clause](LICENSE-BSD.txt) - Maintainer: John Croisant (john+chicken at croisant dot net) ## Synopsis chicken-sdl2-ttf provides bindings to SDL_ttf version 2, the TrueType Font rendering library. chicken-sdl2-ttf is built to be compatible with [chicken-sdl2](https://gitlab.com/chicken-sdl2/chicken-sdl2) (a.k.a. the `sdl2` egg), which provides bindings to Simple DirectMedia Layer version 2 (SDL2), a popular library used in games and other media-rich software. ## Installation If you run into trouble installing chicken-sdl2-ttf, please [file a support request on the chicken-sdl2 project](https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/CONTRIBUTING.md#filing-support-requests) so we can help you, and so we can improve the install process and instructions for future users. ### Dependencies - [chicken-sdl2](https://gitlab.com/chicken-sdl2/chicken-sdl2), a.k.a. the `sdl2` egg - [SDL_ttf](http://www.libsdl.org/projects/SDL_ttf/) 2.0 or higher chicken-sdl2-ttf requires CHICKEN Scheme 4.8 or higher. Please file an issue or contact the maintainer if you need to use this library with an earlier version of CHICKEN Scheme. ### Installing from egg repository When installing the egg, you should set the `SDL2_FLAGS` environment variable to a string of compiler flags to be used when compiling the egg. If you have the `sdl2-config` helper program installed on your system, you can set appropriate flags and install the extension like so (notice these are back ticks, not quotes): ``` export SDL2_FLAGS=`sdl2-config --cflags --libs` chicken-install sdl2-ttf ``` If you do not have the `sdl2-config` helper program installed on your computer, you may manually specify SDL-related compiler flags (notice these are double quotes, not back ticks): ``` export SDL2_FLAGS="-I/usr/local/include/SDL2 -L/usr/local/lib -lSDL2" chicken-install sdl2-ttf ``` By default, chicken-sdl2-ttf will be linked against SDL_ttf using the compiler flag `-lSDL2_ttf`. You can override this by setting the `SDL2_TTF_FLAGS` environment variable, if needed. You can also use that environment variable in case you have installed SDL_ttf in a different location than SDL. The `SDL2_FLAGS` and `SDL2_TTF_FLAGS` environment variables are only needed during installation of the egg. They do not need to be set during normal use. ### Installing from source To install chicken-sdl2-ttf from source, clone the repository or download the source from the project page, then run the `chicken-install` command (with no arguments) from within the project's directory. Like above, you should set the `SDL2_FLAGS` (and possibly `SDL2_TTF_FLAGS`) environment variable before installing the extension: ``` export SDL2_FLAGS=`sdl2-config --cflags --libs` chicken-install ``` ## Demos Examples After you have installed chicken-sdl2-ttf, you can try compiling and running the demos and examples. The [https://gitlab.com/chicken-sdl2/chicken-sdl2-ttf/tree/master/demos](demos directory) contains small programs demonstrating how to use various features of sdl2-ttf. The [chicken-sdl2-examples repository](https://gitlab.com/chicken-sdl2/chicken-sdl2-examples) contains complete example games and programs made with chicken-sdl2, chicken-sdl2-ttf, and other related libraries. ## Contributing chicken-sdl2-ttf is part of the [chicken-sdl2 project](https://gitlab.com/chicken-sdl2/chicken-sdl2) chicken-sdl2 is a volunteer effort, and your help is appreciated. There are many ways to get involved in the project, whether you are an experienced programmer or not. For more information about how you can help, please see the chicken-sdl2 [contribution guide](https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/CONTRIBUTING.md). Please be aware that all project participants are expected to abide by the [Contributor Code of Conduct](https://gitlab.com/chicken-sdl2/chicken-sdl2/blob/master/CODE_OF_CONDUCT.md). We are committed to making participation in this project a welcoming and harassment-free experience.