CVSROOT:        /cvsroot/lilypond
Module name:    lilypond
Branch:         
Changes by:     Han-Wen Nienhuys <[EMAIL PROTECTED]>    05/08/25 15:15:41

Modified files:
        .              : ChangeLog 
        lily           : pango-font.cc 
        scm            : define-markup-commands.scm 

Log message:
        (wordwrap-string): use
        text-direction
        (wordwrap-stencils): idem.
        (line): idem..
        (fill-line): idem.
        (wordwrap-stencils): translate last line to right for
        text-direction = LEFT.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.4083&tr2=1.4084&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/pango-font.cc.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scm/define-markup-commands.scm.diff?tr1=1.113&tr2=1.114&r1=text&r2=text

Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.4083 lilypond/ChangeLog:1.4084
--- lilypond/ChangeLog:1.4083   Thu Aug 25 13:36:59 2005
+++ lilypond/ChangeLog  Thu Aug 25 15:15:41 2005
@@ -5,6 +5,8 @@
        (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.
Index: lilypond/lily/pango-font.cc
diff -u lilypond/lily/pango-font.cc:1.40 lilypond/lily/pango-font.cc:1.41
--- lilypond/lily/pango-font.cc:1.40    Thu Aug 25 13:37:00 2005
+++ lilypond/lily/pango-font.cc Thu Aug 25 15:15:41 2005
@@ -221,11 +221,23 @@
 
       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;
@@ -254,16 +266,6 @@
       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;
 }
Index: lilypond/scm/define-markup-commands.scm
diff -u lilypond/scm/define-markup-commands.scm:1.113 
lilypond/scm/define-markup-commands.scm:1.114
--- lilypond/scm/define-markup-commands.scm:1.113       Thu Aug 25 13:37:00 2005
+++ lilypond/scm/define-markup-commands.scm     Thu Aug 25 15:15:41 2005
@@ -465,8 +465,15 @@
            (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))
+             
+           )))
 
       ))
 


_______________________________________________
Lilypond-cvs mailing list
Lilypond-cvs@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-cvs

Reply via email to