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] #:no-break [no-break-func-arg #false]
;; size of potential wrap. ;; size of potential wrap.
;; simple: measure q and add it to last-dist ;; 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) #:distance [distance-func (λ (q last-dist wrap-qs)
(+ last-dist (if (printable? q) (distance q) 0)))] (+ last-dist (if (printable? q) (distance q) 0)))]
;; called when wrap counter increments. ;; called when wrap counter increments.

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

Loading…
Cancel
Save