Skip to main content

ttf_rs/
lib.rs

1// ttf-rs: A Rust library for reading, writing, and operating on TTF files
2
3mod error;
4mod font;
5mod tables;
6mod stream;
7mod modifier;
8mod subset;
9mod validation;
10mod woff;
11mod rasterizer;
12mod cached;
13
14pub use error::{TtfError, Result};
15pub use font::Font;
16pub use modifier::FontModifier;
17pub use subset::FontSubset;
18pub use validation::{ValidationReport, ValidationError, ValidationWarning};
19pub use rasterizer::{Rasterizer, RasterizedGlyph};
20pub use cached::CachedFont;
21pub use stream::{FontReader, FontWriter, calculate_checksum};
22pub use tables::{
23    TableRecord,
24    TtfTable,
25    TtfTableWrite,
26    head::HeadTable,
27    maxp::MaxpTable,
28    cmap::{CmapTable, CmapSubtable, Format4, Format6, Format12, Format13, Format14},
29    name::NameTable,
30    hhea::HheaTable,
31    hmtx::HmtxTable,
32    glyf::{GlyfTable, GlyphData, Point, BoundingBox, SimpleGlyph, CompositeGlyph, Transform},
33    loca::LocaTable,
34    post::PostTable,
35    os2::Os2Table,
36};
37
38#[cfg(test)]
39mod tests {
40    use super::*;
41
42    #[test]
43    fn library_loads() {
44        // Basic test to ensure library compiles
45        assert!(true);
46    }
47}