;;;; asset/font.lisp (in-package #:wheelwork) (define-symbol-macro +standard-font-chars+ " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890\".,!?-'" ) (def:class font (asset) ((characters "The characters renderable with this font") :prefix :type string :initform +standard-font-chars+) ((oversample "Oversampling factor") :prefix :type (or null number) :initform nil) ((object "Stored font returned by cl-fond") :prefix :ro :type cl-fond::font)) (defmethod ensure-loaded ((font font)) (with-slots (path characters oversample object) font (setf object (cl-fond:make-font path characters :oversample oversample))))