1
0
Fork
You've already forked font-select
0
Invoke the operating system's native font-selection dialog for Common LISP.
  • Common Lisp 100%
Paulo Henrique Raposo 5f376cc996 Update gtk.lisp
2026年07月11日 11:57:45 -03:00
.gitignore Initial commit 2026年06月17日 15:07:49 +02:00
defaults.lisp Possible fix for Linux 2026年07月07日 14:34:04 -03:00
font-select.asd System,, package and defaults 2026年06月17日 15:11:40 +02:00
gtk.lisp Update gtk.lisp 2026年07月11日 11:57:45 -03:00
LICENSE Initial commit 2026年06月17日 15:07:49 +02:00
macos.lisp Additional files... 2026年06月17日 15:12:20 +02:00
package.lisp System,, package and defaults 2026年06月17日 15:11:40 +02:00
protocol.lisp Possible fix for Linux 2026年07月07日 14:34:04 -03:00
README.md System,, package and defaults 2026年06月17日 15:11:40 +02:00
win32.lisp Additional files... 2026年06月17日 15:12:20 +02:00
yad.lisp Possible fix for Linux 2026年07月07日 14:34:04 -03:00

font-select

Invoke the operating system's native font-selection dialog and get back an a font description. Standalone library; mirrors the structure of file-select (SOURCE CODE).

API

(font-select:select :default font :variant variant)

DEFAULT and the returned FONT-PLIST share one shape:

(:family STRING :size INTEGER :weight (:regular|:bold) :slant (:roman|:italic)).
;;; => (values (FONT-PLIST) SUCCESS)

On macOS the system font is returned as '(:family :system ...) (the literal ".AppleSystemUIFont" is not name-resolvable; the caller re-resolves).

VARIANT is one of :FULL (default), :COMPACT, :MINIMAL — selects how many widgets the native dialog exposes. Honoured by the win32 backend; ignored by yad (and by macos for now, until the validModesForFontPanel: bridge is implemented)."

EXAMPLE:

(font-select:select)
;;; (:FAMILY "Verdana" :SIZE 12 :WEIGHT :REGULAR :SLANT :ROMAN)
;;; T

TODO

Not tested on Linux.