Expand description
Shaperglot is a library for checking a font’s language support.
Unlike other language coverage tools, shaperglot is based on the idea that the font must not simply cover Unicode codepoints to support a language but must also behave in certain ways. Shaperglot does not dictate particular implementations of language support, in terms of what glyphs or rules are present in the font or how glyphs should be named, but tests a font for its behaviour.
§Example
use shaperglot::{Checker, Languages, Provider};
fn test_font(font_binary: &[u8]) {
let font = Checker::new(font_binary).expect("Failed to load font");
let languages = Languages::new();
for language in languages.iter() {
let results = font.check(language);
println!("{}", results.to_summary_string(language));
}
}
Re-exports§
pub use crate::checks::Check;
Modules§
- checks
- Low-level checks and their implementations
Structs§
- Check
Result - The result of an individual check
- Checker
- The context for running font language support checks
- Language
- A language definition, including checks and exemplar characters
- Languages
- The language database
- Problem
- A problem found during a sub-test of a check
- Reporter
- A collection of check results
Enums§
- Result
Code - A code representing the overall status of an individual check
- Support
Level - Represents different levels of support for the language
Traits§
- Provider
- A provider of checks for a language
Type Aliases§
- GlyphId
- A glyph ID.