Package: gtk

Function gtk:font-chooser-set-filter-func

Lambda List

gtk:font-chooser-set-filter-func (fontchooser func)

Arguments

fontchooser -- a gtk:font-chooser object
filter -- a gtk:font-filter-func callback, or nil

Details

Adds a filter function that decides which fonts to display in the font chooser.

Examples

A callback filter function to select fonts from the font families "Sans" and "Serif":
;; Define the callback function
(defun font-filter (family face)
  (declare (ignore face))
  (member (pango:font-family-name family)
          '("Sans" "Serif")
          :test #'equal))
;; Set the function FONT-FILTER as the callback function
(gtk:font-chooser-set-filter-func button #'font-filter)
;; Remove the filter function from the font button
(gtk:font-chooser-set-filter-func button nil)    

Warning

The gtk:font-chooser implementation is deprecated since 4.10. Use the gtk:font-dialog and gtk:font-dialog-button widgets instead.
 

See also

#2024-5-22