use super::FontTag;
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum FontQuery<T> {
Unsupported,
Supported(T),
}
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct OpenTypeFeatureInfo {
pub tag: FontTag,
pub substitution: bool,
pub positioning: bool,
}
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub struct FontCapabilities {
pub feature_introspection: bool,
pub axis_introspection: bool,
pub static_variations: bool,
}
#[derive(Clone, Debug, PartialEq)]
pub struct VariationAxisInfo {
pub tag: FontTag,
pub min_value: f32,
pub default_value: f32,
pub max_value: f32,
pub hidden: bool,
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn unsupported_backend_is_not_an_empty_success() {
let text = crate::TextSystem::new(std::sync::Arc::new(crate::NoopTextSystem::new()));
assert_eq!(
text.opentype_features(crate::FontId(0)).unwrap(),
FontQuery::Unsupported
);
}
}