- (t
- (let ((font (ftglCreateTextureFont font-file)))
- (cond ((/= font 0)
- (ftglSetFontFaceSize font size 72)
- (ftglSetFontCharMap font encoding)
- (set-resource key `(:id-font ,font) nil :static static)
- key)))))))
+ (t (true-load-font font-file size encoding static)))))
+
+(defun true-load-font (font-file size encoding static)
+ (let ((key (make-resource-font :filename font-file :size size :encoding encoding))
+ (font (ftglCreateTextureFont font-file)))
+ (cond ((/= font 0)
+ (ftglSetFontFaceSize font size 72)
+ (ftglSetFontCharMap font encoding)
+ (set-resource key
+ `(:id-font ,font)
+ (lambda () (true-load-font font-file size encoding static))
+ (lambda () (ftglDestroyFont font))
+ :static static)
+ key))))