- (set! family (match:substring match 1))
- (if (< 0 (string-length (match:substring match 2)))
- (set! style (match:substring match 2)))
- (set! size
- (string->number (match:substring match 3))))
-
+ (set-attribute 'font-family (match:prefix match))
+ (if (string? (match:substring match 1))
+ (set-attribute 'font-weight "bold"))
+ (if (string? (match:substring match 2))
+ (set-attribute 'font-style "italic"))
+ (if (string? (match:substring match 3))
+ (set-attribute 'font-variant "small-caps"))
+ (set-attribute 'font-size
+ (/ (string->number (match:substring match 4))
+ lily-unit-length))
+ (set-attribute 'text-anchor "start")
+ (set-attribute 'fill "currentColor"))