Making Custom Brushes From Dingbat Fonts


Copyright © February, 2005 SuzShook

sample dings

dot   Script Summary:

The purpose of this script is to create PSP 8/9 brushes from a dingbat font. The script will place each valid dingbat character on a 500x500 pixel canvas, convert the character to curves as a single shape, and then fit the character to the canvas. Once the brush has been resized to fit the canvas, the canvas is cropped and the brush is exported, using a unique name built from the name of the dingbat font plus the typed character.

Note: Some fonts have unassigned keystrokes or keystrokes that show up as small rectangular boxes. The script is designed to bypass these.

This script runs in the Pause Script format. The first part of the script creates the 500 x 500 pixel image to hold each brush, and then pauses for the user to select a dingbat font and set its point size, stroke width, and anti-alias options in the Tool Options palette, and the materials for the brush in the Materials palette.

Note: In PSP 9, be sure the "Remember text" option is NOT selected in the Text Entry box. If that checkbox is checked, the last used font will be used, and NOT the font selected on the Text Tool Options palette.

The script then continues, creating a brush from each of the valid characters in the font. If you want to see the Create Brush Tip dialog for each valid dingbat font character, run the script in Interactive mode. If you want to have each font character Brush Tip saved with no intervention from you, run the script in Silent mode. Though it's nice and quick to run through all the characters in the font silently, the advantage of seeing the dialog for each character is that you can choose to save that particular brush tip, or discard it, and still continue with the next dingbat character.

Note: If you choose to run this script in Silent mode, and a brush tip exists with the name being generated by the script, the existing brush tip will be overlaid. If you do not want that to happen, change the OverwriteExisting parameter of the ExportCustomBrush command in the script from "true" to "false". If this is done, and the name exists, a new name will be generated by PSP (NOT the script) with a 001 appended to the name. Should you try to create a brush tip with that same name a 2nd time, the new one will be have a 002 appended, and so on.

In Interactive mode, if a brush tip exists with the name being generated by the script, you will receive this message:

'A file with the name "xxxxx" already exists. Please choose another name.'

and the file will not be saved unless you choose another name.

I had to get creative with file names. There were two problems I had to address:

  1. Case does not matter in Windows file names. Therefore, Dingbat1-a and Dingbat1-A are considered to be duplicate file names. To make the brush names different and unique, I used the underscore character (_) in file names for brushes made with lower case letters, and the hyphen (-) for file names for brushes made with upper case letters. Thus, my two "a" brushes would be Dingbat1_a and Dingbat1-A.

  2. The second problem I had to address was the list of characters not allowed in file names. Here's that list, and the "creative" substitutions the script makes for them:

    \ bslash
    / fslash
    : colon
    * asterisk
    ? quest
    " dquote
    < LT
    > GT
    | vline

In you run the script in Interactive mode, you will see the Create Brush Tip dialog, which looks like this:

msgbox

There are several things you can change on this dialog panel if you wish:


dot   Installation Instructions:

Place the script in your Scripts-Restricted folder, or run the script from this Quick Guide (see Running the Script below).

Note: In PSP 9, if you wish to be able to change the "Save to" folder for Brushes during the export process, you will need to place this script in a Scripts-Trusted folder. Otherwise, and in PSP 8, you need to change your "Save to" folder for Brushes using File...Preferences...File Locations before running the script, which can run from a Scripts-Restricted folder.

dot   Plugin Settings:

N/A


dot   Running the Script:

To run this script, select the ss-MakingCustomBrushes-00 script in the scripts list and press play.
run script icon Run Script for me. (See note above before using this method.)



dot   Change History:

Notes and Tips:
checkmark I recommend setting the font size to 500 - the script will adjust the character to fit the canvas.
checkmark For best results, use very dark materials - like black or dark blue.
checkmark If you do not want any stroke, either set the stroke width to 0.0 in the Tool Options palette, or set the Foreground Material to Transparent (Null) in the Materials palette.
checkmark If you want a stroke-only brush, set the Background Material to Transparent (Null) in the Materials palette.
checkmark If you want to see and approve each brush tip, run the script in Interactive mode. If you run the script in Silent mode, each brush tip will be saved without any intervention from you.