[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How do I stop circles from wobbling?
From: |
David Kastrup |
Subject: |
Re: How do I stop circles from wobbling? |
Date: |
Fri, 31 Dec 2010 15:49:09 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
"Robin Bannister" <address@hidden> writes:
> David Kastrup wrote:
>> the vertical extent should fit in the circles
>> necessitated by the horizontal extent.
>
> The 4 is big enough to ensure that all the vertical extents do fit,
> but (because of this) they all fit loosely. This looseness means that
> to decide where to position a circle vertically a further criterion is
> needed.
>
> Behind the scenes the circle-stencil bases its circle on the centre of
> the vertical extent (see stencil.scm and issue 107). This of course
> varies e.g. between button strings "G" and "g".
>
>
>> Can anybody tell me what to do to keep the circles from wobbling?
>
[...]
> A line average is insufficient e.g. the bottom line has no "g". A
> total average seems inconvenient so I would do it with a fiddle
> factor. Replace
>
>> #:hcenter-in 4
>
> with
>
>> #:with-dimensions (cons -2 2) (cons 0 1.5) #:center-align
>
> and adjust the 1.5 to taste.
What I use currently is
#(define-markup-list-command (buttons layout props str) (string?)
(map (lambda (str)
(interpret-markup layout props (markup #:hcenter-in 10.8 #:circle
#:pad-to-box '(0 . 0) '(-0.5 . 2) #:hcenter-in 4 str)))
(string-split str #\-)))
and this works reasonably well.
Thanks, I did not expect an answer anymore.
All the best,
--
David Kastrup