use-readable-text 0.0.1

Primitive readable text sizing and measure helpers
Documentation
  • Coverage
  • 7.14%
    1 out of 14 items documented1 out of 9 items with examples
  • Size
  • Source code size: 6.33 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 391.49 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 38s Average build duration of successful builds.
  • all releases: 38s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-accessibility
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

Primitive readable text sizing and measure helpers.

These are practical utility thresholds, not a full typography system.

Examples

use use_readable_text::{
    TextSize, characters_per_line, is_line_height_readable, is_measure_readable,
    line_height_ratio,
};

let text = TextSize::new(16.0, 24.0).unwrap();
let characters = characters_per_line(560.0, 8.0).unwrap();

assert_eq!(line_height_ratio(16.0, 24.0).unwrap(), 1.5);
assert_eq!(text.line_height_ratio(), 1.5);
assert!(is_line_height_readable(16.0, 24.0).unwrap());
assert_eq!(characters, 70.0);
assert!(is_measure_readable(characters).unwrap());