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))])