home *** CD-ROM | disk | FTP | other *** search
- /* MAKE LIBRARY: export a font as IFF DR2D drawings */
- /* Copyright 1993 Soft-Logik Publishing Corporation */
- /* May not be distributed without Soft-Logik Publishing Corporation's express written permission */
- /* $VER: 2.0 */
-
- /* Note: characters must exist to be exported! */
-
- ADDRESS 'TYPESMITH'
- OPTIONS RESULTS
- TRACE OFF
-
- /* Screen to front */
-
- to_front
-
- /* get the file name prefix for the drawings */
-
- get_string 'Enter the filepath and filename prefix:|Ok|Exit'
- IF RC=5 THEN EXIT
-
- library=RESULT
-
- /* FIND WHICH CHARACTERS TO EXPORT */
-
- firstchar=1
- lastchar=255
-
- display_alert 'Export all the characters in the font?|All|Some'
-
- IF RC=5 THEN DO
-
- /* get the start and end characters to export */
-
- Get_First:
- get_string 'Enter the number of the first character:|Ok|Exit'
- IF RC=5 THEN EXIT
- firstchar=RESULT
- IF (firstchar<1)|(firstchar>255) THEN DO
- display_alert 'Must be between 0 and 255.|Continue'
- SIGNAL get_first
- END
-
- Get_Last:
- get_string 'Enter the number of the last character:|Ok|Exit'
- IF RC=5 THEN EXIT
- lastchar=RESULT
- IF (lastchar<firstchar)|(lastchar>255) THEN DO
- display_alert 'Must be between the first character and 255.|Continue'
- SIGNAL get_last
- END
- END
-
- /* EXPORT LOOP */
-
- exportcount=0
-
- DO i=firstchar TO lastchar
- goto_char i
- filename=library'.'i
- export_dr2d filename
- exportcount=exportcount+1
- IF (RC~=0) THEN DO
- display_alert 'File error!|_Exit'
- EXIT
- END
- END
-
- display_alert ' 'exportcount' character(s) exported!|Exit'
-
- /* THAT'S ALL SHE WROTE */
-