Skip to content

A sample app for rendering SDF text on OpenGL using fontstash and stb_ttf

License

Notifications You must be signed in to change notification settings

suikki/sdf_text_sample

Repository files navigation

sdf_text_sample Travis build status Build status

A simple cross platform OpenGL application using signed distance field (SDF) font rendering to render text that can be scaled freely while still appearing sharp.

Tested on linux, windows, macOS, android and emscripten.

See the online demo.

Building

Requirements:

  • cmake 3.2 or newer (on path)
  • SDL2
    • on linux: SDL2 must be installed (e.g. libsdl2-dev on ubuntu)
    • on macOS: SDL2 must be installed (e.g. brew install sdl2)
    • on Windows: SDL2 binaries will be downloaded by the build script automatically.

Run the appropriate build script from platforms/ to build the app.

License

The project is licensed under the zlib license

Links

Using:

  • fontstash for font rendering (using a fork supporting SDF and OpenGL ES2).
  • SDL2 for cross platform windowing and input.
  • glew for OpenGL extension loading.

About

A sample app for rendering SDF text on OpenGL using fontstash and stb_ttf

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published