lilypond-devel
[Top][All Lists]
Advanced

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

Relation between units in source code and SVG output


From: Peter Bjuhr
Subject: Relation between units in source code and SVG output
Date: Mon, 07 Apr 2014 17:08:58 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Dear LilyPond developers,

as some of you may already know we have in Frescobaldi started to develop a tool where the user could graphically set offsets, change the curve of slurs and so forth. For this purpose we're using a SVG viewer where the user can change certain elements. In order to see what can be done I've today done some testing of how offsets in the code affects the SVG output.

When you set an offset like this:
\override TextScript.extra-offset = #'(0.3 . 0.3)

The unit of the change is as I understand it staff spaces. From using different staff sizes I've concluded that the unit in the SVG file is also staff spaces, so when I set an offset of 0.3 in the code the difference in the SVG file will also be 0.3.

(In the SVG definition I read:

The supported length unit identifiers are: em, ex, px, pt, pc, cm, mm, in, and percentages.

I guess relational units as em or even % could equal staff spaces in this case...)

Except wanting to confirm that I'm making the right conclusions here, my question is: could we always count on such a simple relation between the unit used to make layout changes in the code and the units used in the SVG file or there are exceptions to this? We will of course find this out eventually but we're keen to learn more of the potential of this approach.

Best
Peter


reply via email to

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