=======================================================

ETHIOPIAN SCIENCE & TECHNOLOGY

=======================================================

Vol. 2, No. 5 ------------ < for cleo community> --------- May 21, 1993


CONTENTS

Encapsulated PostScript ................................Section 1/3

Sources ................................................Section 2/3

Your Assignment .......................................Section 3/3

Notes from the Editor

@@@ Ethio Science & Technology @@@ is a "weekly column" presented to the Cleo community. It covers various issues in the science; in particular, those of more related to Ethiopia. Today's column is the continuation of last week's column on PostScript.

Some important terms:

BMP: Bitmapped format is a digitized representation of an illustration with respect to a device whether be a printer or displaying monitor.

EPSF: Encapsulated PostScript File (EPSF) may consists of a page description of text, images, graphics, or combined. It can be imported or exported in all environment with such format. In order to view it on a display monitor or print on a non-postscript printer, the EPSF has to be converted into a bitmapped format.

TIFF, PICT, PPM: Images, illustrations, or photographs are digitized when they are stored or processed by computers. And they are notorious for taking so much storage space. For this and some other reasons, compressing them into some kind of format is very useful. TIFF, PICT are popular format among others, but their performance and strength are not the same. TIFF stands for Tag Image File Format.

dpi: dpi is an acronym for "Dot Per Inch." Among other factors a printer quality is measured by how much dpi it prints. If a printer is said that it can print 300dpi, that means it has a capability to put 300 dots with in 1 inch square.

Resolution: If a printer produces 1200dpi or above, it is said to be a high resolution printer. Resolution also apply to computers' screens. If your computer has an EGA adopter with 320 by 200 pixels, it is a low resolution screen. Mostly, today's monitors come with an adopter called Super VGA with a resolution of 1024 by 768 pixels.

Fonts: A sets of related characters including letters, numerals, and symbols that are designed and used for printing.

Section 1/3

Encapsulated PostScript

Drawing can be done using an application software such as Illustrator, COREL DRAW, or other drawing programs and print the work on a PostScript printer. Drawing programs are suppose to be friendly and easier to use. A user necessarily doesn't have to now the anatomy of PostScript.

Most popular drawing packages cost "arm and legs." When you want to couple that with a PostScript printer the price tag becomes dandy. If you don't have those fancy drawing software, but a PostScript printer with a knowledge of a PostScript programming language, doing an amazing drawing is within your back yard. In other words, you do your work by directly telling the printer what it should.

What else if you don't own a PostScript printer? As indicated in the previous column, it is possible to use an interpreter such as GhostScript even though the result is not guaranteed. In order to print a file created under such environment on non-PostScript printer, it has to be converted into bitmapped format. This lead us to the idea of Encapsulated PostScript File (EPSF).

A PostScript Language Reference Manual describes EPSF:

The encapsulated PostScript file (EPSF) format is a standard format for importing and exporting PostScript language files among applications in a variety of heterogeneous environments.

Actually, an EPSF is single page with a bounding box giving the maximum length and width of the drawing. It can be integrated into other PostScript files. No change is required, but if that is not the case, it might have to be converted into other format including PICT, PPM, or TIFF whether for viewing or printing. Any EPS file to be as such must adhere to strict rules given by the language. PostScript language also offers its own format called encapsulated PostScript interchange (EPSI). Any application program that understands the format can take advantage of this option.

Section 2/3

Sources

You may learn more about PostScript from various resources books, magazines, usergroups, and class rooms. Here, I just refer a few books; please this doesn't mean these are the only "good" books. If you have an access to USENET, you may also wants to look at comp.lang.postscript and comp.fonts.

[1] Adobe Systems Incorporated. PostScript Language Reference Manual. Addison Wesley, 1990.

[2] Adobe Systems Incorporated. PostScript Language Tutorial and the PostScript Cookbook. Addison Wesley, 1991.

[3] Adobe Systems Incorporated. PostScript Language Program Design, Addison Wesley, 199?.

[4] Adobe Systems Incorporated. Adobe Type 1 Font Format, Addison Wesley, 199?.

Section 3/3

Your Assignment

Now, comes the fun part. So far I have bored you with general stuff, but in my view not anymore. Why? Because you are going to work with an Ethiopic Type-3 font. If you don't have a PostScript printer, previewer, or interest, you may disregard what is following.

The good news is that you are not required to return the assignment, but the bad news is if you are already or going to be good in designing Ethiopic font, you OWE something to the Ethiopian people. The following is a Type-3 PostScript font. It consists of two Ethiopic letters. I am not going to tell you now what they are. Here is a few instruction:

1. Save this mail and edit it with your favorite editor. Then cut out and save everything from "Begin Cut Here" to "End Here" into a file called "ethiopic.ps".

2. Examine "ethiopic.ps", but don't make any change unless you know what you are doing.

3. If you have a PostScript printer, send the file "ethiopic.ps" to the printer. Under MSDOS environment, you may give a command:

Copy ethiopic.ps LPT1 < enter>

It is assumed here that your computer is connected to the printer using LPT1. If you use other operating systems, please consult respective reference manuals.

4. If you have only a previewer like GhostScript, you can see what "ethiopic.ps" is on displaying monitor. For instance, gs ethiopic.ps < enter> will tell GhostScript to display the file on screen. If you insist you must get the hardcopy, there are utility files that can help you convert the file into other format, but the work may be time consuming.

5. If you understand the program, it won't be that difficult for you to convert "ethiopic.ps" from Type-3 to Type-1.

5. And finally, I wish you Good Luck!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

----the series to be continued

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Abass B. Alamnehe /

abassa@neosoft.com /

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

%%%%%%%%% Begin Cut Here %%%%%%%%%%%%

%% ethiopic.ps written by Abass Alamnehe as of April 8, 1992.

%% --- Creating Ethiopic font Type-3--------------------------------------

14 dict dup begin

/FontType 3 def

/FontMatrix [.007 0 0 .007 0 0] def

/FontBBox [0 0 144 144] def

/fourpops

{4 {pop} repeat} def

/ethioserifout {3 135 235 arc}def

/ethioserifin {3 135 225 arc}def

/ethioserifbot {3 315 45 arc}def

/fourpops

{4 {pop} repeat} def

/topserif

{/ycenter exch def /xcenter exch def

xcenter ycenter 3 135 235 arc}def

/botserif

{/ycenter exch def /xcenter exch def

xcenter ycenter 3 270 45 arc}def

/Encoding 256 array def

0 1 255 {Encoding exch /.notdef put} for

Encoding 104 /h1 put

Encoding 109 /m1 put

/Metrics 12 dict def

Metrics begin

/.notdef 0 def

/h1 144 def

/m1 144 def

end

/BBox 12 dict def

BBox begin

/.notdef [0 0 0 0] def

/h1 [18 0 144 144] def

/m1 [18 0 144 144] def

end

/CharacterDefs 12 dict def

CharacterDefs begin

/.notdef {} def

/m1

{newpath

36 106 moveto

0 102 -18 72 -18 54 curveto

-18 36 0 36 15 arcto fourpops

18 39 48 30 54 45 curveto

86 96 lineto

89 99 96 99 9 arcto fourpops

99 99 99 93 6 arcto fourpops

78 39 90 39 12 arcto fourpops

108 42 144 39 144 39 curveto

162 45 162 72 162 72 curveto

162 102 144 102 128 101 curveto

108 108 72 109 36 106 curveto closepath

60 96 moveto

30 48 lineto

27 45 24 45 3 arcto fourpops

6 45 6 57 30 90 curveto

36 99 51 99 15 arcto fourpops

60 99 60 96 3 arcto fourpops closepath

108 52 moveto

123 93 126 96 3 arcto fourpops

138 96 138 78 138 78 curveto

132 48 117 45 9 arcto fourpops

108 46 108 49 3 arcto fourpops

closepath fill} def

/h1

{newpath

21 123 ethioserifout

21 115 24 108 4 arcto fourpops

21 75 36 81 9 arcto fourpops

66 90 60 78 4 arcto fourpops

45 42 27 12 42 3 curveto

90 6 lineto

105 -18 128 -6 128 -3 curveto

117 9 126 18 120 23 curveto

108 31 90 12 90 12 curveto

63 9 63 21 6 arcto fourpops

87 72 117 123 102 132 curveto

81 132 lineto

81 129 ethioserifin

80 121 76 113 4 arcto fourpops

75 108 72 93 60 93 curveto

45 90 48 99 4 arcto

48 108 57 126 45 129 curveto

21 126 lineto closepath

fill} def

end

/BuildChar

{0 begin

/char exch def

/fontdict exch def

/charname fontdict /Encoding get char get def

fontdict begin

Metrics charname get 0

BBox charname get aload pop

setcachedevice

CharacterDefs charname get exec

end

end

} def

/BuildChar load 0 3 dict put

/UniqueId 1 def

end

/BoxesAndBullets exch definefont pop

/bbfont /BoxesAndBullets findfont def

%% Macro definition ----------------------------------------------------------

/in {71 mul} def

/Ethiopichi

{

/PrintH

{0 0 moveto (h) show} def

gsave

144 288 translate 0 rotate

.95 -0.020 .3

{setgray PrintH -1 .5 translate} for

.95 setgray PrintH

grestore

} def

%% Display the ethiopic letter---------------------------------------

bbfont 4 in scalefont setfont

gsave

/Times-Bold findfont 15 scalefont setfont

1 in 10 in moveto

(From @@@Ethio Science & Technology@@@@) show

grestore

Ethiopichi

showpage

gsave

/Times-Bold findfont 15 scalefont setfont

1 in 10 in moveto

(From @@@Ethio Science & Technology@@@@) show

grestore

gsave

0 0 moveto 0 setgray

612 (m) stringwidth pop sub 2 div 4 in moveto

(m) show

grestore

gsave

0 0 moveto

612 (m) stringwidth pop sub 2 div .2 in add 4 in moveto

(m) true charpath gsave 1 setgray fill grestore stroke

grestore

showpage

%%%%%%%%%% End Here %%%%%%%%%%%%%

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
abassa@neosoft.com/
Abass Belay Alamnehe /
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~