[cl-typesetting-devel] leading/line-spacing and text style

Cyrus Harmon ch-lisp at bobobeach.com
Thu Oct 4 14:19:25 UTC 2007


Yes, this was my thinking as well. I'll check it out.

Thanks,

Cyrus

On Oct 3, 2007, at 11:09 PM, Dmitriy Ivanov wrote:

> Hello Cyrus,
>
> | Is there a way to set the vertical spacing between lines on a per-
> | style basis? How about adding a line-spacing (or highjacking the
> | existing leading) to the style class? Looks (yeah, right) trivial
> | enough, but I figured I'd ask if there was a better way first.
>
> IMHO, incorporating *leading-ratio* into the text-style class is quite
> reasonable. The use-style method would look like the following:
>
> (defmethod use-style ((style text-style))
>   (macrolet ((%use-style% (name var)
>         `(let ((style (,name style)))
>    (when style (setf ,var style)))))
>     ...
>     (%use-style% leading-ratio *leading-ratio*))
>   (when (and (leading-ratio style) (or (font style)(font-size style)))
>     (setf *leading* (* *font-size* *leading-ratio*))))
>
> The other xxx-style methods should also reset the value of *leading*
> appropriately. Could you experiment, please?
> --
> Sincerely,
> Dmitriy Ivanov
> lisp.ystok.ru
>




More information about the cl-typesetting-devel mailing list