]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/stencil.scm
Rename Font_metric::get_indexed_char() to
[lilypond.git] / scm / stencil.scm
index 84206422dcda99264a9f0f1e416a838f1d4d3ade..5e32f1efbb6896f918631269661f7482297ed683 100644 (file)
@@ -95,6 +95,10 @@ the more angular the shape of the parenthesis."
          (if (< width 0)
              (- width)
              0))
+         ;; X value farthest from baseline on outside  of curve
+         (outer-x (+ base-x width))
+         ;; X extent of bezier sandwich centerline curves
+         (x-extent (ordered-cons base-x outer-x))
         (bottom-y (interval-start y-extent))
         (top-y (interval-end y-extent))
 
@@ -106,7 +110,6 @@ the more angular the shape of the parenthesis."
                             (if (< width 0)
                                 half-thickness
                                 (- half-thickness))))
-        (x-extent (ordered-cons base-x outer-control-x))
 
         ;; Vertical distance between a control point
         ;; and the end point it connects to.
@@ -313,21 +316,6 @@ encloses the contents.
     (set! stencil (ly:stencil-add outer inner))
     stencil))
 
-
-(define-public (fontify-text font-metric text)
-  "Set TEXT with font FONT-METRIC, returning a stencil."
-  (let* ((b (ly:text-dimension font-metric text)))
-    (ly:make-stencil
-     `(text ,font-metric ,text) (car b) (cdr b))))
-
-(define-public (fontify-text-white scale font-metric text)
-  "Set TEXT with scale factor SCALE"
-  (let* ((b (ly:text-dimension font-metric text))
-        ;;urg -- workaround for using ps font
-         (c `(white-text ,(* 2 scale) ,text)))
-    ;;urg -- extent is not from ps font, but we hope it's close
-    (ly:make-stencil c (car b) (cdr b))))
-
 (define-public (stencil-with-color stencil color)
   (ly:make-stencil
    (list 'color color (ly:stencil-expr stencil))