support per-line attributes
Submitted by Benjamin Otte (Company)
Link to original bug (#534305)
Description
The following is a Flash problem, where it would be nice to have support from Pango. Markup in Flash (which uses an html-like xml syntax) can have the properties listed in http://www.brajeshwar.com/reference/as2/TextFormat.html These properties can be classified into 3 types of when they take effect: immediately, next paragraph or next line. Immediate attributes are a subset of what PangoAttribute currently implements. Paragraph attributes are indent and bullet. As Swfdec constructs a new layout for a new paragraph anyway, those are easy to implement.
The only thing not nicely supported by Pango is the per-line attributes: left and right margin, alignment, spacing and tab stops. It would be nice if there was a way to specify these and have the PangoLayout automatically use them on the next line. Our current code[1] always constructs a new PangoLayout after a per-line attribute change, which feels rather hacky, especially because the line break is computed by Pango.
[1] The current Swfdec implementation of Flash's text layouting is at http://gitweb.freedesktop.org/?p=swfdec/swfdec.git;a=blob;f=swfdec/swfdec_text_layout.c - the header file and swfdec_text_(buffer|attributes).[ch] might be of interest when reading that.