| 1 | //! Fontdue is a font parser, rasterizer, and layout tool. |
| 2 | //! |
| 3 | //! This is a no_std crate, but still requires the alloc crate. |
| 4 | |
| 5 | #![cfg_attr (all(not(test), not(feature = "std" ), feature = "hashbrown" ), no_std)] |
| 6 | #![allow (dead_code)] |
| 7 | #![allow (clippy::style)] |
| 8 | #![allow (clippy::complexity)] |
| 9 | #![allow (clippy::misnamed_getters)] |
| 10 | |
| 11 | extern crate alloc; |
| 12 | |
| 13 | mod font; |
| 14 | mod hash; |
| 15 | /// Tools for laying out strings of text. |
| 16 | pub mod layout; |
| 17 | mod math; |
| 18 | mod platform; |
| 19 | mod raster; |
| 20 | mod table; |
| 21 | mod unicode; |
| 22 | |
| 23 | pub use crate::font::*; |
| 24 | |
| 25 | #[cfg (feature = "hashbrown" )] |
| 26 | pub(crate) use hashbrown::{HashMap, HashSet}; |
| 27 | #[cfg (not(feature = "hashbrown" ))] |
| 28 | pub(crate) use std::collections::{HashMap, HashSet}; |
| 29 | |
| 30 | /// Alias for Result<T, &'static str>. |
| 31 | pub type FontResult<T> = Result<T, &'static str>; |
| 32 | |