Rust-SDL2_ttf

Build Status

Rust bindings for SDL2_ttf.

Overview

Rust-SDL2ttf is a library for talking to the new SDL2ttf library from Rust.

Rust-SDL2_ttf uses the MIT licence.

Requirements

Installation

Place the following into your project's Cargo.toml file:

toml [dependencies] sdl2_ttf = "0.2.2"

Or, to depend on the newest rust-sdl2_ttf, reference the repository:

toml [dependencies.sdl2_ttf] git = "https://github.com/andelf/rust-sdl2_ttf"

You can also just clone and build the library yourself:

```bash git clone https://github.com/andelf/rust-sdl2ttf cd rust-sdl2ttf cargo build

TODO: OR if you are using the mac framework version

rustc -L. --cfg macframework src/sdl2ttf/lib.rs ```

If you're not using Cargo, you can compile the library manually:

bash git clone https://github.com/andelf/rust-sdl2_ttf cd rust-sdl2_ttf rustc src/sdl2_ttf/lib.rs

Demo

A simple demo that prints out a string given a font is included:

bash cargo run path/to/font.(ttf|ttc|fon)

Or:

bash rustc -L. src/demo/main.rs -o demo ./demo path/to/font.(ttf|ttc|fon)