Making Alpha Characters From Fonts
The purpose of this script is to create a sheet of formatted alphanumeric characters, or individual alphanumeric characters, from any font. This script is particularly intended for "scrappers" but can be used by anyone wishing to create a collection of formatted font characters for other graphic work. The script starts with a 500 x 500 pixel canvas and enlarges the canvas as needed if a single sheet is requested. If multiple images are to be created, the script will create an image for each character individually, format the character, and save it before proceeding to the next character. Multiple images can also be created using a pre-allocated template image.
Images created by this script will be named for the font used to create them. For example, if the Arial font is used:
Setting the AlphaType variable to 3 allows the user to use a pre-allocated template for the separate alpha characters. When this option is selected, the template will be used for each character in the CharacterSet, and the text layer will be added above the layer that is active in the Layers palette when the script runs. In addition, the alpha character will be centered before it is formatted. This option allows you to 'dress up' your final alpha images; however, you will need to experiment with the placement of any tubes or other items in your template before executing the MakingAlphas script. Here's a sample image with a flower tube used to decorate the alpha character:
Copyright © June, 2006 SuzShook
Script Summary:
Arial-BlueVelvet
- Arial-a-BlueVelvet
- Arial-b-BlueVelvet
- Arial-c-BlueVelvet
- etc.
- Arial-1-BlueVelvet
- Arial-2-BlueVelvet
- etc.
- Arial_A-BlueVelvet
- Arial_B-BlueVelvet
- Arial_C-BlueVelvet
- etc.
- For the character "(": Arial-leftparenthesis-BlueVelvet
- For the character "*": Arial-asterisk-BlueVelvet
- etc.
The template used to create this image had 2 layers - the bottom layer was filled with white, and the next layer had the flower tube placed on it. Before running the MakingAlphas script, the bottom or white layer was made the active layer. Therefore, the text layer was inserted just above the white layer, which was below the flower tube - in this way, the alpha characters were always inserted behind the flower.
Note: The pre-allocated template, when used, will not be permanently modified by this script. When this option is chosen, the alpha character layer is deleted once the image is saved, and the template is re-used for the next character. At the end of the script, the template is closed without being saved.
The script does a considerable amount of validity checking at the beginning. For example, it checks to see whether the script is running from a Trusted folder, and whether the Format script and CharacterSet file can be found. Any failures or anomalies detected during this process are clearly reported to the user, and the script is aborted. If no problems are detected, the image or images are created and saved in the format and location specified in the user options.
IMPORTANT NOTE: Please keep the Script Output palette (SOP) open during the execution of this script - important instructions will be printed to the SOP during the execution of the script. To open the SOP, choose View...Palettes...Script Output, or press the shortcut key, F3 (SHIFT+F3 in PSP9 and above). Make the SOP large enough so that you can read the generated messages. I find that 6 inches by 4 inches works well.
Installation Instructions:
You will probably find a use for one or more of these character sets when you are creating your "alpha sheets". You can also build your own character sets - just insert one character per line, leave no blank lines, and save the resulting file as a .txt file. I would advise keeping all your character sets files in the ss-MakingAlphas Quick guide folder so that everything is together.
You can even use ASCII characters in the CharacterSet file when you are created single alpha sheets, as long as those characters are available in the font being used.
NOTE: Caution - do not use ASCII characters in a CharacterSet when you have requested individual images for each character (AlphaType = 2). There is a problem with this version of the script which does not allow building of the file name with ASCII characters. I am working to resolve this problem, and will publish a new version of the script as soon as I figure out why the script fails in this instance. Be aware that if you attempt to use ASCII characters when option 2 is selected for the AlphaType variable, the script will fail with a UnicodeDecodeError.
See Notes and Tips below for tips on getting ASCII characters into your CharacterSet files for AlphaType = 2 runs. Here's a small sample I made using assorted ASCII characters:
Plugin Settings:
N/A
Running the Script:
Here are the actions you must take before running the MakingAlphas script:
See Note and Tips below for tips on format scripts.
Here's that same section, with the variables filled in on my system:
Your path names might be considerably longer than mine, especially if you are using the My Documents location for your PSP files. Just be sure you have the complete path name for each of the first three variables. See Notes and Tips section below for tips on extracting complete path names.
Each of the seven variables listed above is fully documented in the script - you will want to read the included documentation when you update those fields. Briefly, here's what each of these fields represents:
NOTE: Maximum size allowed in this script is 500 pixels. Using a larger font size slows down the process considerably, and may cause PSP to crash. Therefore, if you choose a font size greater than 500 pixels, it will be changed by the script to 500.
'Host Version': u''
to:
'Host Version': u'10'
Note: It is extremely important that the Host Version says 10 (or 10.01 or 10.02 or 10.03 - it's the 10 that's important). Text will not render correctly (or predictably) in PSP X if the system does not know you are running that version. You "tell" PSP you are running PSP X using the Host Version parameter. Thus, for text to render correctly in PSP X, it is essential that you set this parameter to 10, and set the Text Units parameter to Pixels.Leaving the Host Version set to '10' won't prevent the script from running in other versions of PSP. You may get this warning message in lower versions of PSP:
but you can safely click the OK button and continue processing the script.
When you have completed the above tasks, you are ready to run the MakingAlphas script. Find the ss-MakingAlphas script in the Select Script droplist on the Script toolbar, make sure the Toggle Execution Mode button is set to run the script in Silent mode, and click on the Run Selected Script button to run.
The first part of the script generates a Welcome message which reminds the user about the preliminary steps that must be taken. Read these instructions carefully to be sure all is in place for this script to run successfully. Move the Message Box out of the way so you can read what has been printed in the Script Output palette (SOP). If you don't have the SOP open, click on the Cancel button in the Welcome message, activate the SOP, and then start the script again.
When you click the OK button in the script summary Message Box, the script continues and lists the options you have chosen in the SOP. If these are correct, click to OK button to proceed. If there are errors, click the Cancel button to stop the script, correct the errors, and restart the script.
When all has been verified, the script builds the alpha characters image(s), adding your formatting and saving the image(s) in your chosen location.
Note: Be aware that this process can be very slow when building a single sheet with a large font character size and a complex Format script. The script may slow to a crawl at times. Note that the script is not complete until the "Mission accomplished!" message appears in the SOP.
Change History:
Notes and Tips: | |||||||||||||||||||||||||||||||||||
![]() | To get the path name "right" for a folder, try the following:
|