If the CSS white-space property is inhibiting line breaking, we might find end of-line characters rendered via the complex text path. Fonts don't provide glyphs for these code points so, if we find one, we simulate the space glyph being interposed in this case. Because the input is variable-length per code point, we walk the input in step with the output.
Created attachment 32200 [details] patch
Comment on attachment 32200 [details] patch Yay for nice ChangeLogs! :) I believe the { goes on the same line as the enum: +enum +{ Nice use of self-documenting constants, btw. :) Looks fine. I'll ask you in person to make sure we're doing this in a similar manner to the other complex text paths (which I know have similar code).
Comment on attachment 32200 [details] patch Adam and I discussed this in person and he decided this would require further revision.
Created attachment 32201 [details] patch After testing with some of the other values that I believed should be substituted for spaces, it seems that treatAsSpace is correct. None of the other values are causing issues. Either they are handled somewhere else, or the font's cmap is handling them.
Comment on attachment 32201 [details] patch LGTM.