| Summary: | Replacing space with GSUB code produces wrong rendering | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | akiem | ||||
| Component: | Text | Assignee: | Myles C. Maxfield <mmaxfield> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | mmaxfield, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 451260 [details] Test files to reproduce the described bug 1. replacing space with GSUB code produces wrong rendering The reason for this is the following (explained by Myles Maxfield): This is due to our “charactersTreatedAsSpace” logic. We measure text in differently-sized chunks different places in WebKit, and we want to maintain the invariant that, even if we split up the text and measure word-by-word, that will get the same results as if you measured the whole string including spaces. To do this, we have code in WebKit where we clobber the widths of space glyphs after shaping to set them to be equal to what they were before shaping. Fixing this would be a large architectural change; it’s something I’d like to do eventually, though. For test files please check the attachment.