From 5bdcee8918b51ee20fd30b2e985f1bdf70d5ea75 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 15 May 2017 23:35:07 -0700 Subject: [PATCH] blurgh --- pitfall/pitfall/font.rkt | 7 +++++++ pitfall/pitfall/mixins/fonts.rkt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pitfall/pitfall/font.rkt b/pitfall/pitfall/font.rkt index e43033f4..1b27a414 100644 --- a/pitfall/pitfall/font.rkt +++ b/pitfall/pitfall/font.rkt @@ -1,2 +1,9 @@ #lang pitfall/racket +(require "font/standard.rkt") +(provide open-pdffont) +(define (open-pdffont document src family id) + (cond + [(string? src) + (when (isStandardFont src) + (make-object StandardFont document src id))])) \ No newline at end of file diff --git a/pitfall/pitfall/mixins/fonts.rkt b/pitfall/pitfall/mixins/fonts.rkt index 11eedf79..df49211f 100644 --- a/pitfall/pitfall/mixins/fonts.rkt +++ b/pitfall/pitfall/mixins/fonts.rkt @@ -64,7 +64,7 @@ ;; load the font [else (define id (format "F~a" (increment-field! _fontCount this))) - (set-field! _font this (PDFFont-open this src family id)) + (set-field! _font this (open-pdffont this src family id)) ;; check for existing font familes with the same name already in the PDF ;; useful if the font was passed as a buffer (let ([font (· this _fontFamilies (· this _font name))])