[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: our quadratic triangle
From: |
Robin Bannister |
Subject: |
Re: our quadratic triangle |
Date: |
Wed, 27 Jan 2021 14:31:21 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Hallo again
In the meantime it has occurred to me that moving the gratuitous magstep
scaling from baseline-skip over to thickness is perhaps not the answer.
Since the triangle is applied mainly as a glyph it should not respond to
overrides on those two properties. Consider squashing a vertical column
by reducing its baseline-skip; a triangle somewhere in the column would
be resized, unlike any of its font neighbors.
So what about a markup that ignores all properties except the font size?
It could offer some flexibilty via parameters, eg:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#(define-markup-command (delta-bhr layout props b-cents h-cents r-cents)
(number? number? number?)
#:properties ((font-size 0))
(let* (
(cent (/ (magstep font-size) 100))
(base (* b-cents cent))
(height (* h-cents cent))
(radius (* r-cents cent)) ; of dot
(thickness (* 2 radius))) ; of line
(ly:make-stencil `(polygon
; '(0.0 ,radius ,base ,radius ,(* 0.5 base) ,(+ height radius)) ;old
(0.0 ,radius ,base ,radius ,(* 0.5 base) ,(+ height radius)) ;new
,thickness #f)
(interval-widen (cons 0 base) radius)
(cons 0 base) )))
delta = \markup \delta-bhr #120 #130 #10 % customised for "sans-serif"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Just my two cents. Or three in this case.
Cheers,
Robin
delta.png
Description: PNG image