Matthew Butterick 1 month ago
commit 680422ea57
  1. 1
      hyphenate/hyphenate/us/exceptions.rkt
  2. 5
      quad/quadwriter/render.rkt
  3. 11
      quad2/README.md

@ -15,6 +15,7 @@ law-yer-ing
law-yer-ly
law-yered
law-yers
look-ahead
oblig-a-tory
oki-na
oki-nas

@ -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))

@ -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.
Loading…
Cancel
Save