LLM contribution: Fable for investigation and to generate test.
If a font is missing non breaking space (U+00A0), HarfRust shapes them in the same way as a space (if the font supports that). This also applies for some different space characters (Claude claims U+2000..=U+200A, U+205F, but not U+3000 - https://crbug.com/1193282).
I believe this is a Parley level font selection question, rather than a Parley Core (soon to be Engine) thing?
Reproduction failing test (Fable authored, based on our Roboto not having NARROW NO-BREAK SPACE):
#[test]
fn space_like_char_missing_from_font_should_not_trigger_fallback() {
let mut env = TestEnv::new(test_name!(), None);
let text = "a\u{202F}b";
let mut builder = env.ranged_builder(text);
builder.push_default(StyleProperty::FontSize(2048.0));
let mut layout = builder.build(text);
layout.break_all_lines(None);
let num_runs: usize = layout.lines().map(|line| line.runs().count()).sum();
assert_eq!(
num_runs, 1,
"U+202F was itemized to a fallback font instead of using Roboto's space glyph"
);
assert_eq!(layout.width(), 2516.0);
}
LLM contribution: Fable for investigation and to generate test.
If a font is missing non breaking space (U+00A0), HarfRust shapes them in the same way as a space (if the font supports that). This also applies for some different space characters (Claude claims U+2000..=U+200A, U+205F, but not U+3000 - https://crbug.com/1193282).
I believe this is a Parley level font selection question, rather than a Parley Core (soon to be Engine) thing?
Reproduction failing test (Fable authored, based on our Roboto not having NARROW NO-BREAK SPACE):