| Font
Chooser |
||||
Description FONT-CHOOSER presents a modal dialog box which allows the user to pick a font, size and style. The function has the following arguments:(font-chooser :window-title :fonts :sizes :text :default-font) :WINDOW-TITLE sets the title of the window. It defaults to "Select a font". :FONTS should be a list of fonts to choose from. It defaults to *FONT-LIST*, the list of all available fonts. :SIZES should be a list of font sizes to choose from. The user is not limited to these sizes only, since he or she can enter a font size manually. :SIZES defaults to '(9 10 12 14 18 24). :TEXT should be a string, the contents of which is presented as sample text in the dialog box. The user can edit this text, which always will be displayed in the currently selected font, size and style. :DEFAULT-FONT should be a fontspec. This font/size/style will be selected when the dialog box is opened. FONT-CHOOSER returns two values: a fontspec describing the selected font, and the sample string, which may have been changed by the user while selecting a font. The original string will not be modified. An example The following function call (font-chooser :text "I vas ze vessl srough vich 'Le Sacre' passt"
:sizes '(9 10 34 89 100)
:default-font '("Hoefler Text" 24 :italic))
puts up the following dialog: |