On Thu, 2004-08-26 at 08:28, Daniel Glassey wrote: > Hi, > I can see from bug #62014 that pango was changed to shape each character > at most twice in pango-layout.c:process_item/insert_run/shape_run. I'm > trying to work out why the second one still needs to be done and why > pango_glyph_item_split isn't used. There is no guarantee that characters will never interact across a line break point. This is especially true when character-wrapping is on ... simple case, consider character wrapping on for English and breaking in the middle of a 'fi' ligature. > There is a line that says: > /* Shaped items should never be broken */ > g_assert (!shape_set); > so I'm guessing there may be a good reason but the assert is strange > because shape_set is always false. shape_set is for PangoAttrShape, which is used for something like inserting an image into the text ... when you want to say - leave 20x30 pixels for this character and don't draw it. > I'm looking at this because shaping is particularly expensive with > graphite, though even the basic shaper is a big hit. If there isn't a > reason to not do it I'll investigate using pango_glyph_item_split and > submit a bug etc later. We theoretically could add some sort of per-shaper flag which said "this shaper never will reshape at line break points", though since the shaper doesn't have the line break point information, it's sort of a difficult guarantee to make. Hmm, I suppose what we could do instead is have a PangoVisAttr flag which says "breaking before this glyph won't cause reshaping". If you want to experiment, that's the approach I'd recommend. Regards, Owen
Attachment:
signature.asc
Description: This is a digitally signed message part