use fontland

main
Matthew Butterick 6 years ago
parent cffecceb5f
commit 4171608b7d

@ -184,7 +184,7 @@
(unit '(origin (2 2))) (unit '(origin (3 2))) (unit '(origin (4 2))))))))
(require racket/runtime-path fontkit/font)
(require racket/runtime-path fontland/font)
(define-runtime-path fira "fira.ttf")
(define q1 (quad (list 'in 'bi 'out 'bo 'size '(10 10) 'font fira 'fontsize 12)))

@ -1,5 +1,5 @@
#lang br
(require fontkit/font)
(require fontland/font)
(define f (openSync "fira.ttf"))

@ -45,7 +45,7 @@
[(#\space) (λ (sig) (not (memq sig '(start end))))]
[else #t])
'draw (λ (q doc)
(draw-debug q doc)
#;(draw-debug q doc)
(send doc fontSize (string->number (hash-ref (attrs q) 'fontsize "12")))
(let ([str (car (elems q))])
(cond
@ -54,6 +54,7 @@
(λ (url-str) (apply as-link doc str url-str (origin q)))]
[else
#;(println str)
(void)
(send/apply doc text str (origin q))])))) (elems q)))
(struct $line $quad () #:transparent)
(struct $page $quad () #:transparent)

Loading…
Cancel
Save