diff --git a/hyphenate/hyphenate/us/exceptions.rkt b/hyphenate/hyphenate/us/exceptions.rkt index d7b9c450..248917c0 100644 --- a/hyphenate/hyphenate/us/exceptions.rkt +++ b/hyphenate/hyphenate/us/exceptions.rkt @@ -15,6 +15,7 @@ law-yer-ing law-yer-ly law-yered law-yers +look-ahead oblig-a-tory oki-na oki-nas diff --git a/quad/quadwriter/render.rkt b/quad/quadwriter/render.rkt index 1946a2b4..97300a7b 100644 --- a/quad/quadwriter/render.rkt +++ b/quad/quadwriter/render.rkt @@ -339,7 +339,10 @@ (setup-margins qs page-width page-height)) (define gutter-margin (and (pair? qs) (quad-ref (car qs) :page-margin-gutter 0))) (define printable-width (- page-width left-margin right-margin gutter-margin)) - (define printable-height (- page-height top-margin bottom-margin)) + (unless (> printable-width 0) + (raise-user-error 'render "printable width greater than 0: got ~a" printable-height)) (define printable-height (- page-height top-margin bottom-margin)) + (unless (> printable-height 0) + (raise-user-error 'render "printable height greater than 0: got ~a" printable-height)) (define column-count (setup-column-count qs)) (define column-gap (setup-column-gap qs)) (define line-wrap-size (/ (- printable-width (* (sub1 column-count) column-gap)) column-count)) diff --git a/quad2/README.md b/quad2/README.md new file mode 100644 index 00000000..16a7611c --- /dev/null +++ b/quad2/README.md @@ -0,0 +1,11 @@ +### project status 220808 + +Whereas `quad` compiles directly to PDF, `quad2` compiles to an intermediate drawing language, the output of which is passed to a renderer. + +Toy text and bitmap renderers were made. They are not good for much. + +* The next goal is to stub out a PDF renderer ... + +* But first, it turns out that it would be useful to have a renderer that can show layouts in a quicker, more debuggable way. The best idea seems like making an HTML renderer, since it can demonstrate any PDF layout (plus the possibility of embedding debug information in page popups etc) + +* Once these two renderers are stubbed out, we can go back and start working on layout operations for text.