/*********************************************/ /* */ /* PreviewFonts v1.0 */ /* An AREXX script for Wordworth 5 */ /* By Adam Dawes (Adam@beachyhd.demon.co.uk) */ /* 17th April 1996 */ /* */ /*********************************************/ Options Results /*-- First try to locate Wordworth 5's font directory --*/ success = open("fontpath","ENV:WordWorth/WWfonts") if success = 0 then do RequestNotify "Unable to open ENV:Wordworth/WWfonts" exit end fontpath = readln("fontpath") call close("fontpath") /*-- Make sure the path ends with either a "/" or a ":" --*/ if right(fontpath,1) ~= ":" & right(fontpath,1) ~= "/" then fontpath = fontpath"/" /*-- Try to open the font list file (to check that we've found it ok) --*/ success = open("fontlist",fontpath"UFST/FontList") if success = 0 then do RequestNotify "Unable to open "fontpath"UFST/FontList" exit end call close("fontlist") /*-- Sort the fontlist so that we can list them fonts in alphabetical order --*/ address command "sort FROM "fontpath"UFST/FontList TO T:FontsSorted" /*-- Find the sorts of fonts to scan --*/ WizardReq TITLE "PreviewFonts v1.0 by Adam Dawes" LABEL "Please select the type of fonts you wish to preview:" Button 0 "_Intellifont" Button 1 "_Postscript" Button 2 "_TrueType" Button "-2" "_All" Button "-1" "_Cancel" fonttype = Result if fonttype = -1 then exit /* user clicked "cancel" */ /*-- Set the page up ready for the font previews --*/ New Address Value Result Document A4 "0.5cm" "0.5cm" "1cm" "1cm" 2 "0.5cm" CentreJustify /*-- Open our sorted fontlist file --*/ success = open("fontlist","T:FontsSorted") if success = 0 then do RequestNotify "Unable to open T:FontsSorted" exit end /*-- Now read through all the fonts --*/ do until eof("fontlist") currfont = readln("fontlist") thistype = right(currfont,1) currfont = left(currfont,pos(",",currfont)-1) if thistype = fonttype | fonttype = -2 then do Font NAME currfont SIZE 16 Text currfont": Ea1" NewParagraph end end /*-- Close and dispose of the sorted fonts file --*/ call close("fontlist") address command "Delete T:FontsSorted QUIET" RequestNotify "Finished!"