[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
our quadratic triangle
From: |
Robin Bannister |
Subject: |
our quadratic triangle |
Date: |
Mon, 25 Jan 2021 22:03:41 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Hallo there
The markup command \triangle has been around since 2005.
The ChordName code guarantees its regular use as a major-seventh option.
This command has a severe bug, as demonstrated by the following code:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% same behaviour from 2.8.8 to 2.22.0
\markup {
\fontsize #-6 { "-6" \triangle ##f }
\fontsize #-4 { "-4" \triangle ##f }
\fontsize #-2 { "-2" \triangle ##f }
\fontsize # 0 { " 0" \triangle ##f }
\fontsize #+2 { "+2" \triangle ##f }
\fontsize #+4 { "+4" \triangle ##f }
\fontsize #+6 { "+6" \triangle ##f }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
quadratic.pdf shows that the triangle is ok at fontsize 0 but
- at smaller fontsizes it is too small
- at larger fontsizes it is too large.
I suppose most people use a ChordName font size close to its default.
The triangle may occasionally appear a bit odd to some. But who is to
say it is actually wrong when there are so many ChordName opinions around?
Looking inside, the triangle size is derived from baseline-skip to which
a magstep scaling is applied. But since the baseline-skip distance is
already scaled to the fontsize, the resulting scaling is quadratic.
On the other hand the line thickness stays unaffected by fontsize.
So it looks like the magstep scaling was applied to the wrong property.
Commit 136bdc3c4835942f396d57ac78df71d97c43d3e8 indicates what we should
expect:
> new command, as robust replacement for unicode Delta/Triangle.
Cheers,
Robin
quadratic.pdf
Description: Adobe PDF document
- our quadratic triangle,
Robin Bannister <=