diff --git a/.github/workflows/calm.yml b/.github/workflows/calm.yml
index a9214a28..49bdb0aa 100644
--- a/.github/workflows/calm.yml
+++ b/.github/workflows/calm.yml
@@ -16,13 +16,13 @@ jobs:
- name: Build for Linux
run: |
- docker run --env CI=true -v $PWD:/calm -w /calm fedora:34 bash build/build.sh
+ docker run --env CI=true -v $PWD:/calm -w /calm fedora:32 bash build/build.sh
ls -lah .
- name: Build for Web
run: |
mkdir calm
- tar xvf calm.tgz --directory=calm
+ tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
calm hello
@@ -37,7 +37,6 @@ jobs:
files: |
*.tar
*.tgz
- *.AppImage
macOS:
runs-on: ${{ matrix.os }}
@@ -63,7 +62,6 @@ jobs:
with:
draft: true
files: |
- *.tgz
*.dmg
Windows:
@@ -84,6 +82,4 @@ jobs:
with:
draft: true
files: |
- *.tgz
*.zip
- Hello.exe
diff --git a/.github/workflows/example-circles.yml b/.github/workflows/example-circles.yml
index cb2b08ac..15662104 100644
--- a/.github/workflows/example-circles.yml
+++ b/.github/workflows/example-circles.yml
@@ -19,9 +19,9 @@ jobs:
- name: Build
run: |
set -x
- curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
+ curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
- tar xvf calm.tgz --directory=calm
+ tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Circles
@@ -46,9 +46,9 @@ jobs:
- name: Build
run: |
set -x
- curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
+ curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
- tar xvf calm.tgz --directory=calm
+ tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Circles
@@ -82,7 +82,7 @@ jobs:
run: |
set -x
export OS_SUBFIX=".${CI_MATRIX_OS}"
- curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg
+ curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.4/calm${OS_SUBFIX}.dmg
hdiutil attach calm.dmg
cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm
ls -lah calm
@@ -116,8 +116,8 @@ jobs:
run: |
set -x
pacman -S --noconfirm --needed unzip
- curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip
- unzip calm.zip -d calm
+ curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.4/calm.zip
+ unzip calm.zip
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Circles
diff --git a/.github/workflows/example-fan.yml b/.github/workflows/example-fan.yml
index fb0e777b..cf3ca24d 100644
--- a/.github/workflows/example-fan.yml
+++ b/.github/workflows/example-fan.yml
@@ -19,9 +19,9 @@ jobs:
- name: Build
run: |
set -x
- curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
+ curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
- tar xvf calm.tgz --directory=calm
+ tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Fan
@@ -46,9 +46,9 @@ jobs:
- name: Build
run: |
set -x
- curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
+ curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
- tar xvf calm.tgz --directory=calm
+ tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Fan
@@ -82,7 +82,7 @@ jobs:
run: |
set -x
export OS_SUBFIX=".${CI_MATRIX_OS}"
- curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg
+ curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.4/calm${OS_SUBFIX}.dmg
hdiutil attach calm.dmg
cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm
ls -lah calm
@@ -116,8 +116,8 @@ jobs:
run: |
set -x
pacman -S --noconfirm --needed unzip
- curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip
- unzip calm.zip -d calm
+ curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.4/calm.zip
+ unzip calm.zip
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Fan
diff --git a/.github/workflows/example-meditator.yml b/.github/workflows/example-meditator.yml
index 4466978e..f3079a59 100644
--- a/.github/workflows/example-meditator.yml
+++ b/.github/workflows/example-meditator.yml
@@ -20,9 +20,9 @@ jobs:
- name: Build
run: |
set -x
- curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
+ curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
- tar xvf calm.tgz --directory=calm
+ tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Meditator
@@ -49,9 +49,9 @@ jobs:
- name: Build
run: |
set -x
- curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
+ curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
- tar xvf calm.tgz --directory=calm
+ tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Meditator
@@ -85,7 +85,7 @@ jobs:
run: |
set -x
export OS_SUBFIX=".${CI_MATRIX_OS}"
- curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg
+ curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.4/calm${OS_SUBFIX}.dmg
hdiutil attach calm.dmg
cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm
ls -lah calm
@@ -119,8 +119,8 @@ jobs:
run: |
set -x
pacman -S --noconfirm --needed unzip
- curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip
- unzip calm.zip -d calm
+ curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.4/calm.zip
+ unzip calm.zip
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Meditator
diff --git a/.github/workflows/example-mondrian.yml b/.github/workflows/example-mondrian.yml
index a235c0cf..c43ee6c1 100644
--- a/.github/workflows/example-mondrian.yml
+++ b/.github/workflows/example-mondrian.yml
@@ -19,9 +19,9 @@ jobs:
- name: Build
run: |
set -x
- curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
+ curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
- tar xvf calm.tgz --directory=calm
+ tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Mondrian
@@ -46,9 +46,9 @@ jobs:
- name: Build
run: |
set -x
- curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.3/calm.tgz
+ curl -L -o calm.tgz https://github.com/VitoVan/calm/releases/download/0.1.4/calm.tgz
mkdir calm
- tar xvf calm.tgz --directory=calm
+ tar xvf calm.tgz
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Mondrian
@@ -82,7 +82,7 @@ jobs:
run: |
set -x
export OS_SUBFIX=".${CI_MATRIX_OS}"
- curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.3/calm${OS_SUBFIX}.dmg
+ curl -L -o calm.dmg https://github.com/VitoVan/calm/releases/download/0.1.4/calm${OS_SUBFIX}.dmg
hdiutil attach calm.dmg
cp -R "/Volumes/Calm - CALM/Calm.app/Contents/MacOS/" calm
ls -lah calm
@@ -116,8 +116,8 @@ jobs:
run: |
set -x
pacman -S --noconfirm --needed unzip
- curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.3/calm.zip
- unzip calm.zip -d calm
+ curl -L -o calm.zip https://github.com/VitoVan/calm/releases/download/0.1.4/calm.zip
+ unzip calm.zip
ls -lah calm
export PATH=$PATH:$(pwd)/calm/
export APP_NAME=Mondrian
diff --git a/README.md b/README.md
index b567700c..25029b80 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
# Canvas Aided Lisp Magic
-Calm down and draw something, in Lisp.
-
[![CI](https://github.com/VitoVan/calm/actions/workflows/calm.yml/badge.svg)](https://github.com/VitoVan/calm/actions/workflows/calm.yml) [![GitHub all releases](https://img.shields.io/github/downloads/vitovan/calm/total?color=brightgreen&label=Downloads&style=flat)](https://github.com/VitoVan/calm/releases/latest)
+A Lisp development environment that enables you to build and distribute canvas based applications as Linux AppImage, macOS Application Bundle, Windows Installer and Web Application.
+
## Hello World
Find whatever directory, create a file: **canvas.lisp**
@@ -11,8 +11,8 @@ Find whatever directory, create a file: **canvas.lisp**
```lisp
(defparameter *color-list* '((0.83 0.82 0.84) (0.89 0.12 0.17) (0.94 0.87 0.47) (0 0.35 0.59)))
(defun draw ()
+ (c:set-operator :darken)
(dotimes (i 7)
- (c:set-operator :darken)
(c:arc (+ 72 (* (- (/ *calm-window-width* 5) 44) i)) 73 50 0 (* 2 pi))
(apply #'c:set-source-rgb (nth (if (>= i 4) (- i 4) i) *color-list*))
(c:fill-path)))
@@ -26,39 +26,29 @@ calm
[![Hello World](docs/examples/circles/canvas.png)](#hello-world)
-Or:
-
-```bash
-calm publish-web
-```
-
-and then:
-
-[![open in the browser](https://img.shields.io/badge/open-in%20the%20browser-brightgreen?logo=webassembly&logoColor=white)]()
-
## Examples
-
-
-
+
+
+
-No need to download, you can check these examples [in your browser](https://github.com/VitoVan/calm/releases/tag/examples-0.1.2).
+Source files and binaries for the above examples are [here](https://github.com/VitoVan/calm/tree/main/docs/examples) and [here](https://github.com/VitoVan/calm/releases/tag/examples-0.1.3).
-For more examples, please check this list: [Made with CALM](https://github.com/VitoVan/made-with-calm).
+For more applications made with CALM, please check: [Made with CALM](https://github.com/VitoVan/made-with-calm).
## Installation
### Pre-built Binary
-1. Download for your platform
+1. Download
- [![Linux Download](https://img.shields.io/badge/Linux-glibc%202.33+-FFD032.svg?logo=linux)]() [![macOS Ventura Download](https://img.shields.io/badge/macOS-Ventura-black?logo=apple)]() [![Windows Download](https://img.shields.io/badge/Windows-Windows%2010/11-017fd5.svg?logo=windows)]() [![macOS Monterey Download](https://img.shields.io/badge/macOS-Monterey-white?logo=apple)]() [![macOS Big Sur Download](https://img.shields.io/badge/macOS-Big%20Sur-white?logo=apple)]()
+ [![Linux Download](https://img.shields.io/badge/Linux-glibc%202.31+-FFD032.svg?logo=linux)]() [![macOS Ventura Download](https://img.shields.io/badge/macOS-Ventura-black?logo=apple)]() [![Windows Download](https://img.shields.io/badge/Windows-Windows%2010/11-017fd5.svg?logo=windows)]() [![macOS Monterey Download](https://img.shields.io/badge/macOS-Monterey-white?logo=apple)]() [![macOS Big Sur Download](https://img.shields.io/badge/macOS-Big%20Sur-white?logo=apple)]()
-2. Extract the content
+2. Extract
-3. Add the extracted folder into your PATH environment
+3. Add the extracted directory into your PATH environment
for macOS, add `/path/to/Calm.app/Contents/MacOS/` instead
@@ -94,8 +84,6 @@ This command will generate different packages on different platforms:
>**Note**
>
->_You don't need to read this if you don't care about what I am going to install on your machine_
->
>DMG creation is powered by [create-dmg](https://github.com/create-dmg/create-dmg), will be installed by `brew install create-dmg` if it were not present.
>
>So if you don't have create-dmg, this will install create-dmg for you.
@@ -110,8 +98,6 @@ This command will generate different packages on different platforms:
> **Note**
>
-> _You don't need to read this if you don't care about what I am going to install on your machine_
->
> Installer creation is powered by [NSIS](https://nsis.sourceforge.io/), will be installed by `winget install nsis` if it were not present.
>
> So if you don't have NSIS (i.e., `makensis`) under your PATH, this will install NSIS for you.
@@ -120,27 +106,29 @@ This command will generate different packages on different platforms:
>
> The binary detection was done by `where makensis` and `where winget`.
-### Customization
-
-If you want to change the generated application name, icon, etc, please use the following command:
+### To the Web
```bash
-calm publish-with-options
+calm publish-web
```
-You will be asked for all the customization options and the default value will also be provided.
+This command could compoile your Lisp code into web pages that could be served on the internet.
+
+> **Note**
+>
+> docker and git should be present.
+
+### Customization
-### On the Web
+If you want to change the generated application name, icon, etc, please use the following command:
```bash
-calm publish-web
+calm publish-with-options
```
-This command could compoile your Lisp code into web pages that could be served on the internet.
-
-There is also another `calm publish-web-with-options` command for more customization.
+You will be asked for all the customization options and the default value will also be provided.
-I haven't write any document yet, but the command should deliver, docker and git are needed. Please let me know if you encountered any problems.
+There is also another `calm publish-web-with-options` command for web-end customization.
## Environment Variables
diff --git a/build/build.sh b/build/build.sh
index 4b03e441..f4004766 100644
--- a/build/build.sh
+++ b/build/build.sh
@@ -80,6 +80,7 @@ build_msys () {
echo "packing ..."
./calm s dev msys pack.sh
+ echo "DONE."
}
diff --git a/calm.asd b/calm.asd
index fa84acd2..6bbc5afc 100644
--- a/calm.asd
+++ b/calm.asd
@@ -1,6 +1,6 @@
(asdf:defsystem #:calm
:description "CALM - Canvas Aided Lisp Magic"
- :version "0.1.3"
+ :version "0.1.4"
:author "Vito Van"
:license "GNU General Public License, version 2"
:depends-on (
diff --git a/docs/changelog.org b/docs/changelog.org
index 57df91bf..31e48a37 100644
--- a/docs/changelog.org
+++ b/docs/changelog.org
@@ -1,4 +1,8 @@
* CALM
+** 0.1.4
+- downgrade glibc version 2.33+ -> 2.31(for Linux)
+ now CALM applications could run on the old Ubuntu 20.04 LTS
+- more elegant circles/canvas.lisp
** 0.1.3
- fix version check in command `calm hello`
- add `c:halt-wav`
diff --git a/docs/examples/circles/canvas.lisp b/docs/examples/circles/canvas.lisp
index 57659c03..ba87f2f9 100644
--- a/docs/examples/circles/canvas.lisp
+++ b/docs/examples/circles/canvas.lisp
@@ -5,8 +5,8 @@
(defparameter *color-list* '((0.83 0.82 0.84) (0.89 0.12 0.17) (0.94 0.87 0.47) (0 0.35 0.59)))
(defun draw ()
+ (c:set-operator :darken)
(dotimes (i 7)
- (c:set-operator :darken)
(c:arc (+ 72 (* (- (/ *calm-window-width* 5) 44) i)) 73 50 0 (* 2 pi))
(apply #'c:set-source-rgb (nth (if (>= i 4) (- i 4) i) *color-list*))
(c:fill-path)))
diff --git a/docs/hacking.md b/docs/hacking.md
new file mode 100644
index 00000000..116e1e44
--- /dev/null
+++ b/docs/hacking.md
@@ -0,0 +1,31 @@
+# How to Hack CALM
+
+## Step 1: Fork CALM
+
+https://github.com/VitoVan/calm/fork
+
+## Step 2: Install CALM binary
+
+https://github.com/VitoVan/calm#-installation
+
+## Step 3: Init Git Repository
+
+```bash
+# cd to your downloaded CALM binary directory
+# e.g. on macOS:
+cd /Applications/Calm.app/Contents/MacOS
+
+# init git
+git init .
+
+# add your fork to remote
+git remote add origin git@github.com:/calm.git
+
+# fetch
+git fetch origin --depth=1
+
+# reset hard to origin/main
+git reset --hard origin/main
+```
+
+Now you can modify, push and create pull requests!
diff --git a/docs/installation.md b/docs/installation.md
index ce5bfdf7..2df23f18 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -10,8 +10,7 @@ Now let's set up the environment for the ease of use.
- Linux
```bash
- mkdir -p ~/calm
- tar xvf calm.tgz --directory=$HOME/calm/
+ tar xvf calm.tgz --directory=$HOME/
echo 'export PATH="$HOME/calm/:$PATH"'>> ~/.bashrc
```
- macOS
diff --git a/s/dev/darwin/pack.sh b/s/dev/darwin/pack.sh
index 545a48d3..fa10e621 100644
--- a/s/dev/darwin/pack.sh
+++ b/s/dev/darwin/pack.sh
@@ -11,7 +11,7 @@ export APP_ICON=./build/calm.icns
export APP_VERSION=$(grep :version calm.asd | awk -F \" '{print $2}')
mkdir calm-dist
-cp -R {calm,build,entry.lisp,src,lib,s,quicklisp,README.md,calm.asd,sbcl,images,LICENSE} ./calm-dist/
+cp -R {calm,build,entry.lisp,src,lib,s,quicklisp,README.md,calm.asd,sbcl,LICENSE} ./calm-dist/
export APP_NAME=Calm
export BUNDLE_ID=com.vitovan.calm
export DIST_DIR=./calm-dist/
diff --git a/s/dev/fedora/pack.sh b/s/dev/fedora/pack.sh
index e6f7e662..29dfbdf3 100644
--- a/s/dev/fedora/pack.sh
+++ b/s/dev/fedora/pack.sh
@@ -1,5 +1,7 @@
# to use the CALM binary in pwd
export PATH=$(pwd):$PATH
-tar -czvf ./calm.tgz build calm entry.lisp src lib s quicklisp README.md calm.asd sbcl images LICENSE
+mkdir /tmp/calm
+cp -R {calm,build,entry.lisp,src,lib,s,quicklisp,README.md,calm.asd,sbcl,LICENSE} /tmp/calm
+cd /tmp && GZIP=-9 tar -czvf ./calm.tgz ./calm && cd - && mv /tmp/calm.tgz .
diff --git a/s/dev/msys/pack.sh b/s/dev/msys/pack.sh
index e9745771..30c43c23 100644
--- a/s/dev/msys/pack.sh
+++ b/s/dev/msys/pack.sh
@@ -1,5 +1,6 @@
# to use the CALM binary in pwd
export PATH=$(pwd):$PATH
-zip -r ./calm.zip calm.exe calmNoConsole.exe entry.lisp build src lib s quicklisp README.md calm.asd sbcl images LICENSE
-
+mkdir /tmp/calm
+cp -R {calm,build,entry.lisp,src,lib,s,quicklisp,README.md,calm.asd,sbcl,LICENSE} /tmp/calm
+cd /tmp && zip -r -9 ./calm.zip ./calm && cd - && mv /tmp/calm.zip .
diff --git a/s/usr/all/panic.lisp b/s/usr/all/panic.lisp
index f2a78828..fe932b01 100644
--- a/s/usr/all/panic.lisp
+++ b/s/usr/all/panic.lisp
@@ -5,7 +5,7 @@
;; version check won't work on JSCL, since the lack of ASDF
;;
#-jscl
-(let ((required-version "0.1.3")
+(let ((required-version "0.1.4")
(calm-version (slot-value (asdf:find-system 'calm) 'asdf:version)))
(when (uiop:version< calm-version required-version)
(format t
diff --git a/src/calm.lisp b/src/calm.lisp
index c86196aa..0fb2f946 100644
--- a/src/calm.lisp
+++ b/src/calm.lisp
@@ -2,7 +2,8 @@
#-jscl
(defun calm-quit ()
- (sdl2-mixer:close-audio)
+ (when *calm-state-audio-open*
+ (sdl2-mixer:close-audio))
;; on Linux & Windows, uiop:quit will hang a while
;; don't know why, fix it recklessly.
(if (uiop:featurep :darwin)
diff --git a/src/config.lisp b/src/config.lisp
index c8cb33c0..879b46f3 100644
--- a/src/config.lisp
+++ b/src/config.lisp
@@ -169,18 +169,40 @@
;; let pango use fontconfig to get cross-platform font loading support
(setf (uiop:getenv "PANGOCAIRO_BACKEND") "fontconfig")
- ;; set fontconfig config dir
+ ;;
+ ;; set fontconfig config
+ ;;
(setf (uiop:getenv "FONTCONFIG_PATH") (uiop:native-namestring (merge-pathnames "fonts/" *calm-env-app-dir*)))
- (setf (uiop:getenv "FONTCONFIG_FILE") (uiop:native-namestring (merge-pathnames "fonts/fonts.conf" *calm-env-app-dir*)))
-
- (format t "fontpath: ~A~%" (uiop:native-namestring (merge-pathnames "fonts/" *calm-env-app-dir*)))
- (format t "fontfile: ~A~%" (uiop:native-namestring (merge-pathnames "fonts/fonts.conf" *calm-env-app-dir*)))
+ (let ((app-fonts-conf (merge-pathnames "fonts/fonts.conf" *calm-env-app-dir*))
+ (calm-fonts-conf (merge-pathnames "s/usr/all/fonts.conf" *calm-env-calm-home*)))
+ ;;
+ ;; this is only needed by fontconfig @ fedora-32:
+ ;; https://bodhi.fedoraproject.org/updates/?search=fontconfig&releases=F32
+ ;; when a non-exist fonts.conf was set, something weird will happen:
+ ;; like text was stretched
+ ;;
+ ;; why using granny's fedora?
+ ;; because we want to lower the glibc dependency
+ ;; https://github.com/AppImage/appimage.github.io/pull/3166
+ ;; Ubuntu 20.04 LTS with GLIBC_2.31 won't be died till 2030, so...
+ ;; https://wiki.ubuntu.com/Releases
+ (if (probe-file app-fonts-conf)
+ ;; if there exists a fonts.conf inside app dir, use it
+ (setf (uiop:getenv "FONTCONFIG_FILE") (uiop:native-namestring app-fonts-conf))
+ ;; if not, use CALM default (this won't be available in distribution mode, but anyway...)
+ (setf (uiop:getenv "FONTCONFIG_FILE") (uiop:native-namestring calm-fonts-conf)))
+
+ (format t "fontpath: ~A~%" (uiop:getenv "FONTCONFIG_PATH"))
+ (format t "fontfile: ~A~%" (uiop:getenv "FONTCONFIG_FILE"))
+
+ ;; https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#DEBUG
+ ;; (setf (uiop:getenv "FC_DEBUG") "1024")
+
+ ;; reinit fc, if there exists fonts.conf
+ (when (or (probe-file app-fonts-conf) (probe-file calm-fonts-conf))
+ (fontconfig:fc-init-reinitialize)))
- ;; https://www.freedesktop.org/software/fontconfig/fontconfig-user.html#DEBUG
- ;; (setf (uiop:getenv "FC_DEBUG") "1024")
- ;; init fc
- (fontconfig:fc-init-reinitialize)
)
#+jscl