lilypond-user
[Top][All Lists]
Advanced

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

Re: How to prevent ly:stencil-rotate to modify dimensions


From: David Kastrup
Subject: Re: How to prevent ly:stencil-rotate to modify dimensions
Date: Mon, 12 Mar 2018 13:54:45 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Torsten Hämmerle <address@hidden> writes:

> David Kastrup wrote
>> Torsten Hämmerle &lt;
>
>> torsten.haemmerle@
>
>> &gt; writes:
>> [...]
>>> Yes, I know, but this code was meant for text in the first place and it's
>>> quite common for slanted characters to stick out of their bounding boxes
>>> to
>>> the left to the right. Unfortunately, there are no slanted bounding boxes
>>> (the are always upright"
>>> But the main reason behind is that 
>>> \slanted "one two three" 
>>> should give the same result as 
>>> \slanted { "one" "two" "three" }
>> 
>> Uh, no?
>> 
>> \slanted "one two three"
>> 
>> should likely give the same result as
>> 
>> \slanted \line { "one" "two" "three" }
>> 
>> but
>> 
>> \slanted { "one" "two" "three" }
>> 
>> is exactly equivalent to
>> 
>> { \slanted "one" \slanted "two" \slanted "three" }
>> 
>> and is connected with unslanted spaces.
>
> Sorry for my misleading wording.
> When saying "should give the same result" what I really meant was "should
> produce the same visual result".
> If I had widened the resulting stencil in order to prevent "slanted" text
> stick out to the left and the right, this would have resulted in a wider
> spacing when applied to separate chunks.
>
> And, additionally, it is perfectly common for a (true) slanted/italic
> character to protrude out of its box.

So?


> David Kastrup wrote
>>> and when separately applying \slanted to "one", "two", and "three", a
>>> widened box would lead to a wider spacing.
>> 
>> This _is_ separately applying \slanted to "one", "two", and "three".
>
> Yes, it certainly is, that's why I mentioned it. But it should not lead to a
> wider spacing, exactly like 
> \italic "This is a sample text" or \italic \line { This is a sample text }
> and
> \italic { This is a sample text }
> will have visually identical spacing

It turns out that

\markup \box \with-dimensions-from \italic "This is a sample text" \null
\markup \box \with-dimensions-from \italic \line { This is a sample text } \null
\markup \box \with-dimensions-from \line \italic { This is a sample text } \null

has only the first box slightly larger: so in either of the two cases
below, text spaces appears to be done by LilyPond based on the
dimensions of the individual words (and disregarding the font in use)
while the first line uses Pango(?) for rendering, producing a longer
result.

Serious case of "huh" here.

-- 
David Kastrup



reply via email to

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