lilypond-user
[Top][All Lists]
Advanced

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

Re: Absolute size for \epsfile, i.e. independent of global-staff-size


From: Rutger Hofman
Subject: Re: Absolute size for \epsfile, i.e. independent of global-staff-size
Date: Tue, 29 Apr 2014 11:00:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 04/28/2014 09:45 AM, Marc Hohl wrote:
Am 28.04.2014 00:08, schrieb Rutger Hofman:
Good evening list,

I want to include a title page w/ an \epsfile image in a number of files
(score, parts), where the point size for the files may differ: score has
smaller font than parts, basically. Now I want to write one include file
that makes the title page, and I want that title page to be independent
of the point size of the lilypond file. I can get that done for markups
(\abs-fontsize works fine), but I don't know how I can do it for the
image from the \epsfile: it scales with the font size.

Suggestions? If there is no direct way, then maybe a way to
programmatically query the font size and correct for that?

Hi, I used something like that in one of my projects:

#(define-markup-command (epsfile-mm layout props axis size file-name)
   (number? number? string?)
   (let* ((o-s (ly:output-def-lookup layout 'output-scale))
          (scaled-size (abs (/ size o-s))))
   (if (ly:get-option 'safe)
       (interpret-markup layout props "not allowed in safe")
       (eps-file->stencil axis scaled-size file-name)
       )))

It works like \epsfile but assumes the dimensions are in mm.

Thanks, works perfectly!

Rutger

HTH,

Marc


Rutger Hofman
Amsterdam




reply via email to

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