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.

Example

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)    
 

See also

*2021-2-11