1 | //! Extends [ttf_parser](https://docs.rs/ttf-parser) with owned version of |
2 | //! [`Face`](struct.Face.html): [`OwnedFace`](struct.OwnedFace.html). |
3 | //! |
4 | //! Re-exports `ttf_parser::*`. |
5 | //! |
6 | //! # Example |
7 | //! ``` |
8 | //! use owned_ttf_parser::{AsFaceRef, Face, OwnedFace}; |
9 | //! |
10 | //! # let owned_font_data = include_bytes!("../fonts/font.ttf" ).to_vec(); |
11 | //! let owned_face = OwnedFace::from_vec(owned_font_data, 0).unwrap(); |
12 | //! let face_ref: &Face<'_> = owned_face.as_face_ref(); |
13 | //! |
14 | //! assert_eq!(face_ref.ascender(), 2254); |
15 | //! ``` |
16 | #![cfg_attr (not(feature = "std" ), no_std)] |
17 | extern crate alloc; |
18 | |
19 | mod convert; |
20 | mod owned; |
21 | mod preparse; |
22 | |
23 | pub use convert::*; |
24 | pub use owned::*; |
25 | pub use preparse::*; |
26 | pub use ttf_parser::*; |
27 | |