From: Han-Wen Nienhuys Date: Sun, 27 Nov 2005 13:40:31 +0000 (+0000) Subject: (pango_item_string_stencil): put X-Git-Tag: release/2.7.21~30 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=aa23e460ca96734a29387c163e75db4f3980d13f;p=lilypond.git (pango_item_string_stencil): put geometry.width into glyph-string too. --- diff --git a/ChangeLog b/ChangeLog index 2dd0d0fd8d..8d0a694704 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-27 Han-Wen Nienhuys + + * lily/pango-font.cc (pango_item_string_stencil): put + geometry.width into glyph-string too. + 2005-11-26 Nicolas Sceaux * scm/define-music-display-methods.scm (RevertProperty): diff --git a/lily/pango-font.cc b/lily/pango-font.cc index 0bf15d4925..5f4950ae93 100644 --- a/lily/pango-font.cc +++ b/lily/pango-font.cc @@ -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); diff --git a/scm/output-gnome.scm b/scm/output-gnome.scm index c26e6cb94c..db1a496616 100644 --- a/scm/output-gnome.scm +++ b/scm/output-gnome.scm @@ -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 #: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) diff --git a/scm/output-ps.scm b/scm/output-ps.scm index e06bca5863..69841514e5 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -136,7 +136,7 @@ (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" @@ -150,19 +150,21 @@ 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))