[cl-typesetting-devel] Hyphenation config

Marc Battyani marc.battyani at fractalconcept.com
Sat Apr 24 20:43:03 UTC 2004


"Klaus Weidner" <kw at w-m-p.com> wrote:

> just two minor patches today:

Only! ;-)

> - make the hyphenation table selectable via nix:*active-hyphenation-table*
>   instead of always using the american one. (Oops, I forgot to add it
>   to the export list. Make that nix::*active-hyphenation-table*. Or
>   maybe it should be a tt:* variable anyway for consistency.)
>   Setting it to NIL turns hyphenation off completely. Adding
>   a "with-hyphenation-table" macro would make it easy to support
>   multilanguage text...
>
> - the char decorations produced fairly ugly results on whitespace, since
>   that doesn't have proper boxes. The patch restricts those functions to
>   just characters.

OK though I prefer this:
(defmethod stroke :after ((box char-box) x y)
  (when (functionp *post-decoration*)
    (funcall *post-decoration*

 Rather than:
 (defmethod stroke :before ((box box) x y)
   (if (and (functionp *pre-decoration*)
    (typep box 'char-box))

> Next, I plan to take a look at handling at least simple CSS2/FO font
> handling - not being able to individually configure weight and slant
> is a bit restrictive and would require extra bookkeeping in client code.

Good.

> Also, the table model is turning into a bit of a nuisance, and I have to
> keep table support switched off for almost all HTML pages to avoid the
> dreaded "can't fit anything" fatal error. I consider this as a challenge
;-)

Yes, this is a real point. I will look at it. (But I'm still very busy with
Real Work (tm)) :(

> Another challenge is that the code uses around 300 MB working memory for
> a simple 60-page document; this will need some tuning to be able to
> handle more complex or longer ones on affordable hardware. But that fits
> the Lisp philosophy, first get it working and then worry about
> efficiency...

Yes, this is the normal way of doing stuff in Lisp. For instance there are
lots of floating point computations and no declaration yet.

Marc





More information about the cl-typesetting-devel mailing list