Skip to content

jomof/cdep-android-studio-freetype-sample

Repository files navigation

Freetype and SDL2 on Android

This is a sample project that combines Freetype (http://www.freetype.org) and SDL2 (https://www.libsdl.org) together in an Android Gradle project using the CDep dependency management tool to download the Freetype and SDL2 packages rather than building them.

Build Status Freetype Status CDep Status

Screen Shot

Instructions

All you need to do is clone this project, run CDep, and build.

git clone https://github.com/jomof/cdep-android-studio-freetype-sample.git
cd cdep-android-studio-freetype-sample
./cdep  # Downloads dependencies referenced in cdep.yml
./gradlew assemble

You can also open the project in Android Studio and run it.

Thanks

The main loop that demonstrates Freetype with SDL2 is adapted from https://github.com/wutipong/drawtext-sdl2-freetype2-harfbuzz/blob/master/sdl-ft-1/main.cpp.

This project itself is orginally forked from https://github.com/stephen47/android-sdl2-gradle-template which was very helpful.

The author of that project also had these thanks.

The example libSDL2 program which draws the square on screen was found at https://stackoverflow.com/questions/21890627/drawing-a-rectangle-with-sdl2/21903973#21903973.

This guide was incredibly useful while I tried to figure out how to get this working: http://lazyfoo.net/tutorials/SDL/52_hello_mobile/android_linux/index.php

The Google NDK example projects were very helpful: https://github.com/googlesamples/android-ndk

About

Freetype and SDL2 on Android using CDep dependency manager

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published