Making Preset Shapes From Dingbat Fonts


Copyright © February, 2004 SuzShook

sample dings

dot   Script Summary:

The purpose of this script is to create PSP Preset Shapes from a dingbat font. The script will place the dingbat characters on a 600x600 pixel canvas. The script converts the text to curves as single shapes, and then renames each sublayer to include the name of the dingbat font plus the typed character - this will ensure uniqueness.

This script runs in the Pause Script format. The first part of the script creates the vector image to hold the shapes, and then pauses for the user to set the font name and point size in the Tool Options palette.

Note: Be sure the 'Remember text' box is UNchecked in the Text Entry dialog - if this box is checked, the last used font will be used, and not the font chosen in the Text Tool Options palette.

The script then continues and adds all the characters from the dingbat font to the image, renames the sublayers, and prepares the image for exporting. This part of the script takes a few seconds to run, and is not complete until this message appears:

msgbox

Some fonts have unassigned keystrokes and these may show up as small rectangular boxes. In most cases, the script recognizes these boxes, and eliminates them, but in some cases, they will still be printed. Also, in rare cases, the code I use to distinguish unassigned keystroke boxes from valid characters may eliminate valid box shapes. If this happens, and you really want that missing box shape, just add the missing character during the pause, convert it by choosing Objects...Convert Text To Curves...As Single Shape, and rename the layer like the others in the image. I've only seen this happen with one font which consisted entirely of box shapes, and I've tested several hundred. Chances are you won't even notice the missing one(s)!

During the second pause, the user can remove any small boxes resulting from unassigned keystrokes (See Notes and Tips below) and/or any unwanted shapes, rearrange shapes within the image, and crop the image as necessary.

Note: It is possible for the edge of particularly wide dings to extend off the right side of the canvas. Do not worry about these objects as the export process will bring them back onto the canvas.

Click the Play button to continue, and the image is exported as a collection of individual PSP shapes.


dot   Installation Instructions:

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


dot   Plugin Settings:

N/A


dot   Running the Script:

To run this script, select the ss-MakingPresetShapes-06 script in the scripts list and press play.
run script icon Run Script for me.



dot   Change History:

Notes and Tips:
checkmark In many dingbat fonts, not all keys on the keyboard are mapped to the font. When no glyph is assigned to a keystroke, the resulting shape can be a small box, and may look like this:

unassigned keystrokes

During the second pause, the small boxes for the unassigned keystrokes that were not removed by the script can be removed by the user. There are several ways this can be done:

  • Perhaps the easiest way to remove the unwanted objects is to use the Object Selector tool (which is activated just before the pause) to surround several objects at one time. When you press the DELETE key, all the objects and their sublayers will be deleted at once:

    bounding box

  • Alternately, you can click on the object you want to remove with the Object Selector tool - when it becomes a four-headed arrow, like this:

    four-headed arrow

    left-click on the object. Press the DELETE key when you see the bounding box surround the object you want to remove, like this:

    bounding box
  • A third way to remove unwanted objects is to click on the sublayer that shows the small box and press the DELETE key. Be sure the Layer Name is in bold text, showing the sublayer is selected as in the following example. The CattArt-> layer is selected, and if the DELETE key is pressed, that sublayer will be deleted:

    layer palette with layer highlighted

    Note that if you press the DELETE key when no sublayer is selected, you may lose all sublayers. If that happens, UNDO (CTRL + Z) and try again.

checkmark After the second pause, you will be presented with the Export Shape Library dialog. A file name constructed from the name of the dingbat font will appear in the text box. Use this name, or replace it with a unique name for this Shape Library, preferably one including the name of the dingbat font used. Click OK to complete the creation of the Shape Library.