1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//!
//! Rust wrapper around freetype 2 library
//!
//! # Initialization
//!
//! To create a new freetype context, instantiate the Library struct as below.
//! The Library (along with other objects) obeys RAII and is dropped when the struct goes out of
//! scope.
//!
//! # Example
//!
//! ```ignore
//! extern crate freetype;
//!
//! fn main() {
//! use freetype::Library;
//! use freetype::face::LoadFlag;
//!
//! // Init the library
//! let lib = Library::init().unwrap();
//! // Load a font face
//! let face = lib.new_face("/path/to/a/font/file.ttf", 0).unwrap();
//! // Set the font size
//! face.set_char_size(40 * 64, 0, 50, 0).unwrap();
//! // Load a character
//! face.load_char('A' as usize, LoadFlag::RENDER).unwrap();
//! // Get the glyph instance
//! let glyph = face.glyph();
//! do_something_with_bitmap(glyph.bitmap());
//! }
//! ```
//!
//! See in the `examples/` folder for more examples.
//!
//! # External links
//! - See [freetype docs](http://www.freetype.org/freetype2/docs/reference/ft2-index.html)
//! for more information
extern crate bitflags;
extern crate fallible;
extern crate libc;
extern crate null_terminated;
pub extern crate freetype_sys;
pub use Bitmap;
pub use BitmapGlyph;
pub use ;
pub use Face;
pub use Glyph;
pub use GlyphSlot;
pub use ;
pub use Outline;
pub use RenderMode;
pub use ;
pub use freetype_sys as ffi;
pub type BBox = FT_BBox;
pub type GlyphMetrics = FT_Glyph_Metrics;
pub type Matrix = FT_Matrix;
pub type Vector = FT_Vector;
use Nul;