home *** CD-ROM | disk | FTP | other *** search
- /./ This is, again, a JGPrint file, to be JGDocced to produce a well laid-out
- .// document.
- .// Source of JGPrParmInfo
- .setu 10 :arc: In/exclude archimedes only features. see .if/fi below
- .// .setu 10 :msdos: Ex/include msdos only features.
- .sp 0 Comment out if Pages wanted; default 66 lines (.sp 66)
- .ft
- /
-
- .col
- |Page \p
-
- /
- .hd
- :
-
- .if \o
- .col
- Wed,14 Apr, 1994|JGPrint Configuration Parameters
- .else
- .col
- JGPrint ConFiguration Parameters|Wed,14 Apr 1993|
- .fi
-
- This Document is designed to help those who are preparing a configuration file
- for a new printer. In most cases, your printer will be like one for which a
- configuration file already exists, and you will be modifying a copy of the one
- for that similar printer, and be only concerned with a few of the sections below.
-
- However, since JGPrint's design aim is very different indeed from that of
- Acorn's Printer Drivers, it seems worth contrasting the two, and discussing
- ways in which they might co-operate. A sorted list of configuration parameters
- is provided at the end.
-
- .col
- |The Acorn Printer Drivers
-
- These seek to create on the paper an identical appearance to that which the
- Archimedes produces on the screen.
-
- Thus, unless fixed-width fonts are being used, the user has no need to know, in
- principle, about the fonts built into the printer, and, in particular, about the
- width of characters in the printer's proportionally spaced fonts, since the
- driver makes no attempt to use these, using instead the printer's graphic
- capabilities.
-
- The user also does not need to know about the top-bit-set printer characters,
- since the Acorn printer drivers seek to force the printer to provide the Acorn
- character set irrespective of the printer's built-in character set.
-
- A consequence of this is that the Acorn printer driver works in terms of the
- computer's VDU5 (graphic) characters.
-
- .col
- |JGPrint's Configuration files.
-
- JGPrint aims to get as full a use as possible of what the printer provides.
-
- Therefore its configuration needs to know about the printer's fonts, and, in
- particular, about the width of the printer's proportionally spaced characters, in
- order to be able to provide elegant justification. Given a configuration file,
- the ordinary user does not, of course, need to know these details.
-
- JGPrint uses the printer's own top-bit-set characters. Howver, the characters
- £(pound) and #(hash) are, extraordinarily, given a special mapping.
-
- There is an additional mapping, the 'hatty' mapping, that can be set in the
- configuration file, from the non-top-bit-set ink characters to any character, so
- that, for example, ^^p -> <n>(greek pi>, where <n> is the byte in the printer's
- character set that prints pi (240 ð in Acorn's Greek alphabet)
-
- .col
- |Comparison
-
- These two design approaches have each their own advantages, and it would be
- silly to say that either is 'best'. The Acorn approach provides highly flexible
- WysiWyg, and the printing of whatsoever is representable on screen; JGPrint is
- more demanding of a user who wants top-bit-set characters, but easily
- enables the highest quality printing a non\-Postscript printer is capable of,
- in circumstances where using Archimedes fonts and justification may well lead to
- a mismatch of the positions of the pixels to be printed with the grid of
- 'needle' points to which the printer is constrained.
-
- The way in which Acorn approach top-bit-set characters ensures that what can be
- shown on the screen can be output to the printer. However, mappings that require
- backspace and/or vertical movement of the print\-head get very hairy indeed when
- using multiple point fonts (vertical movements) or multiple cpi (horizontal
- movements); indeed, I think that Acorn's method of recording and modifying this
- mapping is unable to cope with printers' proportionally spaced characters, since
- these require horizontal movements based on their individual width, rather than
- some fraction of the standard backspace - to which, it appears at present, the
- Acorn mappings are constrained. JGPrint's hatty mapping is less convenient for
- the user, but, most importantly, it will handle all the printer's 'vdu'
- characters as well as the top-bit-set characters.
-
- The special treatment of £ and # in JGPrint can be seen as a very simple form of
- the Acorn mapping approach, to provide WysiWyg where it matters most. I am
- contemplating extending this, allowing a generalised form of the Acorn mapping
- approach to handle common mappings, and leaving the hatty mapping to provide
- printer characters that are not included in the Acorn fonts.
-
- .col
- JGPrint and the printer driver
-
- I recommend that JGPrint and/or JGPCopy be run without the help of !Printers.
- !Printers will use JGPCopy to print JGPCopy type files. However I am not very
- confident of the robustness of these arrangements, which will improve as I
- understand the printing arrangements more clearly.
-
- !jgp set Alias$@print_<jgpCopy> to <jgp$dir>.!jgp.!runimage 4 %0, which
- dispatches JGPrSlave While JGPrSlave is running, it responds DeviceInUse to
- DeviceClaim for the device it is using, ie the Parallel/Serial Port. In
- !Jgpcopy, JGPrSlave is started directly from JGPCopy.
-
- .col
- |JGPrint Configuration files
-
- Most, but not all of the printer codes and parameters(Sizes) are mentioned here.
- Others are self\-evident, unimportant or obsolescent.
-
- I would not recommend you to study this document until you are familiar with
- the use of both JGPrint and JGConfig.
-
- I recommend you to Dump (SH-Menu in JGConfig ) and spool a configuration
- supplied, so that you can see the Code strings, Size values and proportional
- width numbers in use for some printer. The codes are listed, with brief comments
- as an appendix below.
-
- .col
- \s1|Printer Code Parameter Representation
-
- Certain printer codes, e.g. spacing or HMI, require a numeric parameter that
- expresses e.g. the size of movement required for each particular use.
-
- JGPrint passes to the code output routine the actual parameter required, and it
- is the job of the configuration to send that number to the printer in precisely
- the way that the manufacturer has prepared the printer to receive it.
-
- The position in the code string for the parameter to be inserted is indicated by
- the occurence of the byte '%'. The letter following this determines how the
- parameter is to be specified to the printer.
-
- Suppose the parameter is 53: if byte specification is required, '%' should be
- followed by 'I'/'i', and the byte 53('5') will go to the printer; alternatively,
- if numeral specification (digit sequence) is required, '%' should be followed by
- 'J'/'j', and '5'(53), '3'(51) will go to the printer.
-
- As seen above, lower and upper case letters have the same effect, and,
- henceforth, I will only give the upper case version. '%'+'%' will send a single
- '%' to the printer. Some printers require this, e.g. to choose between internal
- and user supplied character sets.
-
- .col
- \s2|Epson Style
-
- Byte specification is typical of the needs of Epson printers, and IBM, Canon,
- Seikosha, Star, etc., which are very similar but, unfortunately, rarely if
- ever identical. A problem with this style is the impossibility of expressing
- negative numbers, so that moving the printhead up or down the page requires two
- distinct codes, rather than a single code with positive and negative parameters;
- left and right printhead movement has the same problem. Attempts to send a
- negative number to the printer in these cases is reported. I have never
- encountered this error.
-
- A lesser problem is that a single byte can only express numbers between 0 and
- 255 (inclusive), and that large head movements may require larger numbers. The
- solution normally adopted is to send two bytes <n1><n2> to express <n1> +
- (256*<n2>). This allows numbers up to 65535 to be sent to the printer. '%'+'B'
- should be used in the printer code to send the printer parameters in this style.
-
- A second style available is '%'+'E', which is used to send a number of unit
- graphic movement commands preceded by an Epson twobyte count. I used it to
- provide FGFJ movement on an old Star printer; it is now obsolescent, if not
- already obsolete.
-
- HP style (see below) allows two places of decimals to be interpreted by the
- printer for certain codes. To take advantage of this, the internal parameter
- 'Point' is held as a multiple by 100 of the value required. I may extend this to
- 'Pitch' and some other parameters, in which case Epson Style will use '%'+'C' to
- send the printer <n>/100, losing the two decimal places. There will be no need
- for the JGPrint user to be aware of the change.
-
- .col
- \s2|HP Style
-
- Numeral style is typical of Hewlett-Packard's DeskJet and LaserJet printers, and
- those such as Olivetti which emulate these. They seem to me to have a tendency to
- be rather lengthy, but, conversely, it is difficult to get an unintended
- meaningful code by accident.
-
- '%'+'J' follows the normal mathematical convention of omitting '+' for positive
- integers, but including '-' for negative integers. HP codes, however, are of two
- forms, where, on the one hand, the '+' is not required, eg. <esc>*p<n>X, which
- sets the printhead to absolute horizontal position <n> on the line, and, on the
- other, one where the '+' or '-' must be explicitly sent to the printer, eg.
- <esc>p*+<n>X and <esc>p*-<n>X, which move the printhead relatively
- <n> to the right and relatively <n> to the left, respectively.
-
- '%'+'J' handles the first case. Almost certainly a negative number in the codes
- concerned would be an error, but, so far, I have not included a diagnostic
- check for this. '%'+'V' includes either '-' or '+' before the numeral sent to
- the printer, as required in the second case.
-
- '%'+'D' is used for two-place decimal numerals, i.e. <n> ->
- '<n>/100'+'.'+'<n>rem100'. This is used for Point, where the internal value stored
- is 100 times the point value. This may also be used elsewhere later. Note that
- the user need not be aware of this in the directives she includes in the text.
-
- .col
- \s2|Juki and Qume styles
-
- Printswitch in JGCodeInfo describes '%'+'G', '%'+'H', '%'+'K', '%'+'S', '%'+'T',
- '%'+'W', '%'+'M'. These styles are intended for Juki and Qume configurations.
- However, these have not been tested, and the user may find that they are not
- precisely what is required.
-
- .col
- \s2|Shift Out and Shift In
-
- '%'+'Y' and '%'+'Z' are somewhat different from the preceding forms of
- parameter. They suppose that the printer has two sets of related codes, which
- differ in one character between corresponding codes in each set. An example is
- in HP where '(' and ')' are used, respectively, in primary and secondary font
- specification. The values to include are found, respectively, in the Sizes Sob
- and Sib (Shift Out/In Byte ). '%'+'Z' is used to toggle an internal parameter
- "shiftout", and, according to whether this is true or false, '%'+'Y' chooses Sob
- or Sib to include in the code strings. Note that '%'+'Z' only causes the bytes
- ShiftOut(14) or ShiftIn(15) to go to the printer.
-
- Suppose '%'+'Z' were included in the Portr and Land printer codes, then primary
- fonts would be used for portrait printing, and secondary fonts for landscape
- printing. This facility is subject to detail change in the light of current
- development.
-
- .col
- \s2|Including one code within another
-
- '%'+'@' will include the codestring whose number is specified by the parameter
- within the codestring being written. Note that if you want this to be preceded
- by <esc>, you must include <esc> within the enclosing code specification. See
- init below for an example.
-
- .col
- \s2|If the configuration parameter \I}IsEsc\J is true, the byte 27(<esc>)
- precedes every code string sent to the printer through the 'Writecode' routine.
- This saves quite a bit of space in the configuration code data space. It is also
- possible to write specific codestrings directly, ie omitting the <esc>, and
- this is, in fact, the case for \I}rc(86)\J to \I}Horbyte\J, codes to move the
- cursor on the screen and auxiliary codes for horizontal head\-motion on some
- printers.
-
- .col
- \s1|Vertical Head Motion
-
- .col
- \s2|Vertunit and other scales
-
- The first decision to make is to choose the units in which vertical head motion
- should be specified to the printer, ie the value of \I{vertunit(4)/J. For
- HP-style, in which the same code serves both directions, this will be the value
- supplied to the printer code that realises \I}VMI(55)\J; for Epson style, the
- value supplied to the two codes that realise \I{Downtab(54)\J and
- \I(Uptab(53)\J.
-
- In my HP configuration, I use <esc>*p%VY for vmi, and therefore vertunit=300. In
- my BJ-10e configuration, I use <esc>J%I for Downtab, and therefore vertunit=216.
- There is no code available for uptab; windback, therefore, is not available, nor
- is the possibility of responding to the JGPrint directive \\<. Since the BJ-10e
- is not designed for continuous paper, this lack is neither surprising nor
- bothersome. On a Nec P2200, Uptab was <esc>j%I; deplorably, Canon uses this for
- "stop printing and go off-line".
-
- In order to move further than the (byte) parameter allows, set \I}VMax(49)\J to
- 255, and JGPrint will break large movements down to manageably small ones.
-
- Vertunit is also, other things being equal, used to set line \I}spacing(24)\J.
- Therefore the BJ-10e uses <esc>3%I, rather than <esc>A%I, which uses a unit of
- 72/inch. JGPrint could, however, use <esc>A%I by setting \I}VFeedUnit(52)\J to
- 72 rather than 0, since, if this parameter is non-zero, it is preferred, for
- spacing, to vertunit. The HP configuration must set VFeedunit to 1/48 since no
- printer code is available at the 300 scale, but only <esc>&l%JC. Two other
- spacing codes are available, \I}LpiSpacing(99)\J and \I}LppSpacing(102)\J, to
- set the spacing, respectively, in terms of Lines per Inch and Lines per Page, if
- the directive .sp n so specifies them. The HP configuration realises the former
- by <esc>&l%JD.
-
- .col
- \s2|Pagelength
-
- The directive .PL has a special constraint for the user; it must only be used in
- the prologue of a document. Its use determines the number of 1/2160 units that
- JGPrint allows in a page (0 => no Paging). If you are using continuous
- stationery, your printer will not want to know about pagelength, since, in
- effect, you are using an infinitely long page that you will later cut or tear.
- If you are using cutsheets you should put your form size requirements into
- \I}init(11)\J. In HP this is <esc>&ll6d66pe66F, in BJ-10e <esc>C 0 66. Note that
- the default 6 lines per inch is assumed.
-
- .col
- \s2|Line separators
-
- JGPrint is designed to send both <cr><lf>(13,10) to the printer to effect a
- newline. It sends a simple <cr> to overprint the line to supply vertical bars.
- However, the Acorn printer drivers suppose that <cr> will also cause the printer
- to execute a line feed. Accordingly, sending JGPCopy files to printers via
- Acorn printer drivers may yield unwanted blank lines. The two parameters
- \I}CrAndLn(61)\J and \I}CrAndHln(51)\J if true(1) cause the vertical codes to be
- preceded by <cr>, if false(0) omit the <cr>. Note that if CrAndLn is false,
- vertical bars will probably only produce their intended output if the absolute
- horizontal positioning command \I}Abshor(98)\J is available. NB. see 'carriage
- return' for further discussion.
-
- .col
- \s1|Horizontal Head Motion
-
- .col
- \s2|Horunit and other scales
-
- The first decision to make is to choose the units in which horizontal head motion
- should be specified to the printer, ie the value of \I{Horunit(3)/J. For
- HP-style, in which the same code serves both directions, this will be the value
- supplied to the printer code that realises \I}HMI(55); for Epson style, the HMI
- code is also used, even though most printers can only move the head to the
- right. I have not encountered printers for which a 'Rightab/Leftab' analogue of
- 'Downtab/Uptab' is implemented. I believe that an absolute horizontal position
- code (see above) would also be available with such printers. See also carriage
- return and abshorP below.
-
- In my HP configuration, I use <esc>*p%VX for vmi, and therefore horunit=300. In
- my BJ-10e configuration, I use <esc>d%E, and therefore horunit=216. %E does not
- accept negative numbers, so that a command to move left would be intercepted.
- JGPrint does not use a move left command except in response to a user's \\{<n>
- command, which is not normally required.
-
- .col
- \s1|Pitch and Point
-
- .col
- \s2|Point
-
- Epson style printers do not provide separate codes to control Point(character
- height in units of 1/72") and Pitch (Characters per inch); HP style requires
- Point and Pitch to be separately controlled. JGPrint therefore provides
- \I}Point(25)\J, which in the HP configuration is set to "%Zs%DV", and in the
- BJ-10e is set to Null. Scaleable JGP 'Fonts' (see below) are scaled with respect
- to point. If, in the directive .Point <n>, <n> > 100, its value is taken to be
- <n>/100.<n> rem 100; values < 100 are scaled up internally.
-
- %Z above will send ')' to the printer if shiftin, and '(' if shiftout, and we
- will encounter many HP codes in which it is used. Note that Null, rather than
- Forbidden, is used so that texts developed for a printer that requires point
- information should not lead to diagnostics on another.
-
- .col
- \s2|Pitch
-
- JGPrint's view of the world is that the 'Pitch' code should provide for
- scaleable sizes, and that cpi5, cpi10 etc. should supersede this for particular
- pitches that may have special characteristics. If 'Pitch' is null, and the cpi
- (characters per inch) requested is not one of these special pitches, or is but
- no special code is set, then JGPrint will complain. Hence \I}Pitch(21)\J is
- '%Zs%JC" for the HP configuration, and Null for the BJ-10e.
-
- .col
- \s2|cpi5 - cpi17 & nlq
-
- For the HP configuration, there is no need, in principle, to provide special
- codes for setting the pitch, but see the discussion of widths, below. For the
- BJ-10e, they are:
- \I}Cpi5(14)\J = [I<5><0><0><11><0><144><1><27>W<1>;
- \I}Cpi6(15)\J = [I50[I<5><0><0>U<0>x<1><27>W<1>;
- \I}Cpi8.5(16)\J = [I<5><0><0><254><0>T<1><27>W<1>;
- \I}Cpi10(17)\J = [I<5><0><0><11><0><144><1><27>W<0>;
- \I}Nlq(20)\J = [I<5><0><0><11><0><144><1><27>W<0>
- Note that the double width set/unset command <esc>W0/1 is appended to the Set
- Font Global command to make available cpi5, cpi6, cpi8.5. Note also that the
- JGPrint directive .cpi 8 yields the code cpi8.5. Note also that Nlq is set to be
- the same as cpi10 in order to make texts containing the directive .nlq
- acceptable to the BJ-10e configuration. Similarly, in HP, nlq is set to
- "%Zs10H".
-
- .col
- \s2|Width
-
- Connotatively, cpi10, cpi6, and cpi5 suggest, respectively, a character
- width of 1/10", 1/6", and 1/5", i.e. 360, 150 and 180 JGPrint Horizontal
- Units of 1/3600". This will be the column width taken by JGPrint when left
- margins, right margins or horizontal tabs are requested with a small argument.
-
- However, more flexibility is provided for cpi8.5, cpi12, cpi17, nlq by the values
- \I}8w(25)\J, \I}12w(54)\J, \I}17w(26)\J and \I}nlqw(27)\J. In the BJ-10e
- configuration, these are set, respectively, to 424, 300, 212, 360, corresponding
- to 17/2 cpi, 12 cpi, 17 cpi and 10 cpi - which are the pitches at which the
- BJ-10e is capable of printing. HP does not provide 6 cpi, 8.5 cpi, 12 cpi or 17
- cpi without extra fonts, therefore .cpi 12 and .cpi 17 will be used to
- make available 16.67 cpi and 20 cpi, the pitches provided.
-
- To do so, 12w is set to 216, and 17w to 180, i.e. 1/16.67" and 1/20" per
- character. This ensures that JGPrint makes appropriate assumptions about the
- width of characters as they are printed, but we still have to send the
- appropriate codes to the printer so that they shall be so printed. These are:
- \I}Cpi12(18)\J = %Zs16.67H; \I}Cpi17(19)\J = %Zs20H
-
- 20cpi can also, and more truthfully, be obtained by the directive .cpi 20, but
- I have preferred to enable texts prepared for the HP printer to be usable on
- other printers and vice-versa; there is, as yet, no other way to get two places
- of decimals to the command for 16.67cpi. I am working on it!
-
- Cpi5, cpi6, cpi8.5, cpi10 and nlq are set to Forbidden; Null or Forbidden cpi
- codes are ignored, and the default code pitch(21) is used.
-
- .col
- \s2|Carriage Return
-
- !printers appears to insist that a carriage return received from the file being
- printed shall both move the printhead to the left edge, and put out a linefeed.
- This causes an extra linespace to be performed by the printer. JGPrint attempts
- to deal with this by using \I}Abshor(98)\J, the absolute horizontal positioning
- printer code, to set the head to the left margin, irrespective of the setting of
- \I}AbshorP(53/J. This also copes with a problem I have encountered on a
- particular printer, where a relative horizontal movement immediately following a
- relative vertical motion appears to be ignored.
-
- If Abshor is not available, setting \I}CrAndHln(51)\J, \I}CrAndLn(61)\J,
- to false(0), suppresses the Carriage return before the vertical motion for,
- respectively, newlines and halflines.
-
- .col
- \s2|Proportionally spaced character widths.
-
- Printer manufacturers approach providing proportionally spaced characters in one
- of two ways: design a character font specifically for their printer's
- dot\-making capabilities, such that their widths are exact multiples of the
- printer's own horizontal movement units; use a traditional typographer's font,
- adjusting it slightly to fit into the printer's dot width and horizontal
- movement units.
-
- The first approach, favoured by e.g. Epson and Canon, keeps the width
- of characters constant, whatever their style, normal or bold, upright or italic,
- full height or sub/super-script. However, only one height (point) and width of
- proportionally spaced characters is provided. JGPrint's 'non\-scaleable' 'fonts'
- are designed to be used in this situation.
-
- The second approach, favoured by HP, normally provides some or continuously many
- sizes of font, and the widths are proportional to the height (point) of the
- font. There is a certain amount of rounding error, particularly for the smaller
- points, that JGPrint ignores, both because it is not always pleasing or possible
- to make the character up of very thin lines, and because of the 'grain' of the
- printer's horizontal motion. However the various styles of characters affect the
- width of the realised form. JGPrint's scaleable fonts are designed to be used in
- this situation.
-
- .col
- \s2|JGPrint Font definition.
-
- The psuedo\-code \I}Propchwidth(60)\J. gives the name in the directory !jgp.q of
- a file containing character widths. Thus two or more configuration files can
- share the same Font information. HP uses the file Jpps-8 and BJ-10e uses CanP.
-
- The configuration parameters \I}PtDiv0/1(28/29) determine whether a JGPrint Font
- is fixed or scaleable, and how to interpret the numbers ( <=255 ) that specify
- the width of the characters when you enter the 'Proportional Character' section
- of JGConfig. For fixed Fonts, Ptdiv0 = 0 (similarly, of course, for Ptdiv1 and
- font1). This is so for the BJ-10e configuration, and the scale implied by the
- width numbers is Horunit, in this case 1/120". In the Canon manual, widths are
- specified in units of dots (1/360"), and the values in this table should be
- divided by 3. Fortunately, but not suprisingly, these are all multiples of 6, so
- no information is lost.
-
- For Scaleable fonts, it is desirable that the width table should use as broad a
- range of values as possible, so that discrimination can be as fine as possible,
- subject, of course, to the need for these values to be less than 255, and the
- non\-zero values of PtDiv0 scale the meaning of the widths values in the
- configuration. For HP 12 point fonts, 400 is a suitable value, giving a range of
- character-widths of 64-252 in units of 3/3600 = 1/1200. The larger the value of
- PtDiv0 the finer the units in terms of which the width-values specify.
-
- If \I}ChsetRomRam(33)\J is 0, the fonts are chosen using \I}Defp(48)\J (default)
- and \I}17p-nlqp(44-7)\J. If ChSetRomRam is 1, the initial Font is forced to 0,
- and using \\x, \\y, \\z forces it to and from Font 1.
-
- .col
- \s2|Discovering widths
-
- JGPrint provides 3 tools at the end of the introductory dialogue to help in
- specifying character widths. They all assume that the various init parameters
- are set to the condition that would be effected after the init printer code has
- been executed, and that various other codes, especially ps, ps0, ital, ital0,
- emph, emph0, Wrapon, and Tochars have been set. Click on any JGPrint file to
- get started. It will, of course, not actually be printed.
-
- JGPrint will assume that the initial characterset (that got by \I}Chrom(51)\J)
- uses Font 0, and that got by \I}Chram(50)\J uses Font 1, i.e. it always acts as
- though ChsetRomRam.
-
- .col
- \s3|See Printer Charset
-
- enables you to print out ranges of the characterset in which printing will
- start. If you want to examine more than 2 charactersets, you must do so in the
- JGPrint printer codes (usually ChRom, ChRam or init), and I advise you to do
- this in a copy of your configuration. Ps0 is executed after init so that the
- result is well-laid out. You can request to see on the screen what you would
- have sent to the printer. \I}Tochar(71)\J 1 precedes all characters, so that
- they are construed as characters rather than controls by the printer.
-
- For this reason, you should avoid the vdu character range if looking on screen
- at what happens.
-
- There are similar facilities in the other 2 tools.
-
- .col
- \s3|See Character widths
-
- You are prompted for the number of characters(<n>) you want to use. I find 50 or
- 60 convenient. You are then prompted for whether or not you want italics or
- bold. \I}Wrapon(104)\J is then set so that you see any line overflow. (I usually
- set \I}Wrapoff(105)\J within init, so that line overflow does not screw up page
- registration.)
-
- This tool alternately uses \I}ps0(37)\J and \I}Ps(36)\J to print an 8" ruler in
- units of 1/10", and, below it, <n> proportionally spaced characters
- across the page, possibly overflowing onto a second line. From this, you can
- make a good estimate of each character's width.
-
- This is sufficient if your scale is large, as may be the case for non-scaleable
- fonts. Thus for the BJ-10e, with an effective scale of 1/60" (=2/120"), the
- required width numbers can be unambiguously read. For scaleable fonts, such as
- that for the HP, the units may be as small as 1/1200"; this allows very fine
- tuning in the width table, with results that may show up as a difference in
- length of as little as 1/60" in 60 characters. The tool described below enables
- fine tuning of the width table to be completed.
-
- .col
- \s3|Adjust Character Widths
-
- This tool is designed to exhibit any discrepancy there may be between where
- JGPrint believes a row of characters to have reached, and where the actual
- characters on the page have, in fact, reached, so that JGPrint's beliefs (as to
- character width) can be modified by reality.
-
- It provides, for the ranges of characters requested, a line of as many
- characters as JGPrint believes will fit into 6", followed by a '|', at the exact
- point at which JGPrint believes the right of the rightmost character to have
- reached. This is the position of the centre of the upright line itself, not the
- blank left pad that precedes it. This will normally be slightly less than 6",
- unless 6"/Character width is 0. The byte number of the character, its Width in
- 1/3600" and the Number of characters is shown on the right.
-
- Note that this facility is designed for printers with an absolute character
- position command. If this is missing, most printers will produce the required
- information, but this is not guaranteed.
-
- .col
- \s2|Emphasized/Bold Characters
-
- \I}Bold0/Bold1(62/63)\J, advises JGPrint of the number of additional columns of
- dots used to embolden proportionally spaced characters, i.e. the increased width
- in Horunits. For fixed width characters this is ignored, and is 0 for most
- non\-scaleable fonts such as the BJ-10e. For the HP Bold0/Bold1 both = 2.
-
- .col
- \s2|Italicised characters
-
- \I}Ital0/Ital1(30/31) advise JGPrint how to handle the width of italicised
- characters. Ital0 = 0 implies that italicised characters are the same width as
- the upright characters. This is the case in BJ-10e. Ital0 = 1 implies that the
- italicised characters are to be found in storage offset from that of upright
- widths; the Proportional Character part of JGConfig prompts to access these
- italic widths. This is the case for the HP configuration, for which Ital0 is 1.
- See the online documentation for the interpretation of Ital0 > 1.
-
- .col
- \s2|Subscripted and Superscripted characters.
-
- Some printers have explicit codes to set the printing to sub- or super\-script.
- This is how the BJ-10e handles these, and it has codes \I}Supscpt(46)\J = <esc>R;
- \I}Subscpt(47)\J = <esc>S. \I}Supoff(48)\J = <esc>T; \I}Suboff(49)\J = <esc>T.
- Others, including HP, require the user to move to a smaller font, and to move the
- line of type appropriately up and down. The following parameters are required in
- the configuration file (with HP values): \I}SubMove(70)\J = 25; \I}SupMove(71)\J
- = 50. \I}SuPitch(72)\J = 17; \I}SuPoint(73)\J = 600.
-
- The Moves are construed as percentages of a linewidth; the Su-Point and
- Su-Pitch describe what type to use. Notice that 17 will be reconstructed by cpi17
- to a pitch of 20, and that the point is specified as already multiplied by 600.
-
- There are two disadvantages of JGPrint's approach to choosing type for sub- and
- super-scripts. 1) A fixed size font is specified for sub amd superscripts
- irrespective of the size of the main type. 2) Although I have tried to cut down
- the size of tspacing between words in subscripted and superscripted text
- relative to the main type, I am not happy with the results I am getting. I do
- not think problems relating to either of these limitations will be often
- encountered.
-
- It is ESSENTIAL that any codes and parameters not used should be set null or 0.
-
- .col
- \s2|Font 1 and others to come.
-
- Printers provide a range of charactersets for a given font, and Font1 is
- designed to enable a second to be available. See the Multiple moves command in
- JGConfig for how to copy a range of widths between Fonts 0 and 1.
-
- JGPrint can manage to send any byte in the range 0 to 255 to the printer to be
- construed as a printable character, possibly with the help of the directive \\!,
- and, for bytes 7-16, the hatty mapping. It is therefore desirable to use as a
- principal character set one that is, unlike Acorn's Latin1, everywhere defined.
- In the HP configuration, I use PC-8 for font 0, since this seems the most common
- available, and ECMA Latin1 for font 1. Were I not lazy, I should use
- \I}Defch(61)\J to add in Acorn's characters 128-160, and others from 0 to 31.
-
- The commands \\x, \\y, \\z can be used, by analogy with their original intent to
- enable a soft font in Ram to be used, to swap between two built\-in character
- sets. For HP, these use the codes \I}Chram(50)\J = %Z0N, \I}Chrom(51)\J = %Z10U to swap
- between PC-8 and ECMA-94 Latin-1.
-
- In Bj-10e the codes required are <esc>+'['+'T'+4+0 +0+0+3+82 etc. (NB
- 850=3*256+82) to swap between pages 850 and 437, the only two available.
-
- I am fairly satisfied with these arrangements, but they do not allow for the
- variation of character sets and typefaces that modern printers are making
- available. I am thinking to allow the widths file itself to specify how many
- character sets it contains. It will require that PtWidth0, bold0 etc be moved
- out of the configuration file and into the widths file.
-
- .col
- \s2|AbshorP
-
- The final choice to be made when arranging how JGPrint will handle justified
- lines is how JGPrint will tell the printer to respond to the head\-positioning
- requirements of the line. The simplest method (\I}AbshorP(53)=0\J), is to
- instruct the printer to move right\-relative the amount between 'where JGPrint
- believes the printhead to be' and 'where it wants it to be'. A better
- alternative (ApshorP=1), only available if \I}Abshor(98) (a code to
- move the print head to an absolute horizontal position) is available, is to move
- the printer head at the beginning of each word to where JGPrint wants it to go.
- In effect, this means that any discrepancy between JGPrint's knowledge of where
- it is, and where the print head actually is, will be corrected after each gap in
- the line. AbshorP=2 sets the absolute position of the printhead before each
- character is output, thus even more exactly positioning the print-head.
-
- The BJ-10e does not have an absolute horizontal positioning command, so AbshorP
- must be set to 0. In HP, I use AbshorP=1, except when I am testing the width of
- characters, when I set Abshorp to 0.
-
- .col
- \s2|Deskjet Scaleable Fonts
-
- If you examine Deskjet Font character widths as published by HP, particularly
- for the smaller fonts, you will see that the numbers for one font are not
- exactly the same multiple of those for another font. This is because of
- neccessary rounding errors from the left and right blank pads, and dotwidth.
-
- However JGPrint's scaling calculations are fairly good, and, with AbshorP=1, I
- am well satisfied with the justification of a six point line, with widths educed
- from 12 point characters.
-
- .col
- \s1|Laying out the page.
-
- There are two separate things that have to be got, if not right, at least
- consistent: how the printer is to be initialised with respect to paper size,
- font, and line spacing; the initial assumptions JGPrint is to make about these
- and other initial conditions. The first is done by the commands put in the code
- \I}init(11)\J; the second by the values of \I}initpl(5)\J(page length) -
- \I}initqual(66)\J(quality), i.e draft/letterquality). I shall not discuss what
- may be required exhaustively here, since, on the one hand, each printer has its
- own style of inititialising requirements, and, on the other, JGPrint's init-
- parameters are straightforward, though detailed. It may be helpful to look at
- these values in a configuration for a printer you know.
-
- .col
- \s2|init
-
- I recommend that this printer code begins with the 'reset default' code of
- whatever printer you are using, and that \I}deinit(12)\J, which ends the file,
- should end with this code. In the HP Configuration this is <esc>E. <esc>@ is the
- usual code on Epson\-type printers, but it is not present on the BJ-10e.
-
- Chrom is sent as parameter with the call to init so that '<esc>%@' will include
- the code for this within init if required.
-
- .col
- \s2|Init-
-
- With a few exceptions detailed below, the init-? values required are
- self\-explanatory. However, it is worth distinguishing between those, such as
- Initpl, which tell JGPrint about how the printer works, and those that specify
- your default choices, such as initlm. I recommend that for texts that you intend
- to go back to, you reset the latter, but not the former, within your text, so
- that you get the same effect whatever configuration you use.
-
- \I}Initfj(14)\J sets the Fill and Justify value, 0 => Nofill, 1 => Fill, 2 =>
- Fill and Justify in units of 1 character width, 3 => FGFJ, 4 => JGFJ. 1 or 4
- are the usual settings. 2, the setting required for sending texts to screen, is
- enforced in Doc mode and if JGPrinting to the screen.
-
- \I}InitPsep(12)\J sets the additional space between lines as a percentage of the
- normal spacing. In Doc mode or if JGPrinting to the screen, this is forced to
- 100.
-
- Your printer may be set to skip margins at the top and/or bottom of the paper.
- JGPrint provides \I}Skipsingle(22)\J for single\sheet printing and
- \I}Skiplines(21)\J and \I}Skiplength(20)\J for printing on continuous
- stationary. SkipLines, is in terms of the running head line separation, the
- others in units of 1/2160". \I}Pagecycle(38)\J = n stops continuous paper every
- n pages, e.g. 16 so that you can adjust page registration. You will be prompted
- to reset pagelength and/or pagecycle. 0 is interpreted as an infinite cycle.
-
- .col
- |Appendix
-
- The numbering of the items relates to their placing for access by JGPrint and
- JGConfig.
-
- Numbers beginning with "c" are JGConfig Codes; numbers beginning with "s" are
- JGConfig Sizes.
-
- NYA should be taken to mean "not implemented at this time".
-
- ~ JGP should be taken to mean "not explicitly used by JGPrint".
-
- MBN should be taken to mean that JGCfgDoc should be consulted to see what the
- implications are if the item is set to Null.
-
- Some codenames are entered under more than one classification, where it is felt
- this would be helpful.
-
- NB. The more detailed notes above or in JGCfgDoc should be consulted in the case
- of any uncertainty; only the briefest summaries are given here, and though in
- some cases you are specifically referred to JGCfgDoc, you may often find it
- useful to look for more detailed notes in others as well. You are reminded that
- you can access the notes on any code, size etc. by choosing "I" for Information
- after summoning up the relevant name.
- .nofj
-
- Free Codenames
-
- c0. V0: supplied for user specification.
- c1. V1: supplied for user specification.
- c2. V2: supplied for user specification.
- c3. V3: supplied for user specification.
- c4. V4: supplied for user specification.
- c5. V5: supplied for user specification.
- c6. V6: supplied for user specification.
- c7. V7: supplied for user specification.
- c8. V8: supplied for user specification.
- c9. V9: supplied for user specification.
-
-
- 1. Vertical Motion
-
- s4. Vertunit: Number of units to the inch of the vertical motion code.
- c55. Vmi: Code for general vertical motion (with + and - parameters.)
- (preferred to Uptab and Downtab: see JGCfgDoc for details.)
- c54. Downtab: Code to execute a forward vertical tab. (See JGCfgDoc)
- c53. Uptab: Code to execute a reverse vertical tab. (See JGCfgDoc)
- s49. Vmax: Maximum allowable argument to Uptab/Downtab. Usually 255 or 127.
-
- c21. Pitch Code to vary pitch. Parameter required.
- c24. Spacing: Code determining line separation.
- c99. Lpispacing: Code for linespacing in lines per inch.
- c102.LppSpacing: Code used by .spacing n if 10 < n < 120.
- (if Null, Spacing used)
- s52. VFeedunit:Number of units/inch of code setting vertical line spacing.
- (If Zero, use Vertunits.)
- c52. Hln: Code to perform a half-depth linefeed. (if Null uses Vmi/Downtab)
- s61. CrandLn: If true put out a carriage return before a newline.
- s51. CrAndHln: if false, do not precede the halfline code with <cr>.
-
-
- Horizontal Motion
-
- cs3. Horunit: Number of units to the inch of the Printer's horizontal motion code.
- c56. Hmi: Code for gen. horizontal motion.(See JGCfgDoc for vital details.)
- c90. Fwd: Auxiliary Code used for forward head motion; no escape(27).
- c91. Bwd: Auxiliary Code used for backward head motion; no escape(27).
- c92. Horbyte: Byte Code used for horizontal motion; no escape(27).
- (above 3 available if HMI is null. see JGCodeInfo)
- c25. Point Code to specify height of characters.
- s48. defp: Font used by prop.spaced characters at other than special cpi.
-
- c14. Cpi5: Code for .cpi5
- c17. Cpi10 Code for .cpi10
- c15. Cpi6: Code for .cpi6
- c18. Cpi12: Code for .cpi12
- c16. Cpi8. Code for .cpi8.5
- c19. Cpi17: Code for .cpi17
- c20. Nlq: Code for .Nlq
- s46. 10p: Font used by proportionally spaced characters at cpi10 and cpi5.
- s45. 12p: Font used by proportionally spaced characters at cpi12 and cpi6.
- s44. 17p: Font used by proport'ally spaced characters at cpi8.5 and cpi17.
- s47. nlqp: Font used by proportionally spaced characters at nlq.
- s25. 8w: Width in JGPrint's hor'tal units of chars. obtained by .cpi8.5.
- s26. 17w: Width in JGPrint's hor'tal units of chars. obtained by .cpi17.
- s54. 12w: Width in JGPrint's hor'tal units of chars. obtained by .cpi12.
- s27. nlqw: Width in JGPrint's hor'tal units of chars. obtained by .nlq.
-
- Starting and Leaving
-
- c10. Printer: Configuration reported in JGPrint/Copy
- c11. Init: Initialising code - starting.
- c12. Deinit: De\-initialising code - leaving.
- s57. Vup: Set true if printer must roll back when reloading for verso.
-
- Initial Requirements
-
- s66. InitQual: Initial quality level (\Y\/Z) for Draft/Letter or Quiet/Fast.
- s14. Initfj: Default initialisation code for filling and justification.
- (See JGCfgDoc for values.)
- s9. Initcpi: Default initialisation for width of characters.
- s10. Initnlq: Default initialisation for near letter quality.
- s6. Initsp: Default initialisation of spacing between lines.
- s5. Initpl: Default initialisation of pagelength.
- s11. Initps: Default initialisation for proportional spacing.
- s10. Initnlq: Default initialisation for near letter quality.
- s12. InitPsep: Default initialisation for paragraph separation.
- s13. InitPind: Default initialisation for paragraph indentation.
- s17. Initemph: Value of Bold/faint for default initialisation.
- s18. Inithue: Hue for default initialisation.
- s15. Inithd: Number of lines in default header.
- s36. Inithdss: Number of lines in default SingleSheet header
- s16. Initft: Number of lines in default footer.
- s7. Initlm: Default initialisation for left margin.
- s8. Initrm: Default initialisation for rightmargin.
- s19. Initup: Initial paper windback.
- s60: InitSS: Controls default assumptions about paper feed.
- See JGCfgDoc for codes and advice.
-
-
- Responding to Style Directives
-
- c26. Uln: Code to start underlining.
- c27. Uln0: Code to cancel underlining.
- c28. Ital: Code to enter italic mode.
- c29. Ital0: Code to cancel italic mode.
- c30. Enlg: Code to enter enlarged mode.
- c31. Enlg0: Code to cancel enlarged mode.
- c38. Cdn: Code to enter condensed mode. (See JGCfgDoc)
- c39. Cdn0: Code to cancel condensed mode. (See JGCfgDoc)
- s33. ChSetRomRam: True forces Rom ChSet to Font 0, Ram ChSet to Font 1
- s34. Cmd1line: True if Cdn only effects one line; may affect cpi8,17.
- c32. Emph: Code to enter emphasized mode.
- c33. Emph0: Code to cancel emphasized mode; also used to enter faint mode.
- c34. Dstrk: Code to initiate double-strike mode.
- c35: Dstrk0: Code to cancel double-strike mode.
- s62. Bold0: Coded value to find width of Bold/Emph'd characters in font 0.
- s63 Bold1: Coded value to find width of Bold characters in font 1.
- See JGCfgDoc for values and advice.
- c46. Supscpt: Code to initiate Superscript printing. If 0, see s70 to s73.
- c47. Subscpt: Code to initiate Subscript printing.
- c48. Sup0: Code to cancel Superscript printing.
- c49. Sub0: Code to cancel Subscript printing.
- OR
- s71. SupMove % of Point size to move up fpr Superscripts
- s70. Submove % of Point size to move down for Subscripts.
- s72. SuPitch Pitch Size to use for sub/SuperScripts
- s73. SuPoint Point Size to use for Sub/SuperScripts
- c69. Font: Code to alter the font. ~ JGP.
-
- Responding to printing mode directives
-
- c40. Qual: Code to enter quiet mode; or used for draft printing.
- c41. Qual0: Code to cancel quiet mode; or used for letter-quality printing.
- c42. Incr: Code to enter incremental mode; High Speed Draft in some configs.
- c43. Incr0: Code to cancel incremental mode.
- c44. Bidir: Code to initiate twoway printing.
- c45. Unidir: Code to initiate oneway printing.
- c58. Hue: Code to change the colour being used for printing.
- c59. Copies: Code to cause printing of multiple copies of each page. NYA
-
- Proportional Spacing
-
- c60. Propchwidth: String used to find the related q font description file.
- c36. Ps: Code to enter proportional space mode.
- c37. Ps0: Code to cancel proportional space mode.
- s28. PtDiv0: Number of dots in standard character width for font 0.
- s29: PtDiv1: Number of dots in standard character width for Font 1.
- s30. Ital0: Coded value to find width of italic characters in font 0.
- s31. Ital1: Coded value to find width of italic characters in font 1.
- s62. Bold0: Number of Hor'tal printer units added to ps bold in font 0.
- s63. Bold1: Number of Hor'tal printer units added to ps bold in font 1.
- c98. Abshor: Positions print\-head in correct absolute horizontal position.
- s53. AbshorP: Controls the use of the absolute horizontal position.
- . It is essential to consult JGCfgDoc for details of how to use n98 and s53.
- . Consult JGCfgDoc for information about the use of all these facilities.
-
- Position of Printhead
-
- c76. Horpos: Obsolete - see Abshor
- c77. Vertpos: Code to set the Vertical position of the print head. ~ JGP.
- c78. Pushpos: Code to stack the current position of the print head. ~ JGP.
- c79. Poppos: Code to unstack the former position of the print head. ~ JGP.
- c68. Hmhd: Code to home the head to the left edge.
-
- For more details of the above see MOVE and CODE.
-
-
- Page Shaping and Breaking
-
- c65. SFeed: Code to cause Sheet Feed issued at page breaks.
- NB. Should be Null for continuous stationery.
- c66. Papout: Code to enable the paper out warning. ~ JGP.
- c67. Papout0: Code to disable the paper out warning. ~ JGP.
- s20. Skiplength:Length skipped by printhead at top and bottom of page.
- s21. Skiplines:Lines skipped by printhead at top and bottom of page.
- s22. Skipsingle:Length short on single sheet paper due to printer grip
- c63. Land: Code to introduce Landscape printing. NYA.
- c64. Port: Code to return to Portrait printing. NYA.
- s67. Sob: Code number for code that sets Shift Out, e.g. Landscape (63)
- s68. Sib: Code number for code that Shifts In, e.g. Portrait (64)
- c100.Paperform:Set Paperformat code for printer. ( See JGCfgDoc for this & 102.)
- s58. Paperform:Initialising value for the code paperform (101).
- c101.Feedfrom: Feed a new sheet of paper from the required printer tray etc.
- s59. Feedfrom: Initialising value for the code feedfrom (102).
- s23. DoFF: Emit form feed on continuous stationery.
- s38. Pagecycle:Frequency of printer pause at page-break for paper reset.
-
- Character Definition and Selection
-
- c61. Defch: Code to define a character. ~ JGP.
- c62. Graph: Code to introduce a graphical figure. ~ JGP.
- c50. Chram: Code to select Secondary characters, defined in RAM or for init.
- c51. Chrom: Code to select ROM characters, primary set defined for init.
- c89. Romtoram: Code to transfer the Rom characters to Ram.
- NB. See important warning in JGCfgDoc.
-
- Interpretation of Bytes( see STYLE for details)
-
- c70. Symbols: Obsolete - see Tochars
- c71. Tochars: Code to interpret control bytes as printed characters.
- c72. Toctrl: Code to re-enable bytes as control characters.
- c73. Tochar1: Code to interpret next control byte only as printed character.
- c94. PoundC: Code used to print pound sign; normally Null & set by s1.
- s1. pr.pound: Byte that produces pound on the printer.
- s42. mc.pound: Byte produced by pound(£) key on text preparation machine.
- s56. Mc.pound2:A second byte construed as Pound sign in printing. 0 ignored.
- c93. Hashc: Code used for hash (byte 35); normally Null, & set by s2.
- s2. Hash: Byte to be printed when hash(35) was used in the input.
-
-
-
- Patterns for Filling
-
- c80. Pathor: Code to set a horizontal pattern for filling. ~JGP
- c81. Patver: Code to set a vertical pattern for filling. ~JGP
- c82. Patstyle: Code to set the style of pattern for filling. ~JGP
- c83. Patgray: Code to set the gray level of a pattern. ~JGP
-
- Moving the Screen Cursor (not the printer)
-
- c84. Rc: Code to move screen cursor right one character; no escape(27).
- c85. Lc: Code to move screen cursor left one character; no escape(27).
- c86. Uc: Code to move screen cursor up one line; no escape(27).
- c87. Dc: Code to move screen cursor left, deleting; no escape(27).
-
- Miscellaneous
-
- s128.Esc: If true, precedes codes by 27 (except c85-92)
- c88. Source: String to identify the originator of a configuration file.
- s39. Ftpgrestart:True to restart footnote numbering on successive pages.
- s40. Romchar: Extra char. to prevent alternative ROMs accepting command; obs.
- c103.Typeface: Code to effect choice of typeface.
- c104.Wrapon: Newline if too many characters supplied on a line.
- c105.Wrapoff Lose characters if too many supplied on a line.
- c96. Verso: Must be 27, for JGPCopy to allow reversal of paper.
- c97. Pause: Must be 0, for JGPCopy to wait for new paper.
-
- Obsolescent
-
- c57. Cr: Code which can be issued instead of byte 13 for carriage return.
- c22. Lm: Code for left margin. (no longer used)
- c23. Rm: Code for right margin. Not used by JGPrint. ( "" )
- s35. Cr.to.ledge:True if CR moves printhead to left edge; unneeded if Lm Null.
- s41. Splpp: If true, argument of command Spacing(24) is always linespage.
- c74. 9char: Code to treat byte 9 as a character,
- c75. 27char: Code to treat byte 27 as character, not escape, in middle of line.
- s37. Nolf: Do not insert linefeed when sending carriage return to printer.
- c13. Intntnl: Select international alphabet.
- s24. Decimal: If true, move dirs.
- c95. Copy: Used to mark files intended to be copied.
-
-