home *** CD-ROM | disk | FTP | other *** search
- /* ConvertCGtoPS.tsrx */
- /* Copyright 1993 Soft-Logik Publishing Corporation */
- /* May not be distributed without Soft-Logik Publishing Corporation's express written permission */
- /* $VER: 1.0 */
-
- /* Purpose: Convert Compugraphic Intellifont to PostScript Type 1 font */
-
- /*TRACE ?i*/
-
- ADDRESS 'TYPESMITH'
- OPTIONS RESULTS
-
- /* Get the Intellifont filename to convert */
- get_file 'Select a Compugraphic font...|Ok|Fonts:_Bullet_Outlines|'
- IF RC=5 THEN DO
- display_alert 'No file selected!|Exit'
- EXIT
- END
-
- /* Import the Intellifont */
- InFile=Result
- import_if InFile
-
- /* Get the export path */
- get_string 'Enter the PostScript path, if desired.|Ok|Same path'
- OutPath=Result
- PathLength=LASTPOS(InFile,'/')
- IF RC=5 THEN DO
- /* Cut out the path portion of the InFile string */
- OutPath=LEFT(InFile,PathLength)
- END
-
- /* Create the new font name and output path */
- FontEnd=LASTPOS(InFile,'.')
- IF FontEnd=0 THEN FontEnd=LENGTH(InFile)
- OutPFB=SUBSTR(InFile,PathLength,FontEnd)||'.PFB'
- OutAFM=SUBSTR(InFile,PathLength,FontEnd)||'.AFM'
-
- /* Export the font in PostScript format */
- export_pfb OutPath||OutPFB
- IF RC>0 THEN DO
- display_alert 'Export PFB failed.|Exit'
- EXIT
- END
- export_afm OutPath||OutAFM
- IF RC>0 THEN DO
- display_alert 'Export AFM failed.|Exit'
- EXIT
- END
-
- /* Tell the user we're done */
- display_alert 'Font conversion successful!|Great!'
-