[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
absolute baseline-skip
From: |
Karol Majewski |
Subject: |
absolute baseline-skip |
Date: |
Sun, 20 Jul 2014 18:36:10 +0200 |
Hi,
I'm trying to redefine abs-fontsize from define-markup-commands.scm, so that
baseline-skip is also absolute. Current behavior is that with abs-fontsize,
baseline-skip scales to global-staff-size, which I don't like. I know that
there was attempt made by Nicolas Sceaux
(http://lilypond.1069038.n5.nabble.com/Markup-in-absolute-font-size-td34087.html),
but no solution there. Here's original code:
#(define-markup-command (abs-fontsize layout props size arg)
(number? markup?)
#:category font
(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)))
If you have any ideas, please share! Perhaps something like abs-baseline-skip
is needed?
--Karol
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- absolute baseline-skip,
Karol Majewski <=