<<

PostScript Quick Tips: %!PS-Adobe-1.0 %%Creator: Copyright (C) 1993 Herb Weiner. All rights Creating a Mirror Image reserved. Font %%Title: /FontName /ZapfDingbMir %%CreationDate: March 25, 1993 Copyright © 1993 by Herb Weiner %%DocumentFonts: ZapfDingbats ([email protected]). All rights %%Pages: 0 reserved. Permission is hereby granted %%EndComments to use these tips in the design and /ZapfDingbMir /ZapfDingbats production of any document. However, 10 dict dup begin exch /BaseFont exch findfont def the PostScript code provided here may /FontName 2 def /FontType 3 def not be incorporated into any software /FontMatrix [-1 0 0 1 0 0] def product without a license from the /FontBBox [0 0 0 0] def author. /Encoding BaseFont /Encoding get def Have you ever needed mirror image of a /OneChar 1 string def /BuildChar from the Zapf Dingats font? { Perhaps you’ve needed a hand or exch begin OneChar exch 0 exch put BaseFont setfont pointing to the left rather than to the OneChar stringwidth exch neg exch 2 copy right. In this month’s Quick Tips 2 copy moveto OneChar true charpath pathbbox column, we’ll create a Zapf setcachedevice moveto OneChar show end Mirror font containing a mirror image } def of each character in the Zapf Dingbats end definefont pop font. Figure 1 shows selected characters from the File menu. from the Zapf Dingbats font in the top The print quality of the font we build row, with the corresponding figures will be equal to that of our base font. ¥ Double click on the ResEdit from the Zapf Dingbats Mirror font Since our base font (Adobe’s Zapf application (version 2.1 or later) to directly below them. Once you Dingbats) is a high quality Type 1 font launch it. Click once in the About understand the process, you’ll be able to with hints to improve print quality on ResEdit dialog box to close it, then use this same technique to create lower resolution (300 DPI) printers, our choose “Cancel” if an Open dialog additional mirror fonts. mirror font will also be hinted. box appears. However, our mirror font will be a Type Before we begin, let’s establish a few ¥ Choose “Get File/Folder Info...” ground rules. This technique will work 3 rather than a Type 1 font; therefore, it will not work with ATM (Adobe Type from the File menu. Choose the with any PostScript font except the new ZapfDinMir file you just created and Multiple Master fonts. (We’ll talk about Manager). Furthermore, the bitmap (screen) font we build will use the same click “Get Info.” ResEdit opens the Multiple Master fonts in a future “Info for ZapfDinMir” dialog box. column.) This technique will not work characters as the base font. This means that we will not see mirrored characters Change the Type from “TEXT” to with TrueType fonts or bitmap fonts. “LWFN” and change the Creator (This is, after all, a PostScript column.) on screen. The font metrics of the bitmap (screen) font will be correct, from “ttxt” to “LWRT”. Uncheck the Although many of the techniques Inited check box if it is checked. described here are platform- however. Since the amount of mirrored text in a document is typically very Choose “Save”, then “Close” from independent, the fonts we’ll build are the File menu. intended for Apple Macintosh systems. limited, these restrictions will typically not present a major problem. ¥ Choose “Open...” from the File This technique assumes that the base We’ll begin by constructing the menu. Choose the “ZapfDinMir” file font (Zapf Dingbats) is in the printer’s and click “Open.” Click “OK” in memory (RAM or ROM) or on the PostScript (outline) font. Next, we’ll construct the bitmap (screen) font. response to the alert “The file printer’s hard disk when the mirror font ‘ZapfDinMir’ has no resource fork. is used. This is a potential problem only Then, we’ll talk about installing these fonts in your system. Finally, we’ll talk Opening it will add one. Do you on a few printers (such as Apple’s wish to open it?” LaserWriter IIg) that do not have the about applying these techniques to other Zapf Dingbats font in ROM. If the base fonts. ¥ Choose “Create New Resource” font (Zapf Dingbats) is used on the Constructing the PostScript font from the Resource menu. Choose same page as the mirror font, Apple’s “POST” from the scrolling list in the LaserWriter will normally download the ¥ Double click on Apple’s TeachText “Select New Type” dialog box. Two base font automatically, and everything application to launch it. An Untitled new windows will open. Choose will work correctly. If you still have window opens. Carefully type in the “Close” from the File menu to close problems using this font on such PostScript code shown in Figure 2. the front window. Then choose printers, manually download the Zapf Be sure to press the return key at the “Open Using Hex Editor” from the Dingbats font into memory before end of the last line. Choose “Save” Resource menu. Choose “Select All” printing a document using the Zapf from the File menu and save this file from the Edit menu, then type in Dingbats Mirror font. as ZapfDinMir, then choose “Quit” “0400”. Choose “Get Resource Info” ✁✂✃✄✆✈☛☞✌✍✎✏✐✑✒✓❏❐❑❒◗➘➚➢➣➥➦➩➫➬➲❧ ¡¢Ê£¥v iJËKÌQÄÀ­¢¯°³´Ç·l from the Resource menu, and change font automatically as needed. the ID from 128 to 501. Choose ¥ Choose “Save”, then “Close”, then “Close” twice from the File menu. “Quit” from the File menu. ¥ If you need to provide these fonts to a service bureau, be sure to provide ¥ Choose “Create New Resource” Installing the Font in your System both the ZapfDinMir PostScript from the Resource menu. Two new ¥ First, make a backup copy of the (outline) font and the Zapf Dingbats windows will open. Choose “Close” ZapfDinMir PostScript (outline) font Mirror bitmap (screen) font. Note from the File menu to close the front and the Zapf Dingbats Mirror bitmap that this is not a violation of any window. Then choose “Open Using (screen) fonts. license agreements, since Adobe Hex Editor” from the Resource allows bitmap (screen) fonts to be menu. Choose “Select All” from the ¥ Next, make sure that the Zapf freely distributed, and since the Edit menu, then type in “0500”. Dingbats font is already installed. ZapfDinMir PostScript (outline) font Choose “Get Resource Info” from The Zapf Dingbats Mirror font we we created does not contain a copy the Resource menu, and change the have created uses the same Font ID of the character outlines (the service ID from 128 to 502. Choose “Close” number as Zapf Dingbats, since we bureau will not be able to use this twice from the File menu. did not change this number using font unless they already have a copy ResEdit. Therefore, to avoid a Font of Zapf Dingbats). ¥ Choose “Save”, then “Close”, then ID conflict, the system automatically “Close” again from the File menu. assigns a new Font ID number for Creating Additional Mirror Fonts Do not quit from ResEdit. Zapf Dingbats Mirror when we When creating additional mirror fonts, Constructing the Bitmap Font install this font, provided that Zapf be aware of the four names associated Dingbats is already installed. with every PostScript font: ¥ Make a copy of the Zapf Dingbats font suitcase. Change the name of ¥ To install the font in System 6 or ¥ The bitmap (screen) font name. This the copy to Zapf Dingbats Mirror. earlier, drag the ZapfDinMir is the name that appears in the Font PostScript (outline) font into your menu (Zapf Dingbats Mirror). ¥ In ResEdit, choose “Open...” from System Folder, and use the Font/DA the File menu. Choose the Zapf Mover to install the Zapf Dingbats ¥ The name of the suitcase file Dingbats Mirror file you just created Mirror bitmap (screen) font into your containing the bitmap (screen) font. and click “Open.” System File. You may use any name you choose, although we made this name the ¥ Double click on the FOND resource ¥ To install the font in System 7 or same as the font name. to open it. Be sure that there is only newer, drag both the ZapfDinMir one FOND (Zapf Dingbats) in the PostScript (outline) font and the ¥ The name of the PostScript font. In list. Choose “Get Resource Info” Zapf Dingbats Mirror bitmap order to simplify the editing of the from the Resource menu. Change the (screen) font into your System FOND resource, the name of the name of the Font from “Zapf Folder. The system will place these mirror font (ZapfDingbMir) must Dingbats” to “Zapf Dingbats font files in the correct location for have the same number of characters Mirror”. Choose “Close” from the your system version. as the name of the PostScript base File menu. font (ZapfDingbats). ¥ You can install the ZapfDinMir ¥ Choose “Open Using Hex Editor” PostScript (outline) font on your ¥ The name of the file containing the from the Resource menu. Choose printer’s hard disk, using Apple’s PostScript font (ZapfDinMir). In “Find ASCII...” from the Find menu. LaserWriter Utility or Adobe’s order for Apple’s LaserWriter driver Enter “ZapfDingbats” in the “Find Downloader, just as you would for to find and download your font, you ASCII:” box and “ZapfDingbMir” in any other PostScript font. If you must construct this name from the the “Change To:” box. Click “Find don’t have a hard disk on your first five characters from the first Next”, then click “Change.” Choose printer, or if this font is not installed part of the name followed by the first “Close” three times from the File on your printer’s hard disk, Apple’s three characters of each remaining menu. LaserWriter driver will download the part of the name. ¥ The file will have either “FONT” resources or “NFNT” resources (in Where to Get ResEdit addition to the “FOND” resource). (Adobe’s bitmap font files have ResEdit is available for a nominal charge from many user groups. It can also be FONT resources, but some utilities, downloaded from many online services: such as Apple’s Font/DA Mover, ¥ Internet users can use anonymous ftp to obtain a copy from ftp.apple.com may convert FONT resources to (130.43.2.3) in dts/mac/tools/resedit/resedit-2-1-1.hqx. NFNT resources.) If the file has NFNT resources, skip the remainder ¥ AppleLink users can obtain a copy from Developer Support:Developer of this step. If the file has FONT Services:Tools & Apps:ResEdit:ResEdit 2.1.1. resources, double click on the FONT resources to open them. Choose “Get You can purchase a copy ResEditª Reference for ResEdit version 2.1 with a disk Resource Info” from the Resource containing the software from many bookstores (Addison Wesley, © 1991, ISBN 0- menu, and change the name from 201-57768-2). Note that this book is also available without the software (ISBN 0- “Zapf Dingbats” to “Zapf Dingbats 201-57767-4). Mirror”. Choose “Close” twice from You can order the ResEdit software and/or Reference Manual from APDA (Apple the File menu. Programmers and Developers Association) at (800) 282-2732 or (716) 871-6555.