line quads are missing 'y attr

main
Matthew Butterick 10 years ago
parent 50f707c896
commit b4d316f4e6

@ -1,4 +1,5 @@
#lang typed/racket/base
(require typed/sugar/debug)
(require "main-typed.rkt" "logger-typed.rkt" "world-typed.rkt" "samples-typed.rkt" "quads-typed.rkt")
(require/typed profile
@ -10,7 +11,8 @@
(parameterize ([world:quality-default world:draft-quality]
[world:paper-width-default 600.0]
[world:paper-height-default 700.0])
(define sample (ti5))
(define sample (ti3))
; (define to (time (profile-thunk #:delay 0.001 (λ () (typeset sample)))))
(define to (time (typeset sample)))
(report to)
(time (send (new pdf-renderer%) render-to-file to "foo-typed.pdf")))

@ -205,6 +205,6 @@
(parameterize ([world:quality-default world:draft-quality]
[world:paper-width-default 600]
[world:paper-height-default 700])
(define sample (ti5))
(define sample (ti3))
(define to (begin (time (typeset sample))))
(time (send (new pdf-renderer%) render-to-file to "foo.pdf"))))

@ -182,7 +182,7 @@
(cond
[(not (empty? exploded-line-quads))
;; after exploding, each quad will have a string with one character.
(for/list ([(q-left q q-right) (apply in-parallel (shift exploded-line-quads '(1 0 -1)))])
(for/list ([(q-left q q-right) (apply in-parallel (shifts exploded-line-quads '(1 0 -1)))])
(if (optical-kern? q)
(quad-attr-set q world:width-key (fl+ (overhang-width q-left) (overhang-width q-right)))
q))]

Loading…
Cancel
Save