[cl-pdf-devel] on escaping parentheses and backslashes
Marc Battyani
marc.battyani at fractalconcept.com
Wed Nov 30 12:03:29 UTC 2005
Aleksandar Bakic <a_bakic at yahoo.com> wrote:
> > Normally cl-typesetting takes care of the escaping of the special
> > characters.
> > Do you have a reproductible example ?
>
> I sent you the cl-typesetting patch below in a private email, as I am not
yet a
> member of the list. It seems to fix the problem.
>
> Alex
>
> Index: stroke.lisp
> ===================================================================
> --- stroke.lisp (revision 110)
> +++ stroke.lisp (working copy)
> @@ -74,8 +74,10 @@
> (unless (or string text-chunk)
> (setf text-x x text-y (+ offset y)))
> (let ((char (boxed-char char-box)))
> - (when (find char "\\()" :test #'char=)
> - (push #\\ string))
> + (unless (and *font* (typep (pdf::font-metrics *font*)
> + 'pdf::ttu-font-metrics))
> + (when (find char "\\()" :test #'char=)
> + (push #\\ string)))
> (push char string)))
> (add-spacing (space)
> (setf space (round (/ (* -1000 space) *text-x-scale*)
> *font-size*))
>
OK Thanks. Looks like the problem were not the lack on quoting but instead
the fact of quoting some unicode character. :)
Marc
More information about the cl-pdf-devel
mailing list