-(define (white-dot x y radius)
- (embedded-ps (list 'white-dot x y radius)))
-
-(define (beam width slope thick blot)
- (embedded-ps (list 'beam width slope thick blot)))
-
-(define (bracket arch_angle arch_width arch_height height arch_thick thick)
- (embedded-ps (list 'bracket arch_angle arch_width arch_height height arch_thick thick)))
-
-(define (dashed-slur thick dash l)
- (embedded-ps (list 'dashed-slur thick dash `(quote ,l))))
-
-(define (char font i)
- (string-append "\\" (tex-font-command font)
- "\\char" (ly:inexact->string i 10) " "))
-
-(define (dashed-line thick on off dx dy)
- (embedded-ps (list 'dashed-line thick on off dx dy)))
-
-(define (zigzag-line centre? zzw zzh thick dx dy)
- (embedded-ps (list 'zigzag-line centre? zzw zzh thick dx dy)))
-
-(define (ez-ball c l b)
- (embedded-ps (list 'ez-ball c l b)))
-
-
+(define (dashed-slur thick on off lst)
+ (embedded-ps (list 'dashed-slur thick on off `(quote ,lst))))
+
+(define (named-glyph font name)
+ (let* ((info (ly:otf-font-glyph-info font name))
+ (subfont (assoc-get 'subfont info))
+ (subidx (assoc-get 'subfont-index info)))
+
+ ;;(stderr "INFO: ~S\n" info)
+ ;;(stderr "FONT: ~S\n" font)
+ (if (and subfont subidx)
+ (string-append "\\" (tex-font-command-raw
+ subfont
+ (ly:font-magnification font))
+ "\\char" (number->string subidx))
+
+ (begin
+ (ly:warning (_ "cannot find ~a in ~a" name font))
+ ""))))
+
+(define (dashed-line thick on off dx dy phase)
+ (embedded-ps (list 'dashed-line thick on off dx dy phase)))