\version "2.14.2"

#(define (bold-tenuto-script-stencil grob)
   (let*
     ((scale (magstep (ly:grob-property grob 'font-size 0)))
      (dir (ly:grob-property grob 'direction 0))
      (script-stencil (ly:grob-property grob 'script-stencil))
      (tenuto-width 0.25) ;;; alter this value to modify the line width of the tenuto
      (tenuto-length 1.5) ;;; alter this value to modify the line length of the tenuto
      (tl (* -0.5 tenuto-length))
      (tr (* 0.5 tenuto-length))
      (ten-sil (make-line-stencil (* scale tenuto-width) (* scale tl) 0.0 (* scale tr) 0.0))
      (dot-sil (make-circle-stencil (* scale 0.15) (* scale 0.1) #t))
      (por-sil (ly:stencil-combine-at-edge ten-sil 1 (* -1 dir) dot-sil (* scale 0.4))))
   (if (and (pair? script-stencil) (pair? (cdr script-stencil)))
     (let* ((rv (cdr script-stencil))
            (script-type (if (<= dir 0) (car rv) (cdr rv))))
        (cond ((equal? script-type "tenuto")
               ten-sil)
              ((or (equal? script-type "uportato") (equal? script-type "dportato"))
               por-sil)
              (else (ly:script-interface::print grob))))
     (ly:script-interface::print grob))))

% define globally
\layout {
  \context {
    \Voice
    \override Script #'stencil = #bold-tenuto-script-stencil
  }
}
%%% End of my private include file "bold-tenuto.ly"

{
  % alternatively: override locally (in voice)
  % \override Script #'stencil = #bold-tenuto-script-stencil
  c'--^"bold tenuto / portato:" d'-- f'-- c''--
  c'-_ d'-_ f'-_ c''-_ \bar "||"
  \revert Script #'stencil
  c'--^"original design:" d'-- f'-- c''--
  c'-_ d'-_ f'-_ c''-_ \bar "||"
}

