[cl-pdf-devel] Fonts?

Marc Battyani marc.battyani at fractalconcept.com
Tue May 31 15:58:01 UTC 2005


"Peter Seibel" <peter at gigamonkeys.com> writes:
> "Marc Battyani" <marc.battyani at fractalconcept.com> writes:
>
> > If you look at "Yo" for instance you will see that the Y is too far
> > from the o. cl-typesetting uses the kerning tables to correct this.
>
> Ah. So can I combine typeset:put-string with pdf:move-text, et al. to
> get the good kerning while still taking care of positioning things
> myself? Also, is there some smarter way to write this function that I
> use to measure the length of the text so I can do things like center it?
>
>  (flet ((text-width (text font font-size)
>     (* font-size (reduce #'+ text :key #'(lambda (c) (pdf:get-char-width c
font))))))

text-width is already in text.lisp ;-)

As you only need left/center/right text alignement, cl-typesetting will do
it naturally.
Just use one or several draw-block to put the text on the page.

Marc





More information about the cl-pdf-devel mailing list