]> git.donarmstrong.com Git - lilypond.git/commitdiff
(pango_item_string_stencil): put
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 27 Nov 2005 13:40:31 +0000 (13:40 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 27 Nov 2005 13:40:31 +0000 (13:40 +0000)
geometry.width into glyph-string too.

ChangeLog
lily/pango-font.cc
scm/output-gnome.scm
scm/output-ps.scm

index 2dd0d0fd8d3bedcc4cdd0c5a0a5aad0b72f96bb9..8d0a6947046d42a0379e71ac9be23e6f6c41d8fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-27  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/pango-font.cc (pango_item_string_stencil): put
+       geometry.width into glyph-string too.
+
 2005-11-26  Nicolas Sceaux  <nicolas.sceaux@free.fr>
 
        * scm/define-music-display-methods.scm (RevertProperty):
index 0bf15d4925649c6d225808ff6a4e98c6cf6e653f..5f4950ae93a9e83aba4102c37b35d934312f216f 100644 (file)
@@ -125,8 +125,10 @@ Pango_font::pango_item_string_stencil (PangoItem const *item, String str) const
       else
        char_id = scm_makfrom0str (glyph_name);
       
-      *tail = scm_cons (scm_list_3 (scm_from_double (ggeo.x_offset * scale_),
+      *tail = scm_cons (scm_list_4 (scm_from_double (ggeo.width * scale_),
+                                   scm_from_double (ggeo.x_offset * scale_),
                                    scm_from_double (ggeo.y_offset * scale_),
+                                   
                                    char_id),
                        SCM_EOL);
       tail = SCM_CDRLOC (*tail);
index c26e6cb94c5766ab9c3cbabc951f038c2807e284..db1a496616f9a95294497770be336b42df8f554f 100644 (file)
@@ -248,14 +248,14 @@ lilypond -fgnome input/simple-song.ly
 ;; FIXME: the framework-gnome backend needs to see every item that
 ;; gets created.  All items created here must should be put in a group
 ;; that gets returned.
-(define (glyph-string font postscript-font-name x-y-named-glyphs)
+(define (glyph-string font postscript-font-name w-x-y-named-glyphs)
   (for-each
    (lambda (x)
 
      ;; UGR, glyph names not found
      (stderr "GLYPH:~S\n" (caddr x))
      (stderr "ID:~S\n" (ly:font-glyph-name-to-charcode font (caddr x)))
-     (placebox (car x) (cadr x)
+     (placebox (cadr x) (caddr x)
               (make <gnome-canvas-text>
                 #:parent (canvas-root)
                 ;;#:x 0.0 #:y (if (music-font? font) 0.15 0.69)
@@ -266,8 +266,8 @@ lilypond -fgnome input/simple-song.ly
                 #:size-set #t
                 #:text
                 (integer->utf-8-string
-                 (ly:font-glyph-name-to-charcode font (caddr x))))))
-   x-y-named-glyphs))
+                 (ly:font-glyph-name-to-charcode font (cadddr x))))))
+   w-x-y-named-glyphs))
 
 (define (grob-cause offset grob)
   grob)
index e06bca586302b5454ab92f94a21dcdd2b8149ec9..69841514e5d2d0f6d0378481104a71c9ec4325c9 100644 (file)
 (define (glyph-string
         postscript-font-name
         size cid?
-        x-y-named-glyphs)
+        w-x-y-named-glyphs)
 
   (format #f "gsave 1 output-scale div 1 output-scale div scale
   /~a ~a ~a scalefont setfont\n~a grestore"
           string-append
           (map (lambda  (item)
                  (let*
-                     ((x (car item))
-                      (y (cadr item))
-                      (g (caddr item))
+                     ((w (car item))
+                      (x (cadr item))
+                      (y (caddr item))
+                      (g (cadddr item))
                       (prefix (if  (string? g) "/" "")))
 
                    (if (and (= 0.0 x)
                             (= 0.0 y))
-                       (format #f " ~a~a glyphshow\n" prefix g)
+;                      (format #f " ~a~a glyphshow\n" prefix g)
+                       (format #f " gsave ~a~a glyphshow grestore ~a 0 rmoveto \n" prefix g w)
                        (format #f " ~a ~a rmoveto ~a~a glyphshow\n"
                                x y
                                prefix
                                g))))
-               x-y-named-glyphs))))
+               w-x-y-named-glyphs))))
 
 (define (grob-cause offset grob)
   (let* ((cause (ly:grob-property grob 'cause))