Skip to content

ElliottLester/rust-sdl2_ttf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust-SDL2_ttf

Build Status

Rust bindings for SDL2_ttf.

forked from https://github.com/andelf/rust-sdl2_ttf.git

Overview

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

Rust-SDL2_ttf uses the MIT licence.

Requirements

  • Rust-SDL2
  • SDL2_ttf development libraries
  • Rust master or nightly

Installation

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

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

You can also just clone and build the library yourself:

git clone https://github.com/ElliottLester/rust-sdl2_ttf.git
cd rust-sdl2_ttf
cargo build
# TODO: OR if you are using the mac framework version
rustc -L. --cfg mac_framework src/sdl2_ttf/lib.rs

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

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

Demo

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

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

Or:

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

About

Rust bindings for sdl2_ttf.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 53.5%
  • Makefile 46.5%