From 75615cf6c6c67aa355441890e742b4b3d84c7623 Mon Sep 17 00:00:00 2001 From: Shinmera Date: Sat, 29 Jun 2024 20:14:43 +0200 Subject: [PATCH] Add trivial dump command --- .gitignore | 3 ++- compile.lisp | 45 ++++++++++++++++++++++++++++++++++++----- glyphs.json | 2 +- promptfont-compiler.asd | 6 ------ 4 files changed, 43 insertions(+), 13 deletions(-) delete mode 100644 promptfont-compiler.asd diff --git a/.gitignore b/.gitignore index 445465a..f255132 100644 --- a/.gitignore +++ b/.gitignore @@ -13,5 +13,6 @@ promptfont.lisp promptfont.lua promptfont.rs promptfont.gd +promptfont-compiler.* *.png -*.zip \ No newline at end of file +*.zip diff --git a/compile.lisp b/compile.lisp index 29b1e3f..d43b497 100755 --- a/compile.lisp +++ b/compile.lisp @@ -346,30 +346,65 @@ Tags: ~12t~{~a~^, ~}~%~%" (dolist (command (or commands '(fixup fonts txt css h cs py lisp lua rs gd web atlas release))) (run-command command))) +(defun dump () + (sb-ext:save-lisp-and-die + (file "promptfont-compiler" #+win32 "exe" #+linux "run" #-(or win32 linux) "o") + :toplevel #'main + :executable T + :compression T)) + (defun help () (format T "PromptFont data management utilities +by Yukari \"Shinmera\" Hafner + +Usage: ~a [command] args... -Commands: +Query Data: help --- Show this help screen + + query --- Show info for one or more glyphs + + search --- Search for matching glyphs + +Compile Data: all [command...] --- Performs all below commands. This is run by default + fixup --- Fixes up the glyphs.json file + fonts --- Generates the promptfont.ttf and .otf files + atlas [bank] [size] --- Generates the glyph texture atlas files Defaults to all banks and size of 64 - txt --- Generates the chars.txt file + + txt --- Generates the promptfont.txt file + css --- Generates the promptfont.css file + + h --- Generates the promptfont.h file + + cs --- Generates the promptfont.cs file + + py --- Generates the promptfont.py file + + lisp --- Generates the promptfont.lisp file + + lua --- Generates the promptfont.lua file + + rs --- Generates the promptfont.rs file + + gd --- Generates the promptfont.gd file + web --- Generates the index.html file + release --- Generates a release zip - query --- Show info for one or more glyphs - search --- Search for matching glyphs You typically do not need this utility as it is run automatically by the GitHub CI when you create a PR. https://shinmera.com/promptfont -")) +" (uiop:argv0))) (defun main () (destructuring-bind (argv0 &optional (command "all") &rest args) (uiop:raw-command-line-arguments) diff --git a/glyphs.json b/glyphs.json index 630ab37..77a9346 100644 --- a/glyphs.json +++ b/glyphs.json @@ -4022,4 +4022,4 @@ "code-name": "icon-shopping-cart", "tags": [] } -] +] \ No newline at end of file diff --git a/promptfont-compiler.asd b/promptfont-compiler.asd deleted file mode 100644 index be17248..0000000 --- a/promptfont-compiler.asd +++ /dev/null @@ -1,6 +0,0 @@ -(asdf:defsystem promptfont-compiler - :components ((:file "compile.lisp")) - :build-operation "program-op" - :build-pathname "promptfont-compiler" - :entry-point "promptfont-compiler::main" - :depends-on (:clip :shasht :pathname-utils))