From 49014b6c4eb8b0c23714b5e54fff639c04f7b938 Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Mon, 2 May 2022 00:59:50 +0200 Subject: [PATCH] [StumpWM, SBCL] Add sbclrc, instructions for clx-truetype --- .sbclrc | 15 +++++++++++++++ org/config/stumpwm.org | 24 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 .sbclrc diff --git a/.sbclrc b/.sbclrc new file mode 100644 index 0000000..13db8fc --- /dev/null +++ b/.sbclrc @@ -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))) diff --git a/org/config/stumpwm.org b/org/config/stumpwm.org index ffb71b2..a4f2d70 100644 --- a/org/config/stumpwm.org +++ b/org/config/stumpwm.org @@ -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 issue (running it again is necessary to install its dependencies). +In order for it to work, install [[https://www.quicklisp.org/beta/][quicklisp]] and don’t 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 doesn’t 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, let’s add two lines so we can use TTF fonts: #+begin_src lisp