lilypond-devel
[Top][All Lists]
Advanced

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

Re: Doc addition - make-pango-font-tree


From: Han-Wen Nienhuys
Subject: Re: Doc addition - make-pango-font-tree
Date: Thu, 7 Feb 2008 12:50:07 -0200

2008/2/7, Mats Bengtsson <address@hidden>:

> Keeping the description at a cookbook level, as you propose, is one
> alternative.
> Another alternative is to describe more clearly what the different
> parameters
> actually mean.

So, the e-mail message that Risto cites is a bit on the obtuse side, IMO.

The mechanism is as follows:

 - make-pango-font-tree has a 'factor' argument, which is a scaling factor.  For
a value of 1.0, it sets up fonts at size 12.0 pt.
 - the set-global-staff-size calls make-pango-font-tree implicitly,
such that 20pt corresponds to a factor of 1.0 (text of 12.0pt)
 - if you want to create your own font-tree, you need to pass a
scaling factor, which would be computed as staff-size-in-points/20
 - the myStaffSize was an attempt at explaining this.


> Also, do we really need this silly scaling by 20 for the last parameter?
> Even better, couldn't we get rid of that parameters completely, and make a
> function that figures out the staff size setting in the current module?

This is a good idea.  Have a look at the function

  layout-set-absolute-staff-size-in-module

font.scm; it's a bit tricky because there are various conversions
between internal coordinates (in mm, last time I looked) and user
visible coordinates (in pt, for fonts).

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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