From 796de89b132e1c9e2e3c2b748706e10a44bf37e2 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 8 Aug 2022 16:33:57 -0700 Subject: [PATCH 1/3] README with status --- quad2/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 quad2/README.md 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. From 46591cc2c0e72b0a02df12084bbefcc6077f8237 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 15 Aug 2022 13:01:30 -0700 Subject: [PATCH 2/3] raise error on negative printable width or height --- quad/quadwriter/render.rkt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)) From c9eb43b5e25f1d27ecbb922705bf2e97aae3c4f3 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Fri, 19 Aug 2022 07:15:01 -0700 Subject: [PATCH 3/3] add exception --- hyphenate/hyphenate/us/exceptions.rkt | 1 + 1 file changed, 1 insertion(+) 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