oops: wrap-qs wasn't reversed

main
Matthew Butterick 5 years ago
parent 573804651d
commit c0cd2fa627

@ -41,7 +41,8 @@
#:no-break [no-break-func-arg #false]
;; size of potential wrap.
;; simple: measure q and add it to last-dist
;; sophisticated: process all wrap-qs and measure resulting
;; sophisticated: process all wrap-qs and measure resulting
;; wrap-qs are reversed from typographic order
#:distance [distance-func (λ (q last-dist wrap-qs)
(+ last-dist (if (printable? q) (distance q) 0)))]
;; called when wrap counter increments.

@ -639,9 +639,9 @@
;; can be repeated without damage.
[((? null?) _) null]
[((cons q rest) where)
#;(set-quad-from-parent! q (or where (quad-from q)))
#;(cons q rest)
(cons (quad-copy q [from-parent (or where (quad-from q))]) rest)])
(set-quad-from-parent! q (or where (quad-from q)))
(cons q rest)
#;(cons (quad-copy q [from-parent (or where (quad-from q))]) rest)])
(define ((col-finish-wrap col-quad) lns . _)
(match lns
@ -670,7 +670,7 @@
#:no-break (λ (q) (quad-ref q :no-colbr)) ; cooperates with make-nobreak
#:distance (λ (q dist-so-far wrap-qs)
;; do trial block insertions
(for/sum ([x (in-list (insert-blocks wrap-qs))])
(for/sum ([x (in-list (insert-blocks (reverse wrap-qs)))])
(pt-y (size x))))
#:finish-wrap (col-finish-wrap column-quad))
col-spacer))

Loading…
Cancel
Save