Closed VitoVan closed 7 months ago
Hi @VitoVan, I happened to be looking at the QELT repo and found sketch:load-resource
the function you are looking for. This function checks the resource's file extension and creates the typeface instance so you can do:
(set-font
(make-font
:face (sketch:load-resource"/tmp/my-stupid-font.ttf")))
Currently, I use the following code to achieve the custom font:
I basically know nothing about SDL, and know very little about Common Lisp.
And the code above used something like
sketch::typeface
, which makes me feel inelegant. Since the double colons (::
) tell me that you do not want me to use it.So I am wondering:
Is this the proper way to set a custom font?
If not, what should I do?
Thank you very much for creating
sketch
, I enjoyed it very much.