I am trying to match on the whitespace enum, but it appears that parsing any kind of tab (unicode, control, etc) doesn't appear to match the Whitespace::Tab variant.
Code to reproduce:
let font_size = 16.;
let mut shape_context = ShapeContext::new();
let mut shaper = shape_context
.builder(*font_ref)
.script(Script::Latin)
.size(font_size)
.direction(Direction::LeftToRight)
.build();
// 4 variants of how to input a `tab`
shaper.add_str("\t\u{0009} \u{2B7E}");
shaper.shape_with(|glyph_cluster| {
let info = glyph_cluster.info;
println!("got INFO: '{:?}'", info.0);
println!("got whitespace: '{:?}'", info.whitespace());
});
I am trying to match on the whitespace enum, but it appears that parsing any kind of tab (unicode, control, etc) doesn't appear to match the
Whitespace::Tab
variant.Code to reproduce:
What it does:
What I expect it to do:
I am using the
Roboto-Regular.ttf
font.