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
//! Port of `fontTools.ttLib`: the [`Font`] object (`TTFont`), sfnt/TTC/WOFF/WOFF2
//! containers, table implementations, and TTX serialization.
//!
//! ```no_run
//! use fontoxide_ttlib::{Font, ReadOptions, TtxOptions, tables::Head};
//!
//! let data = std::fs::read("font.ttf")?;
//! let mut font = Font::read(data, ReadOptions::default())?;
//! let head: &mut Head = font.require::<Head>()?;
//! println!("{}", head.units_per_em);
//! let ttx = font.to_ttx(&TtxOptions::default())?;
//! # Ok::<(), Box<dyn std::error::Error>>(())
//! ```
//!
//! # Features
//!
//! The features are fontTools' extras, all on by default. Without one,
//! fontoxide behaves as fontTools does without that Python package:
//!
//! | Feature | fontTools extra (package) | Without it |
//! |------------|---------------------------|------------|
//! | `woff` | `woff` (brotli, zopfli) | reading and writing WOFF 2.0, and WOFF 1.0 with [`WriteOptions::use_zopfli`], fail with [`Error::Import`] |
//! | `graphite` | `graphite` (lz4) | LZ4-compressed `Silf` and `Glat` tables are kept compressed, with a warning |
//! | `pathops` | `pathops` (skia-pathops) | [`remove_overlaps`](remove_overlaps::remove_overlaps) and the command line [`remove_overlaps::main`] fail with [`Error::Import`] |
//! | `repacker` | `repacker` (uharfbuzz) | `GSUB` and `GPOS` are packed with fontTools' serializer; [`Font::use_harfbuzz_repacker`] `Some(true)` fails with [`Error::Import`] |
pub use TtCollection;
pub use ;
pub use ;
pub use Tag;
pub use set_clock;
pub use GlyphOrder;
pub use GlyphSet;
pub use ;
pub use ;
pub use ;
/// The fontTools release whose behavior this version matches.
pub const FONTTOOLS_VERSION: &str = "4.69.1";
/// Facts about fontTools' table classes, generated from upstream.