+(define-builtin-markup-command (abs-fontsize layout props size arg)
+ (number? markup?)
+ font
+ ()
+ "Use @var{size} as the absolute font size to display @var{arg}.
+Adjusts @code{baseline-skip} and @code{word-space} accordingly.
+
+@lilypond[verbatim,quote]
+\\markup {
+ default text font size
+ \\hspace #2
+ \\abs-fontsize #16 { text font size 16 }
+ \\hspace #2
+ \\abs-fontsize #12 { text font size 12 }
+}
+@end lilypond"
+ (let* ((ref-size (ly:output-def-lookup layout 'text-font-size 12))
+ (text-props (list (ly:output-def-lookup layout 'text-font-defaults)))
+ (ref-word-space (chain-assoc-get 'word-space text-props 0.6))
+ (ref-baseline (chain-assoc-get 'baseline-skip text-props 3))
+ (magnification (/ size ref-size)))
+ (interpret-markup layout
+ (cons `((baseline-skip . ,(* magnification ref-baseline))
+ (word-space . ,(* magnification ref-word-space))
+ (font-size . ,(magnification->font-size magnification)))
+ props)
+ arg)))
+