| As Osman said, a procedure to do this exists.... in the VT240.
Blast your big characters to a graphics terminal and ask it
to send the sixels back. If for your purposes 1/2 inch equals
two lines on the screen then you are in luck: Use the double
height escape sequence (<ESC>#3 for top half, #4 for bottom).
If not, you will have to dream up the regis sequence to do
so (manuals are extremely handy in those circumstances :-) or
use DECSLIDE once to make a regis file with the appropriate
text size and extract the regis from there.
Note that DECSLIDE can do the conversion for you, but is also
uses the terminal! INcluded is a sample program in BASIC.
Regards,
Hein.
1 OPTION TYPE = EXPLICIT
!
! Basic source by Hein van den Heuvel, Valbonne oct-1985.
on error go to Hell !
!
! This program will read a VT125 or VT240/VT241's graphic screen
! and dump the information back to the computer into a file name
! specified by the user. The file will be in a SIXEL format that
! may then be spooled of to a graphic printer (LA50, LA100, LA12)
!
!
! Note : Do NOT type any characters on the terminal's keyboard
! after the file name is supplied to this program, that
! is, until the operating system prompt re-appears.
!
EXTERNAL LONG CONSTANT SS$_NORMAL, IO$_READVBLK, &
IO$M_NOECHO, IO$M_ESCAPE
EXTERNAL LONG FUNCTION SYS$ASSIGN, SYS$QIOW
DECLARE LONG CONSTANT Io_Size = 200
DECLARE STRING CONSTANT Device = 'TT:' ,&
Gon = ESC+'Pp' ,&
Goff = ESC+'\' ,&
To_Computer = ESC+'[?2i' ,&
To_Printer = ESC+'[?0i' ,&
Hard_Copy = 'S(H)'
DECLARE STRING File_Name, LONG S
MAP (X) WORD Io_stat, Io_len, Fill, Trm_Len, Channel
MAP (Y) STRING Char = 1000
DEF LONG FN.SYS ( STRING SYSCAL, LONG SYSSTAT )
IF ((SYSSTAT AND 1%) = 0%) THEN
PRINT Goff; "SYS Error"; IO_STAT; " calling "; SYSCAL
CALL LIB$STOP ( SYSSTAT BY VALUE )
END IF
IF (IO_STAT <> SS$_NORMAL) THEN
PRINT Goff; "IO Error"; IO_STAT; " calling "; SYSCAL
CALL LIB$STOP ( IO_STAT BY VALUE )
END IF
FN.SYS = SYSSTAT
END DEF
! Get the terminal's channel number for the QIO.
Io_Stat = SS$_NORMAL
S=FN.SYS("Assign",Sys$Assign (Device,Channel,,))
! Ask for file name and create it, This would all probably be done
! differently in a permanent version.
!
PRINT ESC; "[23;1H"; ESC; "[JDump File name";
INPUT LINE File_Name
OPEN EDIT$(File_Name,6%) FOR OUTPUT AS FILE #1%, &
RECORDTYPE NONE, MAP Y, EXTENDSIZE 9
PRINT ESC; "[23;1H"; ESC; "[J";
!
! Re-direct I/O from printer port to the communication port,
! enter ReGIS graphic mode on the terminal,
! issue the SIXEL dump command to the terminal for hardcopy.
!
PRINT To_Computer; Gon; Hard_Copy;
!
! Get the initial data sent, synchronize on the first <ESC> \
!
WHILE (Trm_Len<>2%) OR (SEG$(Char,Io_Len+1%,Io_Len+2%)<>Goff)
S=FN.SYS("GET INIT", Sys$QIOW (,Channel BY VALUE, &
IO$_READVBLK+IO$M_NOECHO+IO$M_ESCAPE BY VALUE, Io_Stat,,,&
Char BY REF, Io_size by value,,,,))
NEXT
!
! Now get some real data (SIXEL bit map data and terminate on <ESC> \
!
Trm_Len = 0%
WHILE (Trm_Len<>2%) OR (SEG$(Char,Io_Len+1%,Io_Len+2%)<>Goff)
S=FN.SYS("GET DATA", Sys$QIOW (,Channel BY VALUE, &
IO$_READVBLK+IO$M_NOECHO+IO$M_ESCAPE BY VALUE, Io_Stat,,,&
Char by ref, Io_size by value,,,,))
PUT #1%, COUNT Io_Len + Trm_Len
NEXT
PRINT Goff; To_Printer;
GO TO 2
HELL:
PRINT Goff; ERT$(ERR)
RESUME 2
2 END
|
| Additional Clues:
I used DECSLIDE to produce a sixel file for each letter in the alphabet
of appropriate size. Half an inch high, etc. I then merged these
files and stuffed them into a DSM routine with tags that matched
what was stored there.
Given a string: "ABCDEFG"
The outside FOR loop was 1:1:5 and concatenated the top line of
sixel for each character in the string. Then the second line, etc
until five variables SIXEL(1) thru SIXEL(5) contained what was
required for the entire string. Write it out with another 1:1:5
FOR loop with carriage control at the end of each line.
This approach doesn't work well. The spacing between characters
gets really trashed, and is worse for longer strings.
It is theoretically possible to conjure most of the permutations
of characters, AB,AC,AD,AE,AF,AG...ZV,ZW,ZX,ZY,ZZ and correct the
spacing between characters. I haven't that much patience...
What I really want is a method for taking a text fragment and
*magically* producing the sixel for half inch letters in a file
somewhere, print the file and then throw the file away. No human
intervention...
hacker notes is pretty appropriate, no?
|