• No results found

Performance analysis of text-oriented printing using PostScript

N/A
N/A
Protected

Academic year: 2019

Share "Performance analysis of text-oriented printing using PostScript"

Copied!
169
0
0

Loading.... (view fulltext now)

Full text

(1)

Rochester Institute of Technology

RIT Scholar Works

Theses

Thesis/Dissertation Collections

1988

Performance analysis of text-oriented printing using

PostScript

Thomas Kowalczyk

Follow this and additional works at:

http://scholarworks.rit.edu/theses

This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion in Theses by an authorized administrator of RIT Scholar Works. For more information, please [email protected].

Recommended Citation

(2)

Rochester Institute of Technology

School of Computer Science and Technology

Perfonnance Analysis of

Text-Oriented Printing

Using POSTSCRIPT®

by

Thomas L. Kowalczyk

A thesis, submitted to

The Faculty of the School of Computer Science and Technology,

in

partial fulfillment of the requirements for the degree of

Master of Science

in

Computer Science

Approved by:

Guy Johnson

Professor and Chairman of

Applied Computer Studies

instructor

Dr. Vishwas G. Abhyankar

Frank R.Hubbell

instructor

(3)

Thesis Title:

Performance Analysis of

Text-Oriented Printing

Using POSTSCRIPT®

I, Thomas

L.

Kowalczyk, hereby grant permission to the Wallace Memorial

Libra.ry, of R.I.T., to reproduce my thesis in whole or in part under the following

conditions:

1. I am contacted each time a reproduction is made. I can be reached at the

fol1mving address:

82 Brush Hollow Road

Rochester, New York 14626

Phone # (716) 225-8569

2. Any reproduction

will

not be for commercial use or profit.

Date: October 10,1988

i

(4)

Apple, Appletalk,

LaserWriter,

andMacintoshare

registeredtrademarksofApple

Computer,

Inc.

Fluent Laser FontsandGalileoRomanare

trademarksofCasadyWareInc.

Helvetica, Palatino,

andTimes areregistered trademarksofLinotype Co.

ITC Avant

Garde,

ITC

Bookman,

ITC

Garamond,

ITC Zapf

Chancery,

andITC Zapf Dingbatsare registeredtrademarksofInternationalTypeface

Corporation

POSTSCRIPTis a registeredtrademarkofAdobe

SystemsIncorporated.

Interpress ina registeredtrademarkofXerox Corp.

u

(5)

Abstract

POSTSCRIPT

isa pagedescription languagewhichisusedto transmitprinting information fromahostcomputer(i.e. Apple

Macintosh)

toaprinter(i.e. Apple LaserWriter Plus). It hastheabilitytodescribepagesconsisting oftext,vector graphics,andscanned

bit-map

images.

Printing

textisthearea of concentrationfor

this thesis.

Specifically

several variablesthataffecttheprintingspeed of a common

POSTSCRIPT

printer,theAppleLaserWriter

Plus,

arelookedatwhenprintingtext inavarietyof

fonts,

sizes,and orientations. Thevariablesthataffectprinter

performance

include:

-use of outlinevs.

bit-map

fonts;

-theoutlinefontrasterizationprocess;

-the use ofpre-cached

bit-map

fonts;

- background

outlinefontrasterization;

-arbitrary scalingandrotation;

-downloading

host-resident

fonts;

- Adobe

andThird

Party

host-resident downloadable fontsvs.printer-resident

fonts;

- Appletalk

vs.RS-232communications

interfaces;

-useofthePOSTSCRIPTshow, ashow,and widthshow

instructions;

-targeting

thePOSTSCRIPTinstructionsataparticular engineresolution;

- print engine overhead

AsequenceofPOSTSCRIPT filesweretransmittedto theAppleLaserWriter Plus printer. Theexperimentswerecarefullyconstructedtoexercizeeach ofthevariables

listedabove. Performancemeasurements werecarefullyrecorded and analyzed. Whereapplicable,improvementswereproposedtoimproveprinterperformance.

in

(6)

Tfl!?lP of

Contents

Page

Permission Statement '

Trademarks n

Abstract '

TableofContents iv

1. Introduction 1

1.1. Background 1

1.2 "PDL"Defined 1

1.3

History

ofInterpressandPOSTSCRIPT 2

1.4 AComparisonofOutlinevs.

Bitmap

Fonts 4 1.5

Text,

Vector

Graphics,

and

Bitmap

Images 8

1.5.1 Text 8

1.5.2

Bitmap

Images 9

1.5.3 VectorGraphics 10

2. ProblemDescription 13

2.1 VariablesthatAffectPerformance 14

problemdescriptionand expected results

2.1.1 Font Formats:Outlinesvs.Bitmaps 14

2.1.1.1 OutlineFontRasterizationand

Caching

15

2. 1.1.2 Pre-Cached Bit-Maps

15 2.1.1.3 Background Outline Font

Rasterization

16 2.1.1.4 Effectof

Scaling

andRotation

17 2. 1.1.5 VariationsofFont

Style

19

(7)

TableofContents

(continued)

Page

2.1.2

Downloaded

Fonts 20

2.1.2.1 Downloaded Bitmapsvs. 21

PrinterResident

(Cached)

Bitmaps

2.1.2.2 Adobe Downloaded Outlinesvs. 22

Printer Resident

(Internal)

Outlines

2.1.2.3

Adobe

Downloaded Outlinesvs. 23

Third

Party

Downloaded Outlines

2.1.2.4 Appletalkvs.RS-232 25

2.1.3 Methodsof

Printing

Strings 26

2.1.4 Resolution"Targeting"

vs.Total 27

Resolution Independence

2.1.5 EffectofVaried Page

Complexity

onPOSTSCRIPT 28

Processing

Time

2. 1.5.1 EffectontheInter-PageTime

Delay

28

Programsec

2.1.5.2 EffectontheCompilationandRasterization 29 ofTextPages

2.2 Performance MeasurementandCalculation 30

2.2.1 Communications 31

2.2.2 Interpretation

(Compilation)

andRasterization 35

2.2.3 PrintEngine Paper Ejection 44

2.3

Programming

Tasks 45

2.3.1 ExtractionofFont Widthsfrom 45

AppleLaserWriter Plus

2.3.2 Batch Composition Program 47

2.3.3 DownloadablePOSTSCRIPT

Bitmap

Font Program 49

2.3.4

Installing

DownloadablePOSTSCRIPT Outline Fonts 54

2.4 AssumedRIPArchitectural Model 55

v

(8)

TahlpofContents

(continued)

Page

3. AnalysisofExperimentalResults 59

3.1 Font Formats: Outlinesvs. Bitmaps 59

3.1.1 Red TimeOutlineFontRasterizationand

Caching

59

3.1.1.A ExperimentalResults 3.1.LB Analysis

3.1.l.C ProposedImprovements

3.1.2 Pre-Cached Bit-Maps 65

3.1.2.A Experimental Results 3.1.2.B Analysis

3.1.2.C ProposedImprovements

3.1.3 Background Outline FontRasterization 67

3.1.3.A ExperimentalResults 3.1.3.B Analysis

3.1.3.C Proposed Improvements

3.1.4 Effectof

Scaling

andRotation 71

3.1.4.A Experimental Results

3.1.4.B Analysis

3.1.4.C Proposed Improvements

3.1.5 VariationsofFontStyle 78

3.1.5.A Experimental Results 3.1.5.B Analysis

3. 1.5.C Proposed

Improvements

3.2 Downloaded Fonts 81

3.2.1 Downloaded Bitmapsvs.Printer

Resident

81

(Cached)

Bitmaps

3.2.1.A Experimental Results

3.2. LB Analysis

3.2.1.C Proposed

Improvements

3.2.2 Adobe

Downloaded Outlines

vs. 86

Printer

Resident

(Internal)

Outlines

3.2.2.A Experimental Results 3.2.2.B

Analysis

3.2.2.C

Proposed

Improvements

vi

(9)

TableofContents

(continued)

Page

3.2.3 Adobe Downloaded Outlinesvs. 91

Third

Party

Downloaded Outlines

3.2.3.A ExperimentalResults 3.2.3.B Analysis

3.2.3.C

Proposed Improvements

3.2.4 Appletalkvs.RS-232 97

3.2.4.A Experimental Results 3.2.4.B Analysis

3.2.4.C ProposedImprovements

3.3 Methodsof

Printing

Strings 102

3.3.A ExperimentalResults 3.3.B Analysis

3.3.C ProposedImprovements

3.4 Resolution "Targeting"

vs.Total Resolution Independence 111

3.4.A ExperimentalResults 3.4.B Analysis

3.4.C ProposedImprovements

3.5 EffectofVaried Page

Complexity

onPOSTSCRIPT 115

Processing

Time

3.5. 1 EffectontheInter-PageTime

Delay

Programsec 115

3.8.1.A Experimental Results

3.8.LB Analysis

3.8.l.C Proposed Improvements

3.5.2 EffectontheCompilationandRasterization 118 ofText Pages

3.8.2.A ExperimentalResults 3.8.2.B Analysis

3.8.2.C ProposedImprovements

4.Conclusions 123

4.1 Scan

Converting

Outline Fontsvs.

Caching Bitmap

Fonts 123

4.2 Scan

Converting

Font Outlineswith

"Quality

Hints"Applied 124

4.3 FontStyle

Complexity

124

4.4

Downloading

Fonts 125

4.5 Methods of

Printing

Strings 125

4.6 Resolution

Targeting

126

vii

(10)

TflhiPofContents

(continued)

Page

4.7 Printer InducedDelays

127 5.

Glossary

6. References

133 7.

Bibliography

1. EquipmentandSoftware Tools

1.1 POSTSCRIPT Evaluation Equipment Configuration

2. Support Programs

2.1 PostScriptFont Widths

2.1.1 FontExtractionProgram

2. 1.2 Printed Font Width Tables fromtheApple Laser Writer Plus 2. 1.3 Times-RomanFont Width Table (AS CH

File)

2.2 GenerationofPOSTSCRIPTText Pages

2.2. 1 Batch Composition Pseudo-Code

2.2.2 Input Data"Content"File

2.2.3 Input

Markup

"Style"File

2.2.4 Text PostScript File

2.2.5 Printed Textand

Timing

PagesfromtheAppleLaser WriterPlus

viu

(11)

1. Introduction

1.1 Background

Anelectrtonicpublishingsystem

is

madeupofthreemainparts:the

front-end,

the

RIP,

andthe

print engine.Figure 1.1is ablock diagramof atypicalelectronicpublishingsystem.

External

nformirin n fe-

Front

End

Page Description

Language^

RIP

Bit-Map

Print

Engine

Input W Engine

w'

Control

Electronic

Publishing

System Block Diagram

figure

1.1

Thefront-endprovidesinterfacesto theuserandtoother computer systems. Theuserinterface

handles inputoftext,graphics,and

bit-map

(scanned) images,

and providesthemergingand pagelayoutofthesepiecesineitherabatchorinteractive

(WYSIWYG)

mode. Thecomputer

interfaceprovides a communicationsinterfacewithotherinformationinputsystems(ie.word

processors,illustrationstations). This informationis filtered

by

thefront-endtoyieldthe internalpageformatoftheelectronicpublishingsystem.

Ultimately,

theoutputofthefront-end isthe "pagedescriptionlanguage"

(PDL)

filewhichissentto the"rasterimageprocessor" (RIP). The PDLfile describesthemarksontheprinted page.

The Raster Image Processor

(RIP)

inputsaPDLfilefora pageora setofpages generated

by

thefront-end. The RIPthengeneratesthecorresponding

bit-map

image(s)

and sendsitto the

printengine,usually inarasterform. Theprint engine printsthe

bit-map

page.

The Page Description Language

(PDL)

istheinterfacebetweenthe"softimage"worldofthe front-endandthe"hard-copy"world oftheRIPandtheprintengine. OneparticularPDLis quickly

becoming

an

industry

defactostandard: POSTSCRIPT.

1.2 "PDL"

Defined

PDLstandsforPageDescriptionLanguage. ThetermPDLappliesto thesetofprinting

commandsthatdescribetheprintingoftextandusuallyvectorgraphics onaprinted page. The locationon apageisspecifiedanda"mark"isplacedatthatlocation. Thatmark canbea

dot,

a character, astringofcharacters,alinesegment, acurvesegment,or abit-map. The PDLhas noknowledgeof a"lineof

text"

or a"carriagereturn".

Subsequently,

conventionaltineprinters are notconsideredtousePDL's.

Detennining

wherethelineoftextbeginsand ends isdie responsibilityofthefrontendapplication. AtypicalsequenceofPDL(pseudo)codetoprint out a simplestringoftextgoesasfollows:

Movecursortothe

(x,y)

coordinateofthepage.

Selecta

font,

size,andorientation;makeitthe"current"font

Printthestring

"abc";

lettersareautomaticallyadvancedusingproportional spacing.

Someofthemore recent

PDL's,

like

POSTSCRIPT,

offer

fully

scalable androtatable outline

fonts. Theolder

PDL's,

like

imPRESS,

providealimitednumber ofdiscrete fontsizes andthe

fourquadrant orientations. The PDListhe

"assembly

language"

ofelectronicprinting. 1

(12)

1.3 HistoryofTnternressfind PostSPRTPT

(1)

Figure 1.3 showshowInterpressandPOSTSCRIPTbegan. Bob Sproullfirst developedaprinting languagecalled

"PRESS"

whileatXerox.

Independently

JohnWarnock developedhisowngraphics/printinglanguage. After comingtoXerox JohnWarnockput

together asimilarprinting language hecalledJaM. AthirdconcurrentactivityatXeroxPalo Alto Research Center

(PARC)

wasthe"CedarGraphics" graphics research program.

"ResearchInterpress"

wasbasedon allthreeoftheseactivities.

Xeroxallowed someoftheirworktobecomepublic. Xeroxpermitted publicationof apaper basedontheworkconductedinthe"CedarGraphics"research program. Itwas written

by

John Warnockand

Doug

Wyattand was called"A Device Independent Graphics

Imaging

ModelforUsewithRaster Devices".

Secondly,

XeroxallowedLeo

Guibas,

aStanford professor, touse someoftheInterpress-relatedresearch workascourse materialfora

courseatStanford. John Warnockusedthepublicinformation disclosed

by

Xerox inaddition

todieworkthathedidpriortocomingtoXeroxasabasis for starting hisowncompany,

Adobe

Systems,

Inc.,

andcontinuedthedevelopmentofalanguagewhichhecalled POSTSCRIPT. TheApple Laser Writerwasthe firstcommercial producttouse

POSTSCRIPT. The definitionofPOSTSCRIPTispublic. Adobe'sproductistheir

implementationof

POSTSCRIPT,

which

they

willporttoahardware RIPthateitherAdobe orAdobe'scustomerdesigns.

OntheInterpressside, a subsetofResearchInterpresswaschosen whichbecamethe Xeroxinternalstandardlanguagethatwascalledthe"Interpress'82Electronic

Publishing

Standard".

Printing

instructionswereaddedtoInterpress '82tobecomeanotherXerox internalversionof

Interpress,

version2.0. Xeroxmadeversion2.1 publicin Aprilof

1984. In

1986,

Xeroxreleased Interpress version3.0whichcontainedthreesets. The "Commercial Set"handles basictextandtrivialgraphics; the"PublicationSet"adds

bit-map

fonts,

vectorgraphics,and

bit-map

printing;the "Professional GraphicsSet"

provideshigh

functionality,

likescaledand rotatedoutiinefontsand

bit-map

imageprocessing. The

PublicationSet"isamedium

functionality

language similarto

"imPress",

alanguage developed

and sold

by

ImagenCorp. The "ProfessionalGraphicsSet"isahigh

functionality

page description languagesimilartoPOSTSCRIPT.

Muchofthisinformationwastakenfromreference#1. (Referencelistmaybefoundinsection

6.)

Section 1.1

(13)

1976: WhileatEvans&*

Sutherland,

John Warnock

works ongraphics algorithm

researchforflightsimulators

Bob Sproulldevelops

PRESSatXerox

Late70's-earlv8Q's

Xerox PARC "Research Interpress" headed

by

Chuck Geschke John Warnock develops

.JtbeJaMgraphics print

ing

language

"CedarGraphics"

graphicsresearch

program

PRESS implemented

andusedinside Xerox

Leo Guibasconduct^

Interpressresearch

atStanford

July

1982 John Warnock

F&

Doug

WyattPublish'

"A Device Independent

GraphicsImaging

ModelJ

forUsewithRaster

Devices"

January

1982 Xerox InternalStandard

"Interpress'82Electronic a .Publishing

Standard"

Add"printing"

instructionsto

Research Interpress&

Interpress '82

John Warnock

and

ChuckGeschke

startAdobeSys.

InternaltoXerox:

Interpress2.0

1985:

FirstPOSTSCRIPT

Product

AppleLaser Writer

1986:

Apple Laser

Writer Plus

othersinclude

QMS,Mergenthaler, DataProducts,...

jr April 1984 >w

/

Public:Interpress

\

1 Electronic

Printing

J

V

Standard

J

\Vali/

Commercial

-?Set

1986

^N.

/

Interpress3.0

\

Publication

I releasedto r~

"?"Set

V

public

J

AnnouncedXerox^^7++^ Prof. Graph.

printerstosupport

/

"-?Set

Interpress include J*

4045, 4050, 9700,& 8700

History

of

Interpress

and

POSTSCRIPT

figure 1.3

(14)

1.4 A Comparison of

OutHfif

YS KiHnanFonts

Before POSTSCRIPTwasintroducedmost printers couldonlyuse

bitmap

fonts. Oneofthe

key

capabilitiesofPOSTSCRIPTthatcertainly setAdobe

Systems,

Inc.ahead ofthe

competition wastheextensive use of outlinefonts. Thisis inadditionto thelessused

bitmap

fontfunctionality. Outline fonts have manyadvantagesoverbitmaps. Fourofthemore importantadvantages areoutlinedbelow.

1. Resolution Independence .

Sinceafontoutlineisnottiedtoaspecificresolutionoutput

device,

thesameoutlinecan easily beusedtodriveanyresolution outputdevice.

For

bitmap

fonts,

entirely different bitmaps arerequiredforprinters withdifferent resolutions. Forexample,a300 dpi fontwillbe 75% size when printed ona400 dpi printer,or 150 % size on a200dpiprinter.

2. Device Independence

Differentprintershave differentprocessesthat

lay

blackmarksonapage. Insomecases eveniftwoprinters ofthesame resolution printtheexact same

bitmap

(font) data,

theoutput canappearsignificantly different. Inthecaseofelectrophotographicprintersatight (laseror

LED)

exposes an area of electrophotosensitive material. Theprocessissetupsuchthat the exposed area eitherpicksup toner, ina"write

black"

system,ordoesnotpickup toner, ina "writewhite"

system Ifthesame

bitmap

isprintedontwoprinters withdifferent polarity processestheprint produced with "write

white"

tendstobe lighterthanthe printproduced with"write black". Inconsistencies acrossprinterscanbecompensatedfor intheoutline font renderingalgorithm,sothatthesamebasicoutlinecanbeusedtoprint ondifferent process printers.

Incontrast,tomake

bitmap

fonts lookthesame onprinterswithvery differentprocesses, differentfont bitmaps are needed.

3. Betterselection ofhigh quality rotated andscaledfonts

Asinglefontoutline canbe scaledtoanysize and rotatedtoanyangle. Inadditionitcanbe "obliqued"

ortiltedor reflectedineither orbothaxes. Inshort,anyoutlinefontcanbe transformedinawaythatcanbedescribed

by

any lineartransformation.

By

comparison

bitmap

fontsare applicablefor onlyone size and orientation(andresolution andprocess). A 12pointfontcontainsanentirelydifferentset ofbitmapsthana 10point fontofthesamefontstyle. Thenextsection

(4)

discusseswhatthismeans relativetofont storage space. Anothermethodofprinting bitmapsistouseoneorseveralbitmapsand scalefromthenearest

bitmap

fontavailable. Althoughthismethod saves storage space and communicationsdownload timethequalityofthefont is severely degraded.

4. More memoryspace efficient.

Anoutlinefont isspecified at onesize,

typically

ona 1,000

by

1,000unit gridfor

POSTSCRIPT. Theoutlinedescription foreachcharacter ofthefont isspecifiedrelativeto discretepointsonthisgrid. Theseoutlines are madeupofstraightlinesegmentsandbezier curve segments. Charactersinthisfontarethen

fully

scalableandrotatablefor anysize,

resolution,and orientation. Anoutlinefonttakes

approximately

30

KBytes

ofmemory

'

space. Forexamplethesize oftheAdobe

POSTSCRIPT

Stone

Serif

downloadable

font is 34,260bytes

(*)

whenstored onthehostMac Ucomputer. Oncethefont is

downloaded

it ispackedinsidetheAppleLaserWriterPlusinaslightlymorecompact mannerand occupies28 KBytesofRAM**.

*

measuredwiththeGet Info utilityoftheApple

Macintosh

Finder ** measuredwiththePrinter Font

Directory

function

oftheFont

Downloader

program

4

(15)

By

contrasta

bitmap

font only describesatypefacerendered at a singlesize, resolution,and orientation. Ifa 10point anda 12point

font

are needed

(say

at a givenresolutionand orientation)then two

different files

mustbecreated and storedforthebestquality. One size canbescaledfromtheother(see #3above),butthisyieldsverypoor results.

The size of a

bitmap

fontvaries asthesize ofthefontandtheresolution varies. For exampletakea 12pointfontwith96printable characters at a300 dotperinchresolution. The

largest

possible

bounding

boxof a 12pointfont is 12points wide

by

12pointhigh. Thiscanbecalculatedtobe 50 dots:

12points * 300 dotsperinch = 50 dots izpoints

72points perinch

Sothe 12point

by

12pointboxwhentranslatedinto dots isa50 dot

by

50dotcharacter

bounding

box. Thisrepresents2500

dots,

each of which canberepresented

by

one

bit,

assumingthedot isbitonal(i.e. BlackorWhite). 2500bitscanbestored as313bytesper

character. Onaverage the charactersonly occupyabout onethird ofthisspace,soittakes

approximately 104bytestostoreeachcharacter's

bitmap

alone. For96charactersthis rums outtobeabout 10 Kbytestostorethebitmapsofafull96characterset Additionalfont

informationwhich cantakeseveralKBytesalso needstobeincludedalongwiththe

characterbitmaps. Anexampleofthiskindofinformationisthecharactermetricsofafont (i.e.width,

height,

kerning

info). Ifthisinformationtakes4

KBytes,

then thehypothetical

font describedabovewillneed 14 KBytestostore a single sizeofonefont. Thereare other factorswhichinfluencethesize of

bitmap

fonts.

Depending

onthecombination ofthe size

and resolution ofa

bitmap

font,

theeffect ofscalingafontwillhavevaried results. Three

(size-resolution)

"regions"arelookedatinmoredetail below:

Low

(Size-Resolution)

"Region"

Thisregioncanbeactiveunderthreeconditions:

1. smalltomediumpoint sizes are selected(e.g.

10, 12, 14);

2.

(screen)

resolutionsofapproximately 75dotsperinchareused;

3. themethodofstoringthebitmapsuses

"Byte"

or"Word"padding.

Atthesesize-resolutioncombinationstheaveragecharactersallfitwithinonebyte(of

width). The 12point

bounding

boxis approximately12 dots

by

12dots atthis

resolution. Ifthewidthoftheaverage characterisonehalfofthis,thecharacteris 6

dotswide. With"byte

padding"

the

bitmap

ofthischaracter wouldbestoredas a

columnofbyteswiththerightmosttwobitsofeachbytepaddedwith zeroes.

Using

the sameassumptions a 10pointfontwouldhavean average characterwidthof

approximately5

dots;

at 14point,7dots. Inthisregion,asfonts are scaledthesize of storageneededscales

linearly,

not geometrically. Thisis because onlytheheightofthe

fontchanges(morerows)butthewidthdoesnot(mostcharactersfitintheonebyte).

Notethateventhoughthebitmaps scale

linearly

inthisregion,thespace requiredto

storetheconstant metricinformationoftenoutweighs theamount of storage space

neededforthevariable

bitmap

data.

Nospecificexampleisprovidedtodemonstratethiseffect

5

(16)

Medium

(Size-Resolution)

"Region"

Thisregion canbeactive under eitherofthe

following

twoconditions:

1. Nobytepadding (i.e.one character's

bitmap

runsintothe next);

or

2. Byte paddingisused with

-smalltomedium point sizes (e.g.

10, 12, 14);

-(printer)

resolutions ofapproximately300dotsperinch.

Inthefirstcase,ifnobyte paddingis usedboththewidthandheightchangeasthefont size changes. Thesize thereforescalesquadratically(asthesquare).

Inthe secondcase,ifthesize-resolutioncombinationis largeenoughsotheoverhead

incurredwithbyte padding becomesnegligiblethen,onceagain,thefontsize scales

quadratically. As discussedearlierinthissectionthe 12point

bounding

boxis 50 dots

by

50 dotsatthis resolution,sotheaverage characterisabout25dotswide. Withthis size-resolution combinationamuch smaller percentage oftheinformationisbyte padding,soas thesize ofafont increasesthespaceneededtostoreit increases intwo

directions. The formulathatbetterexplainsthisphenomenais:

y=x2 + b

Notethat the space requiredtostoretheconstant metric

information,

specifiedasb

above,isquite substantial.

Macintosh

bitmap

fontsarestoredin memorywith each character

butting

upto the next character all

having

a constantheight Bytepaddingisnotused. Toshowthat the

(variable)

bitmap

portionofthescreenfontscalesgeometricallywithfontsize,the12

pointand24pointTimes Roman screenfontswereexaminedusing ResEDIT (a Macintoshresourceeditor).

PointSize TotalSize*

Bitmap

FontSize** Metrics,etc.**

12 7,570bytes 1,752bytes 5,818 bytes

24 12,730 bytes 6,912 bytes 5,818 bytes

* Measured

withtheFont/DA Mover utilityprogram. **

MeasuredwithResEDIT.

Macintosh Times Roman Screen Font

Figure 1.4.1

b=5,818

x=

(

point size

/

12

)

*

V

1,752=41.9/orthe

Times Roman

screenfont

Itisclearlyshowninthefigure 1.4.1that the

Bitmap

Font

Size

scales

quadratically

with thepoint size. Thesize ofthe

bitmap

portion ofthe24pointfont isalmostexactlyfour

timesthatofthe12pointfont (within 1.4%errordueto rounding). Seereferences29 and30formoreinformationonthe

Macintosh

sreenfont

formats.

(17)

High

(Size-Resolution)

"Region"

Asthe

(size

*

resolution)product getsmuchlargerthebasiceffectonthe

bitmap

storage neededcontinuestoberiseexponentiallywiththesizeofthefont.

However,

whenthe

bitmaps

get much

larger,

they

aregenerallycompressed. Atypicalcompression scheme

isonecalled

"run-length

encoding". Thesimple onedimensionalversionofthis compression schemesimplystoresthenumber ofwhiteandblackpixelrunsforeach scanlineoffont

bitmap

data. Moresophisticated schemes allow compressionintwo

dimensions.

Theobvious advantage tousing datacompressionisthatisreducesthe amountofdatastoragespace needed. The disadvantage isthatmoretime (andor

hardwareassist)isneededtoprocessthedataonbothends: compressionand

de-compression.

"Compressed

characters consumemuchlessspace.. thanfullpixelarrays

(by

factors of

upto

40),

butrequiremore computationtoreconstitutewhenyou needthem.

Reconstituting

acompressedcharacterisstillsubstantially fasterthanre-executingthe

original characterdescription." IntheAppleLaserWriterIIntx bitmapsoffontsthat

arelargerthan20pointsinsize are storedincompressedformat (all Ref.

2)

7

(18)

1.5 Text. VectorGraphics,andBifmanImages

The POSTSCRIPTpagedescription languagehasinstructionsthatallowstheusertodraw text,

vectorgraphics,and

(scanned)

bitmap

imagesonapage. Thisthesisconcentratesontext and doesnotaddressthevectorgraphics and

bitmap imaging

areasinany detail.

However,

many

real-lifeapplications,likeelectronicpublishing,regularlyincludethesetypesofimages. POSTSCRIPT isveryrich invectorgraphicsand

bit-map imaging

functions. Itwouldbe

misleadingtonot even mentionthemina paper such asthisone.

Therefore,

topresent amore completepictureof

POSTSCRIPT,

allthreewillbe discussed

briefly

here.

1.5.1 Text

Text is generallythesimplestmostefficientand mostused

"mark"

thatisputonthe page. Onceafont is definedwithastringlike

/Times-Roman

findfont12

scalefont setfont most ofthePOSTSCRIPTprogramconsists oftheactualstrings ofcharacters. Insimplelineprinterstheonlyoverheadisthecarriage return- line feed characters

delimiting

linesoftext. ThiscanbetwoACSIIcharacterspereach100

character (orso)lineoftextor2%overhead. WithPOSTSCRIPTtheoverhead can

varywidely, duetoPOSTSCRIPT's diverse functionality.

But,

fora simplelineprinter emulation,theoverhead oftextualPOSTSCRIPTcanbemadewithafewsimple

assumptions:

1.asinglepositioningcommand,like 72 720moveto,willbeused perlineoftext;

2.the stringsoftextwillbeencapsulatedinparentheses,andfollowed

by

theshow

command;

(

thisisastring oftext

)

show

3. 100charactersperaverage

line;

4.thenumberoftinesare sufficiently largesuchthat the overheadincurred

by

the

instructions

selectingthefontcanbe

ignored;

5. additionallyonecarriagereturn- line feed

pairperline isused

Withthese assumptionsthereare22charactersper100charactersofoutputtextor22% overhead. A verydensepageoftext

containing

4,000

characters,canbe

described by

approximately

4,900charactersof

POSTSCRIPT

code.

Since

POSTSCRIPT

isafull

programming

language,

a

simple program that emulates thecarnage return- line feed function

canbe

defined

inthe

beginning

ofthefileand accessed

by

callingthatfunctionwithasingle character(i.e.thenameofthe

function)

after eachstringoftextisspecified.

Using

this method

the overheadcanapproach3 % ignoringimnalizationoverhead, and

assuming

one

matching

pairofparentheses

one character

(c,

below)

which callsthecarriage

return- line

feed function:

initialization includes:

-specifyingthe

font

-defining

thec(carriagereturn- line

feed)

procedure*

-positioningthefirst lineoftext

(first stringofcharacters

)c(

second

string

ofcharacters

)c(

third

string

ofchar

)

Generally,

asthe

complexity

ofthe text

increases,

though,

so

does

theoverheadof

describing

thattext Muchmoreissaid aboutte"xtthroughout

titis

^thesis

8

Section1.5

(19)

1.5.2

Bitmap

Images

Ontheotherendofthespectrumofefficiencyand speedare

bitmap

images. Iftheentire page weredefined

by

a

bitmap

image

thatmatchestheresolutionoftheAppleLaser Writer Plusprint engine(300dotsper

inch),

itwouldtakeover8 Mbitsor 1 MByteof

binary

data. That's

90,000

bits persquareinch! Theoverhead ofPOSTSCRIPT for

images

ismuch more severethanfortext Asingle

binary

byteofimagedata is

described

by

twoASCIIcharactersthatspecifytwohexadecimalnumbers. So 1 MByte of

binary

data is

described

by

2 MBytesofASCII-encodedhexin

POSTSCRIPT,

or

100% overhead.

Fortunately

onedoesnotnecessarilyneedtospecifythatmuchdatato

filltheentirepagewith a

bitmap

image. This isbecause POSTSCRIPT:

-isresolutionindependent The

input

image doesnothavetomatchtheoutput300dpi resolution. The

POSTSCRIPT image

operatorautomaticallyadjuststheinputto outputmapping forprinterswithtwodifferentresolutions

(say

300dpiand600dpi).

The inputcanbepresentedtotheRIPin anyresolution.

- allows

scalingofallimages(whether

they

aretext,graphics,orbitmaps). Animage

scannedfroma 1 inch

by

1 inchimagecanbescaledtoanysizeontheoutput. Infact

any lineartransformationcanbespecifiedwhichcan:

scaleinxandy

by

thesame amount(1inch

by

1 inchscalesto7inches

by

7

inches);

-anamorphicallyscaleinxandy (1 inch

by

1inch scalesto3inches

by

7

inches);

-"tilt"

theimage(rectangularimagebecomesanimage

fitting

aparallelogram);

-rotatetheimage. Imagescan alsobe scanned as

"contone"

images (i.e.morethan 1 bitperpixel;

typically

8 bitsper pixelformonochrome). Sincetheoutputimagecannot printgreydots

matchingthegreyareasofinput

image,

amappingofgreyvaluestoblackandwhite printabledotsmustbemade. This mappingiscalledscreening. Variablesthatcanbe

setwithPOSTSCRIPTare:

-frequency

*ofthescreen. Thisisthenumberof"halftone

dots",

or

"super-pixels",

areprinted perinchontheprinter. Eachofthesehalftonedotsrepresent agreyvalue

(orsetofgreyvalues)fromtheinputcontoneimage.

-angle *ofthescreen. This specifiesthenumber ofdegrees

by

whichthehalftone

screenistoberotatedwithrespecttothedevicecoordinate system.

-spotfunction*ofthehalftone dot. This specifieshowthehalftone dot istobe

"grown"

astheinput greyarea changesfromwhite(noblackpixelsturnedon)toblack (all blackpixelsturnedon).

Specifically,

a procedureisspecifiedwhichdescribesthe orderinwhichpixels withinahalftonecellare whitenedtoproduceany desiredshade ofgrey,

(setscreen,

reference

3)

- input

tooutputtransferfunction. Aprocedurecanbespecifiedwhichmapstheinput greyvaluesto theprintergreyvalues,whichisafractionof allpixelsthataretobe

whitened,

(settransfer,

reference

4)

(20)

Thetwogreatestperformancebotdeneckswhen

dealing

withimageswith

POSTSCRIPT are:

1. accessingtheimage. Imagestendtobelarge. Ifacommunicationsline isused,it

simplytakes a

long

timetodownloadtheimage. POSTSCRIPT's method of

encodingtheimagewithASCII-encoded

hex,

describedonthepreviouspage,slows

downthisprocess

by

afactoroftwo. Forexample a256 KByte

binary

image,

which when encodedthiswaybecomes512

KBytes,

takesalmost9minutes to

download

usinga conventionalRS-232serialinterfacelinerunningat9600 baud. Evenwhen theimage isresidentinsidethe

RIP,

sayon a

disk,

once againduetothesize ofthe

image itstilltakesarelatively

long

time toretrievetheimage from

disk,

andtousethe

diskas a

backup

scratch padwhenprocessingtheimage.

Thisbottleneckcanbe diminished

by

using fastercommunications

interfaces,

faster

disks,

and moreRAM. Ocourse,alongwiththeseRIPenhancementsusuallycomes ahighercost.

2. processingtheimage. Theprevious page summarizestheimage processing

functions

thatcanbeappliedto

bitmap

images. Asinall of

POSTSCRIPT,

the

functions

vary from verysimpletoverycomplex.

Applying

aparticularimage processing algorithmtoanimagetakesanamountoftimethatis

loosely

proportionalto the "complexity"

oftheimage processing functionselectedand,you guessed

it

the size oftheimage.*ev

Thisbottleneckcanbereduceby: ,

-onceagain,moreRAMand/orfaster

disc;

-fastergeneral purpose

CPU;

-computerarchitecturethatbettersuitstheimage processingalgorithmsthatare

commonlyused. This caninclude specialpurposehardware.

1.5.3 Vector

Graphics

Somewhere

inbetweentextand

bitmap

images liesvectorgraphicsinspeedand efficiency. Asinglestraighttinethattraverses theheightand width of a page canbe describedinjustafew

POSTSCRIPT instructions:

J

mveto %set cursorto

lower

left

comerof page 612792Iineto % draw linetoupperright

comer,coordinatesarein

stroke % "points"

or1/72 inch

NowtheRasterImage Processorneedstofillallofthepixelsinpage memorythat

correspondto thepixelsthatmakeuptheblack line. Othersettingsthateffectthe

renderingof

(connected)

lines are:

-width ofthe

line,

setablewiththesetlinewidthoperator;

JOin'

WWCh CanbCmlter' IOUnd'OT

bCVel;

Settable***Ae

setlinejoin

"

^^

^

^^"Pn>jeCted

Square; **********

10

Section1.5

(21)

Insteadofthe simple sequenceof

instructions

shownabove, apathconsistingofmany

shorter

lines

segments,all connectedtogether,which definethesame resultantline

couldalsobespecifiedin

POSTSCRIPT.

Eventhoughthesame exactbitsareturned

one, thisproblemis

significantly

moredifficult foratleasttworeasons:

1. more

POSTSCRIPT

code needstobereadand

interpreted;

2. each small

line

segment needs notonlytobe

drawn,

butconnectedto thenextline

segmentinsuch a mannertomakeitappearas onecontinuousline.

Othergraphical shapes canbespecified:

-circualar arcsegments

(arc,

arcn, reference

5)

;

- Bezier

cubic splinesegments

(curveto,

reference

6)

;

inadditiontostroking

(drawing)

alineorcurvedsegment,an areathatis described

by

a sequenceofthesesegments canbe filledwithblackorsomehalftonepattern correspondingtothe selectedgreyvalue.

(stroke,

strokepath,reference7 ;

fill,

ref.8 ; eofill,ref.9; setgray,ref. 10

)

Inadditionto

drawing

or

filling

thepathsthatare

defined,

thesesame paths canbeused tospecify aclipping

boundary

throughwhich othertext,vectorgraphics,or

bitmap

imagesareclippedbefore

being

renderedinpagememoryandsubsequentlyonthe

printedpage,

(clip,

reference

11)

OnceagainPOSTSCRIPT givestheuseralmostlimitless

flexibillity

for printingvector

graphics. Boththe amountofPOSTSCRIPTcode aswellastherendering compexity canvarywidely. Ihavenodoubtthatsimilar paperstothis onecouldbewritten with concentrationonperformanceaspects of vectorgraphicsor

bitmap

imaging

insteadof text

Hopefully,

thisbriefsectionhasprovidedthereader with some appreciationfor thenumberandmagnitude ofissueswhen

dealing

withPOSTSCRIPTvectorgraphics and

bitmap

images.

11

(22)

12

(23)

2. Problem

Description

Therearemany

different

ways of

describing

a page oftextinPOSTSCRIPT. Howonedescribesa

pagecan

significantly influence

theoverallperformanceofthe

printingsystem. Thevariablestobe

investigated,

alongwiththe expected outcomeoftheexperiments, aredescribed insections2.1.1

through

2.1.8

. Theexpected resultsarebasedon assumptions oftheRIParchitecturalmodel

describedinsection2.4.

Sections

2.1.1 through 2.1.5match with sections3.1 through 3.5. The lattersectionsdealwiththespecificexperimentalproceduresused,theresultsthatareproduced,

analysis oftheseresults,andproposals, ifany,on what changescouldbemadetoimprove

performance.

Foreachvariableinquestion,a set ofbenchmarkpages are generatedtodemonstratethe

significance ofthevariable.

Many

ofthebenchmarkpagesareincluded insections 3.1through

3.5. Duetospaceconstraints,benchmarkpagesthataresimilartoones

included,

but different in somesmallway,are

described,

butnotincludedasinserts.

Section 3.2 specifiesthemethodsusedin calculatingandmeasuring timestakenforthedifferent

phases ofthe

RIPing

process,namelycommunications andthecombinedcompilationand

rasterizationtime. Theprogramswrittentosupporttheexperiments performedforthis thesis are

explainedinsection3.3 with

backup

informationprovidedin Appendix2.

Onceagain, section3recordstheexperimentallymeasured

times,

analyzesthese

times,

and suggestsimprovements to theRIParchitectureand/ortothePOSTSCRIPTlanguage itselfthat might yieldbetterperformance.

Section 4presentsoverallconclusionsusingalloftheinformation in section3tocomment onthe generaltrendsthatwereobserved.

13

(24)

2.1 Variablesthat AffectPerformance

TherearemanydifferentwaysthataPOSTSCRIPTprintercanbeinstructedin howtoprint textona page. Somevariables which affect system performance arelistedmthe

following

sections.

2. 1.1. FontFormats:Outlinevs.Bit-Maps

Problem Description

Rasterizing

afontoutlinetakesmuchmore timethan copying(BLT-BlockLogical

Transfer)

afontalready in

bitmap

formto thepagebuffermemory. Thereis a

tendency

touseonlyasmall number ofdifferentfonts(atacertainsize andorientation)inany givenwritten work. Infactit isconsidered"good

style"

tolimitthenumberof

fonts

and sizestojustafewwithinany document.

Furthermore,

whenusinganygiven

font,

most ofthetimethewriter usescharacters ofthealphabetthathavebeenusedbefore. For

exampleiftheletter "a"

isused20timesonasinglepageinthesamefont itneedsonly toberendered once andisrepeated 19 times. Inthis casetheleter"a"

isrepeated

95%

ofthe time. Repeatuse offonts and of characters withinafontarethetwoprimary reasons whyallPOSTSCRIPTprinterstodatehaveafontcachewhichstoresthescan convertedfontsfor lateruseinthefaster

bitmap

form.

"Printing

acharacterthatis already inthefontcacheis

typically

athousandtimesfasterthan scanconverting itfrom thecharacterdescription in diefont"

(reference

12)

. Thetimeconsumingprocess of

outlinefontrasterization canbe doneatvarious

times,

influencing

theprinter's performance. Thissectionlooksatthreeoftheseparticulartimes:

1. insideaPOSTSCRIPTprogram,when a new non-cached characteris specifiedtobeprinted;

2. once atthe"factory"wherethebit-mapsarepermanentlystoredinnon-volatile memory,

typically

sometypeof

ROM;

3.

during

idletime. WhentheRIPisnot

busy

generatingpagesitcanperformthetime

corisumingfontoutline rasterizationtask.

Thesethreearelookedatinmoredetailinsections2.1.1.1 through

2.1.1.3,

respectively. Thecorrespondingexperimentalprocedures,results,and analysiscanbe foundinsections3.1.1 through3.1.3.

Section 2.1.1.4anditscomplementsection3.1.4 dealwiththe performanceeffects of

scalingandrotatingoutlinefonts. Since detailedperformance measurements

willbe

done insection

3.1.4,

theprintjobforthis experiment containsno repeat characters. Thisistheonly waytoisolatethescanconversion processfromthebit

BLTing

(moving

bit-maps)

from

bit-map

cache. Moreonthisinsection3. 1.4.

14

Section2.1.1- Problem

(25)

2.1.1.1 Real Time

Outline

Font Rasterizationand

Caching

During

thecourseof atypicalPOSTSCRIPT

file,

fontsresidentinoutlineformare specifiedtobe scaled,

(possibly)

rotated,and printed. Whenthis occurs thefirst printusingthese

fonts

tends tobeslowdueto thetime consumingtaskofin-line (or

real

time)

scanconversionoftheoutlinefonts intothefaster

bit-map

form.

ExpectedResults

The firstpageafter a powerupsequenceprintingafontthathasnotbeenstoredin

bit-map

form isexpectedtobeslow. Oncethisfirstpagehas beenprinted,all ofthe fontsonthatpagewillhave beenstoredintheRTP's

bit-map

fontcache.

Subsequent

pagesareexpectedtoprint at a muchfasterrate,assumingtheprinteris keptpowered-up.

2. 1.1.2 Pre-Cached Bit-Maps

Ifthetimeconsumingprocessof outlinefontrasterizationis donebeforethefont is requestedinthePOSTSCRIPTprogram, substantialperformance gainscanbe realized. Thissectiondealswiththecase wheretheoutlinefontrasterizationis done

once"atthefactory"andtheresultantbit-mapsofaselectfewfontsare storedin

non-volatile

bit-map

fontmemory,suchasEPROMinthecaseoftheApple

Laser-WriterPlus.

ExpectedResults

Pagesthatprintfontsthathavebeenpre-scanconverted andpermanendystoredin

ROMare expectedtoyieldequivalentperformance whetherthepageisthefirstone afterpowerupornot. Thetimeconsumingoutline scanconversionhas beendone once, atthefactory. The REPneednotbeboggeddownwiththis task.

15

(26)

2. 1.1.3 BackgroundOutlineRasterization

Whileapage printerisinthepowering-up state,theuseris

typically

forcedto wait

uptoseveral minutesbeforethefirstpage canbeprinted. In laserorLED electrophotographic printersmuch ofthis

delay

is dueto thetimeittakesforthe

fuser

heating

elementtoriseuptoitsrequiredtemperature.

During

a portion ofthis

timetheRIP usuallygoesthroughaninitializationanddiagnosticcheckingphase.

Oncethisis

done,

theRIPmust wait untiltheprint engine

is

readytoaccept aprint

jobfromtheRIP. Thisis oneexampleof idletime. Anotherexample ofidle time isthetime in between jobs. Ifthetime consumingprocessof outlinefont rasterizationis donebeforethefontisrequestedinthePOSTSCRIPTprogram,say

during

thisidle

time,

substantial performancegainscanberealized.

Expected Results

SeveralfontsintheAppleLaserWriterPlusarescan convertedfromthereoriginal outlineformto

bit-map

formand storedintheREP'sfontcachememory

during

idle time. The POSTSCRIPT Language Reference Manuallists severalfontsand sizes at azerodegreerotation(i.e.portraitorientation)thatareautomaticallyscan converted

during

idle time (reference

13)

.

They

includeall ofthealphanumerics andcommon punctuation ofthe 10and14pointTimes-RomanandHelvetica

fonts,

and alsothelowercaselettersofthe

10,

12,

and 14pointTimes-Boldand

Helvetica-Bold fonts. Inaddition,an extensionto thePOSTSCRIPTpage

description languagehasbeenspecifiedfortheAppleLaserWriterPlus

toallow

thePOSTSCRIPTprogrammertospecifywhichfonts he orshe wouldliketobe

scan converted

during

theprinter'sidletime. The setidlefonts operator allows theselectionofone ofthirteenfontswithadifferentxandypoint size selectablein

tenthsofa point

increments,

and an angle selectableinincrementsoffive degrees

(reference

26)

.

Printtimesforpagesthatusethe 10pointHelveticaand the 14point

Times-Roman fontswillbe lookedat The POSTSCRIPT files containing referencesto thesefontswillbe sent atvaryingtimesafterthepower-upsequenceis

begun. Thiswillbedone

by

simply

tirrning

theprinter off andthenbackon. It is

expectedthatifajobusinganidle timescan convertedfont issent

immediately

to the printer

following

a powerupsequence,itwilltakelongerthanifsometime iswaited

beforethisisdone. Theexperimentsarereportedinsection3. 1.3.

16

Section 2.1.1.3

(27)

2. 1.1.4 Effectof

Scaling

andRotation

Section 2.1.1.4anditscomplementsection3.1.4 dealwiththeperformance effects

of

scaling

androtatingoutlinefonts. Page 91 ofthePOSTSCRIPT Language

Reference

Manualstatesthethe"built-inPOSTSCRIPT

(outline)

fontsareusually

defined

intermsof a 1000unit character coordinatesystem,and theirinitial

FontMatrix

is [0.001 0 0 0.001 0 0]. Whenafont ismodified

by

the scalefontor makefontoperator, thenew matrixisconcatenated withthe

FontMatrix

toyield atransformedfont." InotherwordstheFontMatrixmaps a

fontinthe 1000unit spacetoa one unit spacescalingthexandyfontunits

by

1/1000withthe

following

matrix:

0.001 0 0

0 0.001 0

0 0 1

Thismatrix scalesbothxandycoordinates

by

1/1000. SeethedefinitionofCTM

inthe

Glossary

(section

5)

formoreinformationonthevariablesof agivenmatrix.

Sincethe defaultunitin POSTSCRIPT isthepoint,thismeansthatifanygivenfont isnot scaled

by

somemeans,itwillprint out at a1point size. Thereforeall usable

fontsthatarescanconvertedfromoutline are

initially

scaled. Thetimeconsuming

matrixmultiplicationstepmust alwaysbe done. Thesecondpartofthescan conversion processinvolvestherasterization,orrendering,ofthetransformed

(scaled,

etc.)fontoutline.

Notethat,in additionto theconcatination oftheFontMatrixwiththe transform matricesgenerated

by

thescalefontandmakefontoperators,thefontsare also affected

by

theCurrent Transformation MatrixortheCTM. Othergeneral

POSTSCRIPToperators thatmodifytheCTMarethe

translate,

rotate, and scale operators.

So,

thereareseveral waystoscale and rotatefonts. As already

mentioned,executingthescalefont and makefont operators can scalefonts. Inaddition,thePOSTSCRIPTscaleoperator,whichaffectsthe

CTM,

also applies tofonts. Fontscanberotatedintwoways:

by

specifyingthecorrectmatrix

variablesusingthemakefontoperator; or

by

executingthe rotate command. Note

that themakefontoperatorprovidestheuser witha much more powerfultool than

justthescalingandrotatingfunctions. Sincetheuserspecifies amatrix, anylinear

transformationcanbespecified. This is howfontsare obliqued(ie. tilted)for

example.

Thereisone morefuntionthatshouldbementioned:that

is,

applying"intelligence" to theoutlines. Itis commonly knownthatAdobe

Systems, Inc.,

theimplementors

ofPOSTSCRIPT intheApple LaserWriter

Plus,

appliesproprietary"hints"to theirfontoutlineswhenrenderingthem. This is donetoyieldbetter

looking

charactersatthe300 dotperinchresolutionoftheAppleLaserWriterPlus. This

procedureiscertainlydoneatthe0degree

(portrait)

orientation andis probably done atother quadrant orientations- 90degrees

(landscape),

180

degrees,

and270 degrees. Theperformanceimpactofthisfactor isnotknown.

Thissection comparestheperformance ofscalingandrotatinga printerresident

POSTSCRIPT outlinefontversusthesamefontthathas already beenscan

convertedand storedintheRTP's

bit-map

fontcache memory. The fontthathas been selectedfortheseexperimentsistheTimes-Roman

font

twopointsizes will

be 1 1 pointsand22points; threeangles of rotationwillbe

0,

70and

90

degrees. 17
(28)

A^Tcusstdabove,therearetwostepsinrenderingan outlinefont:

-applying thescalingandrotationto thecurrentFontMatrix. This needstobe done for anyscalefactoror rotation angle. Somemultiplies areeasier,

however,

andshould executefaster. Ofthe threeangles specified,0and90 degreesshouldbefasterthan70degrees. _ - scan

convertingthetransformedoutline. In going froman 11 toa22 point

font

twice thenumberofscanlines needtobeaccessed;fourtimesthe numberofpixels needtobewrittento.

Scaling

Outline Fonts:

Ifc?jtconvertingthetransformedoutlinefontisthedomimant

factor,

the22point fontshouldtake two tofour times longerthan the 1 1pointfont If however applyingthetransformationto thefontoutlineisthedominant

factor,

then the performance shouldbeclosertoequal(i.e.independent ofpoint size). Not

knowing

whichoftheseis

dominant,

theexpectationrelativetofontsizevariationis asfollows:

Asthe, size ofthefontincreases,thetimeneededtorenderthatfontisexpected toincreaseat a ratein betweenoneandthesquareofthesizedifference. Inthe of11and22pointsize

fonts,

the 1 1 pointfontis expectedtoperformfrom 1 to4timesfasterthanthe22pointfont Notethattheeffect of

incorporating

font"intelligence"intothiswas not considered.

FontOutline Scan Conversionvs.Pre-Cached

Bit-Map

Fonts:

Rendering

anoutlinefont isexpectedto takemuchlongerthanpullingthesame

font

already in

bit-map

form,

from die fontcache.

"Printing

acharacterthatisalready in thefontcacheis

typically

athousandtimes fasterthanscanconvertingitfromthe characterdescriptionindie

font"

(reference

12)

Basedonthisinformationit is expectedthat themeasured performance ofpre-cachedfontsshouldbe

approximately 1000 times fasterthanthemeasured performanceofoutlinefonts. Theoverhead ofabase (i.e.

blank)

page mustbeconsideredinthisanalysis. See section3.2.4 formoredetailsonthis experiment.

Rotating

OutlineFonts:

As fortheeffect ofangleonperformance,it isexpectedthat0 degreeswill yieldthe bestperformancebecauseoftworeasons:

- itis

assumedthat thePOSTSCRIPT interpretor is probablyoptimizedforthis

highly

usedcase;

-at0

degrees,

the cos andsinvalues yield1and0respectively.

Assuming

this information isusedtodescreasethenumber ofcalculations,anincreasein performance shouldberealized

Theperformanceofthe90degreerotated case shouldfollowwiththe70 degree rotationcaseyieldingthepoorest performance. Ontheother

hand

the70 degree rotation casecouldinstead, viedthefastestresultsiffont

intelligence

stepturnedout tobeadominant(andslow) process.

18

Section 2.1.1.4

(29)

2. 1.1.5

Variations

ofFont

Style

Onpage20oftheFluent LaserFonts

User's Guide itstatesthat"complex fonts

... willtake

longer

toprintbecauseoftheintricatecurves andshapes". Three printer-residentfontswithdifferent levelsof

"complexity"

willbeused:

1.

Helvetica

was chosen

for its

simple style.

There

are no serifs and

many

ofthe characters,

like

H, A,

and

V

usestraight

line

segments exclusively.

This information

can

be

stored

in

a

very

compact outline

form

and

is

expectedtoscan convert

faster

thanthe two other, more complex

fonts described in

2 and3 below.

The

text ofthis paragraph

is

set

in Helvetica

at 12 point.

2. Times Romanwaschosenfor itsmediumcomplexitystyle. Ontheonehand Times Roman isa complexfontsinceithasserifsonmanyofthecharacters,

like

"i", "m",

and "T". Ontheotherhand manyoutlinesegments ofthe characters oftheTimes Roman fontare madeupof straightlinesegments orthoganalto thedevicecoordinate system. ThepagethatusestheTimes Roman font isexpectedtoyieldbetterperformancethanthesame pageusing thesimplerHelveticafontshownin

(1)

above,butworseperformancethan the morecomplexZapfChanceryMedium Italicfontshowin

(3)

below. Thetext ofthisparagraphissetinTimesRomanat12point

3.

Zapf

Chancerywas chosenforitscomple^style. 'Whereasthefontsshownin

(1)

and

(2)

above usedmanystraightOnesegments, the

Zapf

ChanceryMediumItalic fontusesmanymore curvedsegments,which are

inherently

morecompe%. The

performanceofaprintedpageusing Msfont isexpectedtoyieldtheworst

performancewhen comparedto

(1)

and(2). Thetextofthisparagraphissetin

Zapf

ChanceryMediumItalicat12point.

Notethatwhen "performance"ismentionedabove,onlythescan conversion processis intendedtobeusedas a comparison. Oncethefont is inthe

bitmap

font cache allthreefontsareexpectedtoperformequallywell. Ifthereisa small difference inspeedwhenprinting fromthefontcache,thefontthatisthesmallest (i.e. Zapf

Chancery)

shouldbethe

fastest,

withthefontthatis thelargest (i.e.

Helvetica)

shouldbetheslowest ThisisbecausethetimetoBitBLTafont characterfromthe

bitmap

fontcacheisassumedtobe

directiy

proportionalto the

sizethatcharacteroccupiesinmemory. Notethatalthough each ofthefontsshown in

(1),

(2)

and

(3)

are set at 12points,

they

each appeartobeadifferentsize.

ExpectedResults

The

following

relativescanconversion rates are expected:

- Helvetica:fastest duetothe simple style;

,

- Times Roman:

intermediate;

- Zapf Chancery: slowestduetothecomplexfontstyle.

Oncethefont hasbeenscan converted andplacedintothe

bitmap

fontcache,all fontsare expectedtoprintequally fast.

19

(30)

2. 1.2. Residentvs.Downloaded Fonts

ProblemDescription

Fontscanbeeither residentintheprinter(i.e.

RIP)

orbe downloaded fromthe

host

computer(host-resident).

Furthermore,

fontscanbe ineither

bit-map

or outline

format

Thissection concentrateson observationoftheperformancedifferences between

downloadable

vs. printer-residentfonts. To simplifythe taskandtoget more meaningfulresultsoutlines are comparedwithoutlines,andbit-maps withbit-maps.

Downloading

fontscansignificandy impactsystem performance. The

key

parameter

thateffects performanceiscommunicationtime (i.e. timetodownloadthefont). For

outlinefonts thismaybeabout30 KBytespertypefaceatanysize. For

bit-map

fonts

theamount ofdatavarieswiththesize ofthefont (seesection 1.4). Afull

bit-map

representingeach character at each sizeisneeded

Fontscanbe inone ofthe

following

formats:

Bit-map

fonts

A.

Downloadable

bit-map

fonts;

B.

Printer-resident

bit-map

fonts.

AdobeBezieroutlinefonts

C. ResidentintheApple LaserWriterPlusprinter(RIPand printenginecombination);

D.

Host-resident,

downloadable

fonts in AdobeencodedBezier

format

Thirdpartyoudinefonts

E.

Downloadable

fontsinBezier format

described

withgeneric

POSTSCRIPT

instructions;

Allfiveoftheseformatsare usedtoprintsimpletextand arecomparedon aperformance

basisinthis secnon. *

Threecomparisonsare made:

Avs.B Residentvs.

downloaded

bit-map

fonts.

Seesections2. 1.2.1 and3.2.1.

C vs.D Residentvs

downloaded Adobe

outline

fonts

Seesections2.1.2.2 and

3.2.2.

Dvs.E Adobevs. thirdparty

downloaded

outline

fonts

Seesections

2.1.2.3

and

3.2.3.

20

Section2.1.2

(31)

2.1.2.1

Downloaded

Bitmapsvs. Printer Resident

(Cached)

Bitmaps

Two

bitmap

fonts

are usedforthisexperiment: A.

Downloadable

bit-map

font

A

hand-coded

POSTSCRIPT

bitmap

fontsimilartotheonedescribed in

section2.3.3 is downloadedto theAppleLaser WriterPlus. Forthis

experimentonlyten 12-pointcharactersweredefinedat300 dotsperinch. Theseten charactersarethen printed. Thedownload timeaswellasthe printing timesarebothmeasured

B. Printer-resident

bitmap

font

The Apple LaserWriterPlus hasseveralpre-scanconvertedprinter-resident

bit-map

fonts (reference 14). The 12pointHelveticafont isselectedfor this experiment Thetimetoprintthesametencharacterstringismeasured

and.comparedto thetimetakenwiththedownloadable

bitmap

fontof(A). ExpectedResults

Thetotaltimetoprintthedownloadable font includesnotonly printingthe ten characterstring

but,

evenmoresignificantly,alsoincludesthetimetodownloadthe

bitmap

fontitself. A 12pointfont isassumed at aprinter resolution of300dotsper inch. Ifafullcharacter setwerespecifiedcompletewith upperandlowercase

letters,

then theaverage size of a single character

bitmap

wouldbe approximately

170

bytes,

whichis 50%ofthe50pixel

by

50pixelcharacter

bounding

box (see

section 1.4). Sincethe tencharacterschosenforthisexperiment are alllowercase

lettersit isassumedthat,onaverage,thesize ofthese tencharacterbitmapsare25%

smallerthan theaverage

bitmap

acrosstheentirecharacter set. This bringsthe170 bytesaverageperallcharactersdownto 127bytesaverageperlowercase character.

Therefore,

thesizeofthecombinedbitmapsofthe tencharactersis 1,270 bytes.

SincePOSTSCRIPTdescribesallbitmapswithASCIIencoded

hex,

the

bitmap

data

isexpanded

by

afactoroftwo(i.e. ahexvalueof"A7"is coded astwosequential

ASCIIcharacters: "A"and"7". WhenthisistakenintoaccounttheASCIIencoded

bitmaps forthe tenlowercase characterstakeup2,540bytes.

Examining

the

POSTSCRIPT

bitmap

fontshowninsection

2.3.3,

itappearsthat thefontoverhead

excludingthefontmetricsis about 1 Kbyte. Themetricsinformationoverheadis about40bytespercharacter or400 bytesperthe tencharacterset Theanticipated

dowloadedfontsizeis:

2,540 bytes: bitmaps fortencharacters

400 bytes:metricinformation fortencharacters + 1.000 bytes: additionalfontoverhead

3,940 bytes:expected sizeoftencharacter

bitmap

font

IftheRS-232serialcommunications interface isused at9600

baud,

then the expecteddownloadtimeforthe3,940byte

bitmap

font is 4. 10seconds. Forthis

experimentAppletalkisusedinsteadof

RS-232,

so afaster download time is

expected. Notethat therawdatatransmissionspeed ofAppletalk is 220

Kbits/sec,

althoughtheactualthroughputisafractionofthismainlyduetoprotocol overhead. Seesections2.1.2.4and3.2.4formoreinformationonthistopic.

Oncethe

bitmap

font isdownloadedit isexpectedthat the

downloaded

fontwill

performaswellastheprinter-resident

bitmap

font. Theoveralltimetoprintthe

downloadablefontwillbesignificandy longerdueto thefont

download

time.

21

(32)

2.1.2.2 AdobeDownloadedOutlinesvs.PrinterResident

(Internal)

Outlines

Problem Description , ,. , . . - , .

The AppleLaserWriterPlusprinterhas35resident outlinefonts (seesection2.4for

alistof residentfonts). Inaddition,auser can purchase additionalfonts foruse withMacintoshapplication programs. ThesefontsaresuppliedonMacintosh compatiblemicro-floppy discsandincludeseveral

(usually

four:regular,italic,

bold,

andbold italic

)

styles of asinglefontfamily. Oneprinteroutlinefontand several(aboutfivedifferentsizes)

bitmap

screenfontsisprovided per eachstyle. The

bitmap

screenfontsareused

by

application programstoprovidethedesired

WYSIWYGeffect. Theprinter outlinefontneedstobedownloadedto theprinter beforetheapplication program cansendthePOSTSCRIPTprogramtotheprinter

thatreferencesthatparticularfont Thiscanbedoneeitherexplicitly,witha program whichdownloadstheoutline printer

font

or

implicitly,

by

theapplication programneedingthefont Inthelattercasetheapplicationinterrogatestheprinterto

determine inthefontis already loadedintotheprinter. Ifit

is,

theprint programis simply downloaded. Ifit isnot

loaded,

thenthefont isdownloadedright beforethe printprogram.

Section 3.2.2compares aparticular printer resident

font

Times-Romantoanother

Adobeoutline

font,

thedownloadable Stone Serif font

They

arecomparedonthe

basisofscanconversion speed,BitBLT fromcachetopagebufferspeed,and downloadtime.

Expected Results

Whetherthefontoriginatesfromthehostor anfromaninternal RIPfont data structure(i.e. in

ROM),

the taskofgeneratinga

bit-map

fromoutlineis essentially

thesameineithercase,especially if bothfontsweresupplied

by

thesamefont vendorwho,inthiscase, isAdobe

Systems,

Inc.

So,

the taskofscanconverting theoutlines andthe subsequenttaskofmovingthecachedbitmapsto thepagebuffer inthe twocases are expectedtoyieldsimilarresults.

Thefontstyles ofthedownloaded Adobe

font

calledStone

Serif,

waschosentobe

similarin complexityto

Times-Roman,

theinternalfontitis

being

comparedto.

Thiswasdonetominimizetheeffectthatvaryingthecomplexityof afontstylehas on performance. Section2.1.1.5anditscomplement,section

3.1.5

dealwiththis subjectin detail.

Theone areawhere alargedifferenceinsystemperformanceisexpectedisinthe

areaoffont download time. Resident fontsareheld inROMsothereisno downloadtime. Downloadedoutlinefontsare

approximately

30to40 KBytesin size. IfanRS-232serialinterfacewereusedrunningat9600

baud

thedownload time wouldbeabout35 seconds. Since Appletalk isusedthistimeshouldbe

less,

butstill significant

22

Section 2.1.2.2

(33)

2.1.2.3

Adobe Downloaded Outlines

vs.Third

Party

DownloadableOutlines

ProblemDescription

Asmentionedintheprevious section ausercan purchasedownloadable fontsfor use withMacintoshapplication programs. These fontsaresupplied onMacintosh compatible

micro-floppy

discsandincludeseveral

(usually

four:regular,

italic,

bold,

andbold italic

)

styles of a singlefontfamily. Oneprinter oudinefontand several(about five differentsizes)

bitmap

screenfonts isprovidedper eachstyle. The

bitmap

screenfontsare used

by

application programstoprovidethedesired

WYSIWYG

effect. Theprinter outlinefontneeds tobe downloadedto theprinter

beforetheapplicationprogram can sendthePOSTSCRIPTprogramtotheprinter thatreferencesthatparticularfont Thiscanbedoneeitherexpticidy,witha programwhichdownloadsthe outlineprinter

font

or

implicidy,

by

theapplication

programneedingthefont Inthelattercasetheapplication programinterrogatesthe printertodetermineifthefont is already loaded intotheprinter. Ifit

is,

theprint programis simply downloaded Ifthefont isnot

loaded

thenit isdownloaded right beforetheprint program.

Downloadable fontscanbepurchasedfrom

Adobe,

thecreatorsofPOSTSCRIPT andPOSTSCRIPT fonts.

They

canalsobepurchasedfromotherthirdparty vendors. Thereare severaldifferences:

1. Adobefontsare encrypted

Third party fonts

direcdy

followtheconventionsetinthePOSTSCRIPT LanguageReference Manualwithnoencryption(reference15).

2. Adobe fonts have"intelligence". That

is,

thereisaproprietaryAdobealgorithm

whichreadsthe encrypted oudinefontwith"intelligencehints" and scan convertstheoudineproducingahighquality fontatthe300dpiprinter

resolution.

Thirdpartyfontoutlines aretreatedas generic graphic shapeswhenscaled

They

donothave any"intelligence". The qualityproducedona300dpi device isnoticeablypoorerattypical sizes (i.e. 10or12point). Compare figures 3.2.3.A.1 & 2 (no

intelligence)

tofigures 3.1.1.A.1 &2 (withintelligence).

3. Adobefontsgenerallyoriginatefromwellknownfont houses likeLinotypeand ITCandareaimedatproviding virtuallyallprintingandpublishingneeds.

Thirdpartyfontsgenerallyarenewdesignswithanunconventionalartisticflare.

Note, however,

that thethirdpartyfontselectedforthisexperiment,the CasadyWareGalileoRoman

font

was chosenforitssimilarity (instyle and

complexity)totheAdobe Stone Seriffont

4. Adobe fonts aretypicallymoreexpensive, costinginthe

$100

to

$300.

As an

examplethelistpriceoftheAdobe StoneSeriffontusedinthissection was $275.

Thirdpartyfontsare

typically

lessexpensive,costing inthe

$50

range. Asan

examplethelistprice oftheCasadyWare

Galileo

Roman

fontusedinthis

sectionwas

$45.

23

(34)

Section3.2.3comparesatwodownloaded

fonts,

theAdobeStoneSerifandthe CasadyWare GalileoRomanfont.

They

arecompared onthebasisof scan conversionspeed,BitBLT fromcachetopagebufferspeedanddownloadtime.

ExpectedResults , ,

ThetaskofscanconvertingtheAdobe

"intelligent"

outlineisinherendymore difficultthanscanconvertinganon-intelligentoutline(i.e.

treating

characterstike graphic shapes). Bothtasksneedtoconverttheoutlines intobitmaps buttheAdobe conversionhasonemorestep,thestepthatincorporatestheintelligence. This impliesthat theAdobe downloaded font (with

intelligence)

should scanconvert slowerthantheCasadyWare downloadedfont(without intelligence).

Oncethe

bitmap

has beengeneratedfromoutlineandstoredinthefontcachethe task ofprintingthebitmapsisessentiallythe sameineither case.

So,

thetaskofmoving diecachedbitmapsto thepagebuffer inthe twocases areexpectedtoyieldsimilar results.

BoththeStone SerifandGalileoRomanfontsaredownloadable POSTSCRIPT outlinefonts. It isassumedthat theirsizes aresimilarandsubsequentiytheir download timesshould alsobesimilar.

The fontstylesofthedownloaded Adobe

font

calledStone

Serif,

waschosentobe similarin complexitytoCasadyWareGalileoRomanfontit is

being

comparedto. Thiswasdonetorninimizetheeffectthatvaryingthecomplexityofafontstylehas on performance. Section2.1.1.5 anditscomplement, section3.1.5 dealwiththis subjectin detail.

Probably

thelargest factor istheonethatis leastpredictable. Thatisthevariability introducedwhencomparingtwodifferentfontvendors. Eveniftheoriginaloutlines wereexacdythesame,howtheseoutlinesareconvertedintoaPOSTSCRIPT programmay havesignificant effectsonhowfast

they

scan convert

24

Section2.1.2.3

(35)

2. 1.2.4

Appletalk

vs. RS-232

Comparison

Boththe

Appletalk

andRS-232communicationsinterfaceswereusedthroughout

thispaper. RS-232was used moreextensively duetothegreater controlthis

interface

allows:

-abilitytocapturethereal-time conversationsbetweenthehostcomputerandthe printer with a protocolanalyzer,

-thepredictable overhead(i.e.one startbitand onestop

bit);

-thepointtopoint nature oftheinterface.

Appletalk,

ontheother

hand

was usedprimarilytoallowthedownloadofAdobe andthirdparty

(CasadyWare)

downloadable fonts. Sections 2.1.2.1-3 andtheir

complementary

sections3.2.1-3usedAppletalk. Itismoredifficulttoseparateout theprotoco

Figure

Figure 2.3.3.2
Figure 3.5.2.A.2

References

Related documents

The emerging cosmo- politan constitutionalism is based upon three ideas: first, the exercise of state authority must also be legitimate from the perspective of those who are

The principle block diagram of AC servo controller based on C8051F410 on chip system, as shown in Figure 2, includes C8051F410 on chip system circuit, electric cylinder low

Suggested citation: (2011) : Structural change in agriculture and rural livelihoods: Policy implications for the New Member States of the European Union, Studies on the

The research instruments used are focus group discussion with several employee that directly responsible in university’s operational activities related to inventory such as head

CONNECT AND

PTI: Pure Technical Inefficiency, TSE: Time Shift Effect, EE: Environmental Effects. Figure 5.2: Decomposition of technical

Synnex can explore this opportunity to expand its distribution channel in this sector..