Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWebrender should be able to display a ligature with two different colors. #622
Comments
|
I'm not sure how this works in Gecko. @jfkthame probably knows or could more easily say where to look. |
|
Gecko collects text from a list of frames into a single textrun for shaping, so effects like ligatures can still occur across frame boundaries; see the BuildTextRunsScanner class in layout/generic/nsTextFrame.cpp. We'll only start a new textrun (and therefore interrupt shaping) if styles that would impact shaping don't match, such as the various |
|
When it comes to rendering the ligature at such a boundary (a separate issue from whether the ligature is formed at all, which is the problem those webkit/blink bugs are about), we have code in gfx/thebes/gfxTextRun.cpp to render partial ligatures when the range to be drawn (i.e. the section of the textrun corresponding to a particular element with a certain color) includes part of a ligated cluster of characters at the beginning or end. See gfxTextRun::Draw and its helper gfxTextRun::DrawPartialLigature. |
|
The plan is for the client code to do this with clip rects. Please re-open if anything is needed from WR to handle this. |
Asked @glennw about this today, and decided that it was worth to open an issue.
I don't know who the relevant Gecko person is to know about this, maybe @jrmuizel?
This is one of the most annoying WebKit/Blink bugs I've ever found, there are multiple test cases in:
Reference test case: http://jsfiddle.net/xs5knzzd/5/