Word wrap for variable width fonts.
Can provide split lines or positions for each character.
Lines Split
use Face;
use ;
// Load a TrueType font using `ttf_parser`
let font_data = read.expect;
let font_face = from_slice.expect;
let measure = new;
// Set up wrapping options, split on whitespace:
let word_wrap = new;
// Use the `Wrap` trait and split the `&str`
let poem = "Mary had a little lamb whose fleece was white as snow";
let lines: = poem.wrap.collect;
assert_eq!;
Positions for each character
use Face;
use ;
// Load a TrueType font using `ttf_parser`
let font_data = read.expect;
let font_face = from_slice.expect;
let measure = new;
// Set up wrapping options, split on whitespace:
let word_wrap = new;
// Use the `Wrap` trait and split the `&str`
let poem = "Mary had a little lamb whose fleece was white as snow";
let positions: = poem.wrap_with_position.collect;
// offset is in the unit (em) of the TTFParserMeasure.
assert_eq!;