Skip to content

Commit

Permalink
Add trivial dump command
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinmera committed Jun 29, 2024
1 parent f5402ab commit 75615cf
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ promptfont.lisp
promptfont.lua
promptfont.rs
promptfont.gd
promptfont-compiler.*
*.png
*.zip
*.zip
45 changes: 40 additions & 5 deletions compile.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion glyphs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4022,4 +4022,4 @@
"code-name": "icon-shopping-cart",
"tags": []
}
]
]
6 changes: 0 additions & 6 deletions promptfont-compiler.asd

This file was deleted.

0 comments on commit 75615cf

Please sign in to comment.