[StumpWM, SBCL] Add sbclrc, instructions for clx-truetype

This commit is contained in:
Lucien Cartier-Tilet 2022-05-02 00:59:50 +02:00
parent e924306b15
commit 49014b6c4e
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA
2 changed files with 39 additions and 0 deletions

15
.sbclrc Normal file
View File

@ -0,0 +1,15 @@
;;; -*- mode: lisp; -*-
;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))
;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp"
(user-homedir-pathname))))
(when (probe-file quicklisp-init)
(load quicklisp-init)))

View File

@ -716,6 +716,30 @@ This will make ~clx-truetype~ available to quicklisp, and you can run
again src_lisp[:exports code]{(ql:quickload :clx-truetype)} without an again src_lisp[:exports code]{(ql:quickload :clx-truetype)} without an
issue (running it again is necessary to install its dependencies). issue (running it again is necessary to install its dependencies).
In order for it to work, install [[https://www.quicklisp.org/beta/][quicklisp]] and dont forget to run
src_lisp[:exports code]{(ql:add-to-init-file)} so it is loaded each
time you start your Lisp interpreter. ~SBCL~ should be your CommonLisp
interpreter of choice since StumpWM is generally compiled with it. The
main advantage is also that SBCL supports multithreading, unlike
clisp. In case StumpWM doesnt find your font, spin up SBCL and
execute the following lines:
#+begin_src lisp :tangle no
(ql:quickload :clx-truetype)
(xft:cache-fonts)
#+end_src
If you want a list of font families available, you can execute the
following:
#+begin_src lisp :tangle no
(clx-truetype:get-font-families)
#+end_src
If you want to know the subfamilies of a certain family, you can
execute this:
#+begin_src lisp :tangle no
(clx-truetype:get-font-subfamilies "Family Name")
#+end_src
Now that this is out of the way, lets add two lines so we can use TTF Now that this is out of the way, lets add two lines so we can use TTF
fonts: fonts:
#+begin_src lisp #+begin_src lisp