use-typography-measure 0.0.1

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

Primitive readable measure helpers.

The helpers here focus on character-count estimates, not a full text layout engine.

Examples

use use_measure::{Measure, characters_per_line, container_width_for_measure, is_readable_measure};

let measure = Measure::new(66.0).unwrap();

assert_eq!(measure.characters_per_line(), 66.0);
assert!(measure.is_readable());
assert_eq!(characters_per_line(528.0, 8.0).unwrap(), 66.0);
assert_eq!(container_width_for_measure(66.0, 8.0).unwrap(), 528.0);
assert!(is_readable_measure(66.0).unwrap());