APPLICATION NOTE #139 USING THE AST TURBOLASER WITH XYWRITE III PLUS Rev. 01 RELATED FILES: 3ASTLSR.PRN The AST TurboLaser, a product of AST Research, Inc., is a high-speed, 300-dot-per-inch laser printer. It provides 47 internal, text-based fonts, which can be used in either landscape or portrait mode. This application note includes some information on loading the AST TurboLaser's fonts. It also describes the XyWrite printer file for the AST TurboLaser and gives you some tips on modifying it. DOWNLOADING FONTS The AST TurboLaser has 250K of memory for downloaded fonts. (This memory is included on the AST board itself, and does not use any of your computer's memory.) Because of the memory limit, you should choose fonts carefully. (See Note #1.) If you attempt to load too many fonts, the TurboLaser will dump all the fonts from memory; you will end up with none loaded. To download a font to the printer, issue the LPLOAD command as described in the AST TurboLaser User's Guide. If you later want to change the fonts that you have loaded, you can exit to DOS and reissue the LPLOAD command. Remember, when you load new fonts, all the old fonts are dumped from memory. That means that if you currently have six fonts loaded and wish to add a seventh, you have to load all seven together. For example, to load 12-point Courier, 18-point Dutch Bold, and 6-point Letter Gothic Extended, all in portrait format, the DOS command would be: C:\>LPLOAD port FBEGIN PC12 PD18B PG6E FEND For this process, you must use the font names listed in the AST User's Guide, not the XyWrite font names. XYWRITE PRINTER FILE The printer file for the AST TurboLaser is 3ASTLSR.PRN. This printer file, which is available from XYQUEST's Technical Support department, uses the extended Diablo 630 language and supports both portrait and landscape modes for all the internal fonts. To keep the printer file to a manageable size, we have included PT (Print Type) tables for only the most commonly used fonts and point sizes. In addition, certain style issues, such as the width of the underline and the position of subscript and superscript characters, are based on commonly used point sizes. The following sections give you the information you need to customize 3ASTLSR.PRN to meet your needs. XYWRITE FONT NAMES The printer file lists all available fonts and their XyWrite names. XyWrite font names use the following convention: Orientation size family style | | | | | | | | ----P-12GOTH-BOLD-IT The orientation refers to portrait (P) or landscape (L). Size and family mean point size (12 in this example) and typeface family (Gothic in this example). Style refers to the available style modifiers that change the way a typeface looks. Modifiers are always added in this order: international, bold, condensed, extended, emphasized, and italic. Not all modifiers are available for every basic typeface. Refer to the printer file for a list of valid combinations. In addition to the style modifiers, there are several attributes that can be added to a font name. Attributes are printer effects that are combined with a type style. For an AST TurboLaser, the available attributes are underline, superscript, subscript, shadow, forms, and bold. (See Note #2.) Attributes are always added after style modifiers and are separated from the rest of the font name by a plus sign (for example, P-12GOTH-IT+ UNDERLINE). ADDING A PT (PRINT TYPE) TABLE If you want to use a TurboLaser font, it must be referenced in a XyWrite PT (Print Type) table. The standard printer file contains five PT tables. If you want to use a font that is not currently assigned to a mode in a PT table, you can modify an existing PT table or create a new one. The easiest way to create a new one is to define an existing PT table and copy it to the end of the PT section. 1. Call the printer file to the screen. F5call 3astlsr.prn 2. Page down until you see the PT tables. 3. Define the last PT table. For example, if PT=5 is the last table in the section: Move your cursor to the beginning of the PT=5 line and press F1. Move your cursor to the end of the PT table (marked by a semicolon and a carriage return) and press F1. Result: This defines the table PT=5 as a block. 4. Press: F7 (to copy the block) 5. Press: F3 (to release the defined block) 6. In the new table, change the 5 in PT=5 to the next available number (e.g., PT=6). 7. Change the font names in the new table. You must use the the XyWrite font names exactly as they appear in the list at the beginning of the printer file. An example of a completed PT table is shown below. PT=6 MD NM+P-12COURIER-INTL MD BO+P-12COURIER-INTL-BOLD MD UL+P-12COURIER-INTL+UNDERLINE MD RV+P-12COURIER-INTL+FORMS MD BU+P-12COURIER-INTL-BOLD+UNDERLINE MD BR+P-12COURIER-INTL-IT MD SU+P-12COURIER-INTL+SUP MD SD+P-12COURIER-INTL+SUB ; If you want a blank line between PT tables, make sure you put a semicolon on the blank line as shown above. 6. Store and load the printer file. Type: F5store Type: F5load 3astlsr.prn COMBINING PORTRAIT AND LANDSCAPE MODES The AST TurboLaser allows you to combine portrait and landscape printing on the same page. In portrait orientation, words are printed across the 8 1/2-inch dimension of the page. In landscape orientation, words are printed across the 11-inch dimension of the page. You must use the portrait version of a font for portrait printing, and the landscape version for landscape printing. The AST TurboLaser is set up to use portrait printing as the default mode. To allow you to switch easily from one mode to another, the XyWrite printer file includes a PC (Printer Control) table that contains the instructions for each printing mode. To switch to landscape mode: 1. Move the cursor to the point where you want landscape printing to start. 2. Select a landscape PT table. For example: Type: F5pt 5 3. Type: F5pc 1 Result: When you print your document, the code to switch from portrait to landscape is sent to the printer at the point where you entered the PC command. To return to portrait mode: 1. Move the cursor to the point where you want portrait printing to start. 2. Select a portrait PT table. For example: Type: F5pt 1 3. Type: F5pc 2 When you switch from one mode to another on the same page, the printing position switches also. It is as if you held a pen above a sheet of paper and then rotated the paper 90 degrees to the right. If you are on the fifth line of the page in portrait orientation and issue the command to switch to landscape, you will be on the fifth line of the page in landscape orientation. This means that landscape printing does not begin in the exact position where portrait printing left off, but in the same relative position with the paper rotated 90 degrees to the right. Returning to portrait mode is similar: it is as if the paper rotated 90 degrees to the left. SUPERSCRIPTS AND SUBSCRIPTS XyWrite printer files are set up to print superscripts and subscripts in the proper position for the most common text sizes. Since the AST TurboLaser allows a wide range of point sizes, you might want to add several more sets of superscript and subscript definitions to properly position characters with very large or very small point sizes. Any new sets you add should follow the basic format of the standard set, but must have a unique name. Superscript and subscript placement is specified in a particular number of 300ths of an inch above or below the current baseline. If you are working with large point sizes, you might want to place them farther away from the current baseline. If you are working with small point sizes, you might want to place them closer to the current baseline. Here's what the standard superscript attribute table looks like: AT:SUPERSCRIPT AT<{ASC-2}N{ASC-15} AT>{ASC-2}L{ASC-15} AT=2 ET The first line names the attribute. The second line lists the escape sequence the printer needs to begin superscript printing. The third line lists the escape sequence the printer needs to end superscript printing. The fourth line suppresses sending some escape sequences which are unnecessary. The last line (ET) simply tells XyWrite that this attribute table has ended. The escape sequences tell the printer to perform vertical movement. The standard definition moves 15/300 inch vertically, which is designated by the ASCII 15 character in the escape sequence. To make a new superscript or subscript table, copy the appropriate standard table, give it a new attribute name (don't forget to use the new attribute name in your PT table), and change the third value on the second and third lines. For example, to make a superscript definition for small point sizes, you might do this: AT:SUPERSCRIPT-SM AT<{ASC-2}N{ASC-8} AT>{ASC-2}L{ASC-8} AT=2 ET For larger point sizes, you might use ASCII 20 in place of the ASCII 8. We recommend the following vertical movements if you wish to build more superscript and subscript tables: Point size Vertical movement 6 to 11 8/300 12 to 18 15/300 20 to 36 20/300 UNDERLINE Like superscripts and subscripts, we chose a thickness for underlining which looks best with common text sizes. The standard underline attribute table looks like this: AT:UNDERLINE AT<{ASC-2}L{ASC-5}{ASC-2}A{ASC-2}N{ASC-5} AT>{ASC-2}L{ASC-8}{ASC-2}B{ASC-2}N{ASC-2} ET If you want to make the line thicker for larger point sizes, copy the standard underline attribute table, give it a new name (e.g., UNDERLINE-LG) and change both ASCII 8 characters in the third line of the definition. The thickness of the line is measured in 300ths of an inch, so to make the line 3/300 thicker, you would change the ASCII 8 to an ASCII 11. Don't forget to modify the PT tables in the printer file to reference the new attribute name. Note #1 Font Size. Fonts vary in size, depending on character sets and size ranges. You can estimate how much memory a font uses by displaying a directory of the font disk. Note #2 Bold Attribute vs Bold Style Modifier. You may have noticed that there are two ways to print in bold. The difference is that the bold style modifier, which is not available for all typefaces, refers to a specific font supplied by the manufacturer. The bold attribute creates a bold effect by telling the printer to doublestrike each character. Note #3 LL Language. Internal fonts which are part of the LL language are not supported because their structure prohibits their use in a text format. Note #4 Character Set. The full IBM ASCII character set is available only on international fonts. All other fonts are limited to the first 126 ASCII characters, which does not include accents. No fonts can print ASCII characters 0 through 31. Note #5 More Information. For more information on printer files in general, refer to Chapter 6 of the XyWrite III Plus Reference Guide.