(wordwrap-stencils): idem.
(line): idem..
(fill-line): idem.
+ (wordwrap-stencils): translate last line to right for
+ text-direction = LEFT.
* scm/define-grob-properties.scm (all-user-grob-properties): add
text-direction.
Stencil item_stencil = pango_item_string_stencil (item, str, x);
+
/*
UGH. Is this correct for bidi?
*/
x = item_stencil.extent (X_AXIS)[RIGHT];
+#if 0 /* Check extents. */
+ if (!item_stencil.extent_box ()[X_AXIS].is_empty ())
+ {
+ Stencil frame = Lookup::frame (item_stencil.extent_box (), 0.1, 0.1);
+ Box empty;
+ empty.set_empty ();
+ Stencil dimless_frame (empty, frame.expr ());
+ dest.add_stencil (frame);
+ }
+#endif
+
dest.add_stencil (item_stencil);
ptr = ptr->next;
return Stencil (b, exp);
}
-#if 0 /* Check extents. */
- if (!dest.extent_box ()[X_AXIS].is_empty ())
- {
- Stencil frame = Lookup::frame (dest.extent_box (), 0.1, 0.1);
- Box empty;
- empty.set_empty ();
- Stencil dimless_frame (empty, frame.expr ());
- dest.add_stencil (frame);
- }
-#endif
return dest;
}
(loop (cons line lines)
(cdr line-break))
- (reverse (cons line lines))
- ))
+ (begin
+ (if (= text-dir LEFT)
+ (set! line
+ (ly:stencil-translate-axis line
+ (- line-width (interval-end (ly:stencil-extent line X)))
+ X)))
+ (reverse (cons line lines))
+
+ )))
))