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
//! A robust, ergonomic, high performance crate for OpenType fonts.
//!
//! Skrifa is a mid level library that provides access to various types
//! of [`metadata`](MetadataProvider) contained in a font as well as support
//! for loading glyph [`outlines`](outline).
//!
//! It is described as "mid level" because the library is designed to sit
//! above low level font parsing (provided by [`read-fonts`](https://crates.io/crates/read-fonts))
//! and below a higher level text layout engine.
//!
//! See the [readme](https://github.com/googlefonts/fontations/blob/main/skrifa/README.md)
//! for additional details.
/// Expose our "raw" underlying parser crate.
pub extern crate read_fonts as raw;
pub mod attribute;
pub mod charmap;
pub mod color;
pub mod font;
pub mod instance;
pub mod metrics;
pub mod outline;
#[doc(hidden)]
pub mod scale;
pub mod setting;
pub mod string;
mod provider;
mod small_array;
mod variation;
#[doc(inline)]
pub use outline::{OutlineGlyph, OutlineGlyphCollection};
pub use variation::{Axis, AxisCollection, NamedInstance, NamedInstanceCollection};
/// Useful collection of common types suitable for glob importing.
pub mod prelude {
#[doc(no_inline)]
pub use super::{
font::{FontRef, UniqueId},
instance::{LocationRef, NormalizedCoord, Size},
GlyphId, MetadataProvider, Tag,
};
}
pub use read_fonts::{
types::{GlyphId, Tag},
FontRef,
};
#[doc(inline)]
pub use provider::MetadataProvider;
/// Limit for recursion when loading TrueType composite glyphs.
const GLYF_COMPOSITE_RECURSION_LIMIT: usize = 32;