#![no_std]
#![warn(missing_docs)]
#[cfg(feature = "std")]
extern crate std;
extern crate alloc;
mod hb;
pub use ttf_parser;
pub use hb::buffer::hb_glyph_info_t as GlyphInfo;
pub use hb::buffer::{GlyphBuffer, GlyphPosition, UnicodeBuffer};
pub use hb::common::{script, Direction, Feature, Language, Script, Variation};
pub use hb::face::hb_font_t as Face;
pub use hb::ot_shape_plan::hb_ot_shape_plan_t as ShapePlan;
pub use hb::shape::{shape, shape_with_plan};
bitflags::bitflags! {
#[derive(Default, Debug, Clone, Copy)]
pub struct BufferFlags: u32 {
const BEGINNING_OF_TEXT = 0x00000001;
const END_OF_TEXT = 0x00000002;
const PRESERVE_DEFAULT_IGNORABLES = 0x00000004;
const REMOVE_DEFAULT_IGNORABLES = 0x00000008;
const DO_NOT_INSERT_DOTTED_CIRCLE = 0x00000010;
const VERIFY = 0x00000020;
const PRODUCE_UNSAFE_TO_CONCAT = 0x00000040;
const PRODUCE_SAFE_TO_INSERT_TATWEEL = 0x00000040;
const DEFINED = 0x000000FF;
}
}
#[allow(missing_docs)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum BufferClusterLevel {
MonotoneGraphemes,
MonotoneCharacters,
Characters,
}
impl Default for BufferClusterLevel {
#[inline]
fn default() -> Self {
BufferClusterLevel::MonotoneGraphemes
}
}
bitflags::bitflags! {
#[derive(Default)]
pub struct SerializeFlags: u8 {
const NO_CLUSTERS = 0b00000001;
const NO_POSITIONS = 0b00000010;
const NO_GLYPH_NAMES = 0b00000100;
const GLYPH_EXTENTS = 0b00001000;
const GLYPH_FLAGS = 0b00010000;
const NO_ADVANCES = 0b00100000;
const DEFINED = 0b00111111;
}
}