[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Absolute size for \epsfile, i.e. independent of global-staff-size
From:       Marc Hohl <marc () hohlart ! de>
Date:       2014-04-28 7:45:59
Message-ID: 535E0737.7040307 () hohlart ! de
[Download RAW message or body]

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.

HTH,

Marc

>
> Rutger Hofman
> Amsterdam
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic