Invoke the operating system's native font-selection dialog for Common LISP.
|
|
||
|---|---|---|
| .gitignore | Initial commit | |
| defaults.lisp | Possible fix for Linux | |
| font-select.asd | System,, package and defaults | |
| gtk.lisp | Update gtk.lisp | |
| LICENSE | Initial commit | |
| macos.lisp | Additional files... | |
| package.lisp | System,, package and defaults | |
| protocol.lisp | Possible fix for Linux | |
| README.md | System,, package and defaults | |
| win32.lisp | Additional files... | |
| yad.lisp | Possible fix for Linux | |
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.