#![deny(missing_docs)]
pub mod backend;
pub(crate) mod bidi;
pub mod bounds_cache;
pub(crate) mod cluster;
pub mod deferred_font;
pub mod dilation;
pub mod error;
pub mod font_handle;
pub mod glyph_cache;
pub mod glyph_geometry;
pub mod line_layout_cache;
pub(crate) mod linebreak;
pub mod multiline;
pub mod paragraph;
pub mod platform;
pub mod run_builder;
pub mod types;
pub use backend::{Font, TextBackend};
pub use bounds_cache::RasterBoundsCache;
pub use deferred_font::{CharacterSet, DeferredFont};
pub use dilation::{MAX_DILATION, compute_dilation, compute_dilation_srgb, dilate_bounds};
pub use error::TextError;
pub use font_handle::FontHandle;
pub use glyph_cache::GlyphCache;
pub use glyph_geometry::{
byte_at_pixel_x, pixel_x_at_byte, run_byte_at_x, run_caret_x, run_caret_x_at,
run_caret_x_at_affinity, run_selection_rects, visual_caret_step, visual_line_edge,
};
pub use line_layout_cache::{LineLayoutCache, hash_text};
pub use multiline::{
MultilineLayout, ShapedDocument, ShapedParagraph, VisualLine, shape_document, wrap_document,
};
pub use paragraph::{
ShapedWord, compute_alignment_offset, greedy_wrap, shape_line_bidi, shape_words,
truncate_with_ellipsis, wrap_shaped_words,
};
pub use run_builder::TextRunBuilder;
pub use types::{
Affinity, CachedGlyph, Direction, FontDescriptor, FontId, FontMetrics, FontStyle, GlyphBitmap,
GlyphBounds, GlyphMetrics, RunSpan, ShapedGlyph, ShapedLine, TextAlignment,
};
pub const TEST_FONT: &[u8] = include_bytes!("../assets/dejavu-sans.ttf");
pub const DEJAVU_SANS_LICENSE: &str = include_str!("../assets/LICENSE-DejaVu");
pub const BUNDLED_CJK_JP_FONT: &[u8] = include_bytes!("../assets/NotoSansJP-Regular.otf");
pub const NOTO_SANS_JP_LICENSE: &str = include_str!("../assets/LICENSE-NotoSansJP");
#[cfg(target_os = "windows")]
pub use platform::windows::DirectWriteBackend;
#[cfg(target_os = "macos")]
pub use platform::macos::CoreTextBackend;