fontconfig 0.0.1

Wrapper around freedesktop's fontconfig library
docs.rs failed to build fontconfig-0.0.1
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: fontconfig-0.8.0

fontconfig-rs

A wrapper around freedesktop's fontconfig utility, for locating fontfiles on a Linux-based system. Requires libfontconfig to be installed.

Prerequisites

####Ubuntu-based system:

sudo apt-get install libfontconfig libfontconfig1-dev

Usage

Cargo.toml:

[dependencies]
fontconfig = "*"

main.rs:

extern crate fontconfig;

use fontconfig::Font;

fn main() {
    `Font::find()` returns `Option` (will rarely be `None` but still could be)
    let font = Font::find("freeserif", None).unwrap();
    // `name` is a `String`, `path` is a `Path`
    println!("Name: {}\nPath: {}", font.name, font.path.display());
}

You could then, for example, use font.path to create a GlyphCache from opengl_graphics and pass it to conrod.

Documentation

TODO: RustCI integration

git clone https://github.com/cybergeek94/fontconfig-rs
cd fontconfig-rs
cargo doc --open