bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changing fonts with global staff size other than 20 leads to scaling pro


From: Arle Lommel
Subject: Changing fonts with global staff size other than 20 leads to scaling problems
Date: Fri, 14 Dec 2012 10:45:50 +0100

(Lilypond 2.16.1)

http://lilypond.org/doc/v2.16/Documentation/notation/fonts contains 
instructions on how to change default document fonts. The instructions require 
hard coding a staff size of some sort. However, if the global staff size is set 
to a value other than 20, the scaling of note heads and other objects is wrong.

\paper {
        myStaffSize = #20
        #(define fonts
        (make-pango-font-tree "Minion Pro"
                "Minion Pro"
                "Minion Pro"
                (/ myStaffSize 20)
        ))
}

It appears that if myStaffSize = #xx is set so that xx = the global staff size, 
but the value 20 in (/ myStaffSize 20) is left alone, then display works as 
expected.

While clarifying in the documentation what the values are and how to use them 
would be a start, the mechanism for font selection should be scale independent. 
While there may be (have been?) an internal logic to handle it this way, the 
effect is that of a bug for a user who does not already know how this 
(undocumented) bit should be adjusted.

So there is a workaround, but it is non-intuitive and requires updating 
information in two places to change the global staff size (or defining a 
variable and using it), and I would argue that the font selection mechanism at 
this level should be scale independent.

Best regards,

Arle

reply via email to

[Prev in Thread] Current Thread [Next in Thread]