diff options
author | Colin Okay <colin@cicadas.surf> | 2022-06-29 11:54:24 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-06-29 11:54:24 -0500 |
commit | 82f71b0d13788b1cff9a24c5b652effd11631523 (patch) | |
tree | f0ec127b2f10f46029983ee95b6c72ef29bc504c /src/assets/font.lisp | |
parent | 4d1ee56c96ce254134b692f0e3b3271c87a42b54 (diff) |
[refactor] [structure] modularized project file structure
Diffstat (limited to 'src/assets/font.lisp')
-rw-r--r-- | src/assets/font.lisp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/assets/font.lisp b/src/assets/font.lisp new file mode 100644 index 0000000..3ff29d5 --- /dev/null +++ b/src/assets/font.lisp @@ -0,0 +1,17 @@ +;;;; asset/font.lisp + +(in-package #:wheelwork) + +(define-symbol-macro +standard-font-chars+ + " +ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890\".,!?-'" ) + +(defclass/std font (asset) + ((characters :i :std +standard-font-chars+) + (oversample :i :doc "ovesampling factor to pass to cl-fond:make-font") + (object :with :r :doc "The font as returned from cl-fond:make-font"))) + +(defmethod ensure-loaded ((font font)) + (with-slots (path characters oversample object) font + (setf object (cl-fond:make-font path characters :oversample oversample)))) + |