illllllllllllllllllllllllll[11Lllllllllllllllllllllllllllll United States Patent [19] [11] Patent Number: 5,781,714 Collins et al. [45] Date of Patent: Jul. 14, 1998

[54] APPARATUS AND METHODS FOR Tools Review on Common Ground, Adobe Acrobat Exchange CREATING AND USING PORTABLE and Adobe Acrobat Starter Kit.Publish magazine. Feb. 1994. Portable Documents. InfoWorld. Jan. 17. 1994. pp. 66-67 [75] Inventors: John S. Collins. Boston; Mark H. and 71-77. Goldwater. Norfolk. both of Mass. Adobei'Acrobat?Products & Technology, An Overview. by Adobe Systems Incorporated. 1585 Chareston Road. Moun [73] Assignee: Bitstream Inc.. Cambridge. Mass. tain View. CA 94039. Nov. 1992. Fontographer product brochure. from Altsys Corporation. [21] Appl. N0.: 527,518 269 Renner Road. Richardson. TX 75080. Product review of Fontographcr. MacUser magazine. Oct. [22] Filed: Sep. 12, 1995 1992. p. 56. Related US. Application Data (List continued on next .) [63] Continuation-impart of Ser. No. 250,372, May 27, 1994. Primary Examiner—A1mis R. Jankus Pat. No. 5.583.978. Attorney, Agent, or Firm—Edward W Porter [51] Int. (:1.6 ...... G06T 11/00 [57] ABSTRACT [52] US. Cl. 395/171 A computer system includes a requesting computer which [58] Field of Search ...... 395/167-172. 395/141-1431 382/177-180. 190-194 asks a responding computer. such as an Internet server. for one or more portions of text. The responding computer reacts by sending the requested text. The requesting com [56] References Cited puter can either render the requested text without the text's U.S. PATENT DOCUMENTS shapes. or it can ask the responding computer to send descriptions of such shapes. and then render the text using 4,785,391 11/1988 Apley et a1...... 395/169 them. Preferably the font descriptions sent are grouped into 5,099,435 3/1992 Collins et a1. 395/169 sets. or portable font resources (“PFR”): each text sent 5,167,016 11/1992 Bagley et a1 395/793 identi?es the one or more PFRs needed to de?ne its font 5,309,554 5/1994 Ito ...... 395/170 5,355.449 10/1994 Lung et a1 395/167 shapes: and the requesting computer asks for PFRs identi?ed 5,473,709 12/1995 Aoki ...... 382/258 in texts it receives. The fonts and characters within fonts 5,473,743 12/1995 Watanabe ...... 395/171 represented by each PFR vary as a function of its associated text. For each character to be rendered. the requesting FOREIGN PATENT DOCUMENTS computer ?nds which PFR associated with the character’s text describes its shape. and uses that font description to 0-480-399-1512 4ll9% European Pat. O?‘. . 0-534-622-A2 3/1993 European Pat. 01f. . render that shape. The responding computer can install such 0-583-548-Al 2/1994 European Pat. Off. . new font descriptions into its operating system. so character shapes can be rapidly rendered by standard operating system OTHER PUBLICATIONS calls. The responding computer can translate a text’s pre de?ned font description into new font descriptions which Electronic Documents: A White Paper. © 1993. by No depend only on character-font shapes. The responding com~ Hands Software. 1301 Shoreway Road. Suite 220 Belmont. puter can receive a changed body of text and a correspond CA 94002. ing old set of PFRs. and derive a new set of one or more The Dawn of Easy Electronic Documents ?. © 1993 by Info PFRs as a function of which character-font shapes occur in World Publishing Company. vol. 9. Issue 14. pp. 4-8. the changed text. Fonts and Output Issues. The Seybold Report of Desktop Publishing. Apr. 8. 1991. pp. 27-30. 51 Claims, 31 Drawing Sheets

y 615 " (511' - 604 6172M Chant [ 504A w a . 2

V V IVIIGI'tEl F1911 DEB I mi CPU4% "it-71m _ \[mq ,- ay F 5011 DistRootDuectnvy V

as 1 N “ 05 554 “- FIIECODY ere “TFLIBMOVE ere

555A 356A

670

layer mm ‘ Fecnmertnmt Dwectory pl! tann‘urt ulr .at'nionts Mm! non! t ' ‘ nonlatmtarts html a "Ron's 5,781,714 Page 2

OTHER PUBLICATIONS Microsoft Windows Printers and Fan! Kit. © 1987-1992 by Product review of FontStudio. MacUser magazine. May Microsoft Corporation. from cover. title page. copyright 1992. starting at p. 56. page. table of contents. and pp. 86 and 87. Product review of FontStudio. MacUser magazine. Sep. PostScript Language. by Adobe Systemes. Incorp. Seventh 1990. pp. 76 and 80. Adobe Type I Font Format. published by Adobe Systems Printing. Aug. 1987. Incorporated. 1990. TrueType Font Embedding DLL Speci?cation. Mar. 29. A?idavit of John Collins concerning Fontographer and 1995. Version 0.912. published by Microsoft Corporation. FontStudio programs. dated May 24. 1995. A?idavit of John Collins Concerning Prior Art Programs For Teach Yourself Web Publishing With HTML In A Week. 1995. De-Compressing And Installing Fonts. dated Dec. 6. 1995. by Sams Publishing. Indianapolis. Indiana. pp. 3-21. Ditital Formats for . by Peter KaroW. Published by 137-152. 369~377. and 387-389. URW Verlag. Hamburg. Germany. 1987. Title page. Copy right Notice Page. Table of Contents. and pp. 116-117 and LaserJet Unlimited, Edition II. by Nace and Gardner. pub pp. 376 and 377. lished by Peachpit Press 1988. pp. 263-268 and 445. Character Generation Under Grid Constraints. by Roger “Adobe Acrobat In U se“ by Brailsford from Desktop Pub Hersch. Computer Graphics. v01. 21. No. 4. Jul. 1987. pp. lishing Commentary. Aug. 1993. UK. vol. 9. No. 4. ISSN 243-252. 0957—3178. pp. 9-13. Microsoft Windows Device Driver Adaptation Guide. © 1987-1992 by Microsoft Corporation. front cover. title page. “Elseware technology promise more e?icient font portabil copyright page. and pp. 122 and 123. ity” by Mark Moore. PC Week. vol. 10. No. 17. May 3 1993. US. Patent Jul. 14, 1998 Sheet 1 0131 5,781,714

// 242 r106 r102 1ST COMPUTER SYSfng K122 CHAPTER1 p T FONT PREDEFINED <_ INTER- 0 FONT Overview PRETERS RESOURCES INTRODUCTION \\116 '?/JH r124 _ _ , DOCUMENT CI-IARCTER ?ftm'l'igmdgifm? BUILDER HSHAPE ponabbdowmens. RECORDER 1 Km INFORMATION COMMUNICATING DEVICE

‘ K104 PORTABLE

DOCUMENT/418I _ _ _ (140_ _ _ TEXT PAGE BUILDER AND : CHARACTER SHAPE -PORT. FONTI 126/ RESOURCE LPLfYEREOEE _ _' (‘108 2ND COMPUTER SYS. 110 INFORMATION COMMUNICATING DEVICE r

CHAPTER 1 134 / \ \‘ K1 3 6 . PAGE CHARACTER Overvlew ¢ BUILDER HSHAPE

22mmINTRODUCTION 1.42m. \ r112 portable documerts PR|NTER

FIG. 1 US. Patent Jul. 14, 1998 Sheet 2 0f 31 5,781,714

fIOZA 130 f108A 1ST COMPUTER SYS/ 128A 2ND COMPUTER SYS. EMOVABLE MASS RECORDED EMOVABLE MASS STORAGE DEVICE PORT. STORAGE DEVICE DOC. I \128A (‘108A 2ND COMPUTER SYS. RECORDED REMOVABLE MASS PORT. STORAGE DEVICE DOC. I \128A FIG. 2

/102B (1088 1ST COMPUTER SYS./--—128B 2ND COMPUTER SYS. IIETTEvgg/IgE NETWORK

\ r132 //(INTERFACEI \IZBB NETWORKED r1025 TRANSMISSION {.1088 OF PORT. DOC. 1ST COMPUTER SYS. 2ND COMPUTER SYS. \\ NETWORK INTERFACE I \‘IZBB FIG. 3

US. Patent Jul. 14, 1998 Sheet 4 of 31 5,781,714

[136 CspOpen()/__1_71______> CHARACTER —-—>ReadResourceData() 17o SHAPE 190'“ CsplnitBiimapCache?ip PLAYER mfjAllocCspBuffero

CspGetFontCountQ/lL —>L'192/516 h arFn() CspListChars()"—174_> (four bitmap output funcs) %_/__>/Openi3itmap()——>SetBiimap() CspSetOutputSpecsOCL7>5 TbSetBitn'iapBitSO CspSetFont()/i——>6 W/CIOSEBIUHGPO CspDoChar()/i—> (six outline output funcs) mvstemo WHstemQ mf/MoveToo WLIHGTOO —>2L>20VCIosePathQ1-,) CurveTo()

FIG. 5 US. Patent Jul. 14, 1998 Sheet 5 0f 31 5,781,714

116\ ,221 [223 [221 ,‘217 219,217/22l,217 input _TEXT I __I I , . I I F‘ ap er 0verview lntroductionBitstream® Merlin'" \ is a small, fast... 1 V r1 1 4 1 2 g r 12 2 ‘cocunaur BUILDER ,-2o4 \ Four RESOURCES \ -MA|N PROGRAM 210 \ Helvetica Base Font Descriptions -caltCsrOpen()J 214 - ' I -until end of input lext—/ 216 Arial ase Fonptions ~if receive font_ name —/ 2 2 4 ; ______2 . r _ . -save basic font name as pFontld J Times New oman . . Descips. -cal. FontAttributes from name #226 Aug Q _a m; 123 _ pFontld-ca|l CsrSetFontSpecst) and FontA tribu es with __/22 s ,- 1 2 4 J _ place pFontCode 'in output text-1230 (CHARACTER SHAPE RECORDER \ -if receive a character J2 1 8 2 3 6 -call CsrDoChar() for char J 2 3 8 | ' 150 place char's charCode in output- text -if receive ositionin information, lace it _ " " k 1 51 in output tgxt (in doc? coords) __/p2 2 0 .|r physz and '09’ fonts spec‘ b3 wommd ‘if receive nonfihaf Shape def. act as if FpntAttributes are not de lned. e the them received fol" name ‘shape’ followed by with calls to GetFontlnfoI), GetFontldt), and character with a unique name associated ExecCharQ, make phy$_ +|og_ foms with the shape M J 2 2 2 3131 1 Font ode to act. to. font - -ca|| CsrWriteResource()\ ar y-call CsrClose()_/ 246 244 J -if char called with is not defined in curr?t‘ 4’ font, call ExecChartl, and build new font IcALL BACK FUNCTIONS a 1 6 0 description of char's shape as defined by , Exechar()'s calls to:

- . . kit ' -83 emp le -et a temoraril stored block for Csr - e onno . -et info on font from font inter. for Csr ar I -tel| Csr what charlD to use when calling - fr h n frhin in -add spec. Cub. Bezier curve call PS or font interp. for char or shape. and for each move or line seq. the interp. _ CCsrWriteResource(} E O I I I -cause PF R lg be witten to ort. doc. usi -. ' fl ' ' ‘I ‘.a .

219A ,104 EORTABLEDOCUMENTfZWA\Chapter mum 1 rum/221K ] / Overview lntroductionBitslream® Merlin“ is a small... [LLPORTABLE FONT RESOURCE [PFRl /' 1 217A 126/118/ FIG. 6 US. Patent Jul. 14, 1998 Sheet 6 0f 31 5,781,714

-Search physical font list for a physical font record with the specified 300 fontlD / -If the specified string fontlD is not found 306 /— -create a new physical font record with that fontlD and add it to 308 physical font list -cal| GetFontlnfo() to get information from the font interpreter about 310 the physical font -call GetCharlD(), and then ExecChar(), for each of the characters 312 used for hinting, and derive hinting values for the physical font from them K- -Make the matching or newly created physical font the current physical 314 font K'- -Search the logical font list associated with current physical font for a 315 logical font with attribute values matching those of FontAttributes -If a complete attribute match is not found, create a new logical font 320 record with a new logical font code having those attributes, and add it to the current physical font's logical font list -Make the matching or newly created logical font record the currently 322 active logical font K- -return its logical font number as the fontCode 324 FIG. 7 US. Patent Jul. 14, 1998 Sheet 7 of 31 5,781,714

pRootPhysicalFont 302 302 PHY . F NT REC‘ r302

CHAR REC. NextU NextDown Strin ze

40 342 330 492 330 HAR REC. CHAR REC. CHAR REC. CHAR REC. - NextU - NextU NextU NextU extDown - NextDown NextDown - NextDown Stri trin e trin

FIG. 8 US. Patent Jul. 14, 1998 Sheet 8 0f 31 5,781,714

,- -Search the current physical font's character tree for a character record with matching specified 32 8 charCode 3 3 4 / -lt the charCode is found, exit CsrDoChar 3 3 6 ,- -ll the charCode is not tound _ D ' 3 3 3 f.- -create a new character record with the charCode and place it in the character tree 3 4 0 /- -initialize character shape processing 3 4 2 /_ -call ExecChar for that character 3 4 4 ,-~ -until ExecChar returns _ 3 4 6 /_ -when the luntion called by ExecChar is CsrMoveTo f.- -it there is a contour open 34 B3 5 2 /_- complete and close the contour 3 5 4 K- -insert the contour into the contour tree. /_ -open a contour, with the start position indicated by the CsrMoveTo 32.. -when the function called by ExecChar is CsrLineTo, CsrCubicTo, or CsrQuadraticTo 3 5 83 6 0 f.- -it no contour is open, exit reporting an error f,- -store points associated with each successive outline segment described by CsrLineTo, 3 6 2 CsrQuadraticTo, or CsrCubicTo in Character Shape Array ,._ -tor each curve received, if it has any inflection or XY extreme (to, horizontial or vertical 364 tangent) points, mark them as such, and it any of those marked points do not occur at an end of the received curve, divide the received curve into sub-curves at the marked , and replaced the received curve with the two sub-curves in the character shape array 3 3 6,- -tor each on‘outline point received for which two adjacent outline segments have been received, detect it it is a corner or tangent, and it so mark it as such, and update the contourBBox it it is an X or Y max or min, and the actual contour direction if it is an X maximum /_ -for the outline segement between each pair of successive marked points in the 3 6 8 character shape array 4 2 0,,- ~approximate it with a line or cubic bezier curve 4 2 2 /..- ~if it is approximated with a curve, calculate curve depth 4 2 4 /_ -put points representing the approxmated segment into the open contour K- -it any of the newly approximated segment's corresponding points in the character 42 6 shape array are not part of a line segment adjacent to an as-yet unapproximated segment, delete them from the character shape array 4 3 0 /- -save location in open contour as escapement value for character 4 3 2f -tlatten the contour tree to two levels to separate elements 46 4/... -for each glyph element... I ' 4 6 6 /- standardize contour direction 4 6 3 f- -standardize contour start point ,-— -build edge and stroke lists 4 7 o ,_ generate glyph signature ‘1% ,- -search glyph record tree for a glype record with a matching signature 4 7 6,- -for each match found 4 8 3 ,_- compare it glyph program strings (GPSlwith that of current char 4 9 0 f‘- -it they match, mark the match tor the current char 4 7 8 r- -it no GPS match is found for the new glyph record, insert it into the glyph record tree, unless its GPS exactly matches that of a record already in the tree 4 8 0 /- write the char's gps in order indicated by the character's contour tree, a using DOCH if it has more than one glyph or it any of its match a previously recorded GPS 4 9 6 K- -update font bounding box FIG. 9 US. Patent Jul. 14, 1998 Sheet 9 0f 31 5,781,714

453 \ _ HARACTER SHAPE ARRAY #339 _>POINT POINT -X Y PROPS -X Y PROPS \341/ [349A OPEN CONTOUR STRUCT r339A {-452 ps'b'mgs~ - -POINT YYPRoPs-gYPRoPs POINT p Dau g hters pContourRooIx \_ 341A / ‘ r356 CONTOUR TREE r355 CONTOUR STRUCT [452 )495 ps'b'mgs' ' -xPOINT Y PROPS -xPOINT Y PROPS p D aug h! ers . -' CONTOUR STRUCT /452 349C psibnngs POINT POINT pDaughters --/ - Y.PROPS -X Y PROPS T CONTOUR STPRoU?; o D f452 (/5490 _ ps'b'mgs- - -x Y PROPS -xP YINT PROPS p au g hters ~

CONTOUR STRUCT ' ,452 3495 - - POINT POINT Da hters ps'b'mgs/482 -x Y PROPS -x Y PROPS p “gr432 355

LYPH REC. 436\GLYPH REC. -pNexIEqua| 482\—-pNextEqual -pNextDown jg;\--p:ext8own -pNextUp ~~p ext p . ‘ -gIyphProgStringSIze - 454t~-g|yphProgStr|ngS|ze -gIyphProgStnng0ffse — 455\~-gIyphProgStr|ngOffse -s|gnature ‘--slgnature

GPS MEM. ,484 [484 GPSI GPS \ 6/PS T l-NIove instruct l'II'Aove. instruct lMovq instruct -seg. Instruct -seg. Instruct -seg.l|nstruct -seg instruct -seg instruct -seg Instruct l'End lEnd l'I'End FIG. 10 US. Patent Jul. 14, 1993 Sheet 10 of 31 5,781,714

406 406 418408 r r408 r r408 417x \

402 412“ / “Zr 41 s _> 402 \ J J \ [404 404 416r J41 1 K410 km) 410/ 415 J FIG. 11

406A ,4oaA (406A r40“ 418A\ 408A

FIG. 12

-find the left-most and right-most vectors (1L and 1R. respectively) 370 from the point preceding the point being tested and a 2 ORU square centered around the point being tested -find the left-most and right-most vectors (2L and 2R, respectively) 372 from the point being tested to a 2 ORU square centered around the following point -if both 2L and 2R are left of 1L and 1R, label the tested point as a 373 definite left corner r-else if both 2L and 2R are right of 1L and 1R, label the tested point 374 as a definite right corner -else if 2L is to the right of 1R and 2R is to the left of 1L, label the 375 tested point as a corner of indeterminate direction r -else label the tested point as not being a corner 376 FIG. 13 US. Patent Jul. 14, 1998 Sheet 11 of 31 5,781,714

382 384 1 2L \ 380 K 386 1 1R 381 2R FIG. 14B

\ \ \\ \\\ \ 2L \\\ \ \ 2R 1

1R FIG. 14D

\ \ 2 \ 1

382 1|_ [381A 2 1R 2R F|G_ 15A L< 1 FIG. 15C 1R 380A

1

/ ’ 2R / ’\ ' 4008 2L FIG. 16A FIG. 16B ' “ FIG. 16C US. Patent Jul. 14, 1998 Sheet 12 of 31 5,781,714

-if the distance from a vector between the entire curve‘s endpoints to 430 the furthest of its control points is less than 1/2 ORU, return with a MaxDepth of 0 -call the RecursiveSubdivision subroutine for the entire curve with a 432 depth of 1 -if one end of deepestSubCurve is one end of entire curve, call the 434 RecursiveSubdivisioin subroutine for the half of the entire curve which contains the opposite end of that curve with a depth of 2 436/- -return with MaxDepth HG“ 17

-RecursiveSubdivision (ptstEnd, p1stControlPoint, pZndControlPoint, p2ndEnd, pdepth) 440K -if depth > maxDepth, set maxDepth = depth -divide the curve bounded by istEnd and 2ndEnd into two sub-curves 442/ at a midPoint 444/ -measure the greatest deviation between the control points of each sub-curve and a vector between the endpoints of that sub-curve /- -if the greatest deviation for both sub-curves is less than 1/2 ORU, store tstEnd and 2ndEnd in deepestSubCurve and return -otherwise call the RecursiveSubdivision subroutine for the subcurve with the greatest deviation FIG. 18 126/- -PFR Structure -|ogica| font directory 500K -first logical font record 502/ -FontAttributeValues -physicalFontOffset -physica|FontSize

502 r -physica| font record 504/- -font resolution and size - information /- -character record 510 -glyphProgramStringOffset 510 -g|yphProgramStringSize

222s506i- -simp|e glyph program string 508soatfompond glyph program string FIG. 20 US. Patent Jul. 14, 1998 Sheet 13 0f 31 5,781,714

1r4840 /484\ r4848 K484 K434A GPS GPS GPS GPSGPS GPS GPS GPS GPS GPS US. Patent Jul. 14, 1998 Sheet 14 0f 31 5,781,714

[104 219A /118 (PORTABLE DOCUMENT/217A r219A rzzm “ Ctla'téi'l i1 erontco‘deb in IS a smaOve|r|v|ewlntroductionB|tstream® k[PORTABLE FONT RESOURCE (PFR) *1) (PAGE BUILDER [25o ‘ a

(MAIN -caPl?OcGRélM s an 0 \ 2 5 2 i-determilnep age builder's outputMatrix 254 and ‘output Box from location, scale, and rotation of image being created relative to 2 5 5 documentdescrtbed ll'l portable document \ -if using bltma ped output 260--caliCspSetOut258~-call Csp nitBitmapCachegt utS ecs tor bitmaps 262,-eise call Cs SetOu put pecs toroutlines ,-until end ot_ ext bein rendere r -|t receive Font ode I _ , -call CspGetFontSpecs() to find its 274 font name -CsplnitBilmap ache( f -it system can render fonts 01 that initialize bltma cache 2 7 6 name, set On Font flag 5P ‘e on P905 false Ca“ ctear "9mm and can \ we host into about spec. tontCode, 2 75? CspSetFont_() for out <——> 7 ildinq font name from PFR 26 8f éilfjrregggie into. calc' new 17 5 - sp etutputSpecSQ “ f 41 receive a charcode \ set bttmapor outline output and 2 7 0 f4 OngFont ?ag IS set, call tont 1 7 6 --- LtMaland OutBBx 2 3 0 interp. for chars image, output it \ ' and update doc an device XYs - - . . f -it not, call CspDoChart) for char ~ spDo hart) 2 8 2 and Clg- giemce XY and Wall for 1 7 8 -gen. bitmap or outline image of char 2 81%“ cspcgilotgenet ‘t 890 to output char \ at our. device XY by calls to bitmap or \ J outline callback tuncs and updates XY CALLBACK FUNCTIONS ‘ 190 179 u char‘sesca emenl -ReadResourceData a’ \ - sp oset l‘ .- 1.. m’ : v 192 -c|osesCSP , -AllocCsp utter‘) .1 ¥ 1 allocate bu er torCSP's use a ’-SetB|tma_p() ‘ _ -receive bitmap image of char from CSP, outputs it to device at cur. CHAPTE R 1 device XY, and update cur. doc. and > device XYQ 1k Blm'ea Overview -Vstem().~ Hstem() I ‘ geqcgwe vert. and horz. putting info from J INTRODUCTlOQ a l-Movetot),LineT0().CurveTo(). ClosePalhé}> ‘ _ m. -receive move or outline seg. lrom C , “1 5533mm; 53$? it seg. output it at out. device XY, and 2 02 portable documerts. update cur. doc. and device XYs 110/ FIG. 21

US. Patent Jul. 14, 1998 Sheet 16 0f 31 5,781,714

FIG. 23 http server main()~621

-|oop until receive message to exit~523 —if receive http message containing a URL from a client, send ?le indicated in URL to client's network address contained in http message~625 U.S. Patent Jul. 14, 1998 Sheet 17 0f 31 5,781,714

TrueDoc's Benefits TrueDoc's Benefits

The Central Benefit: Truely Portable Electronic Documents

TrueDoc enables fonted electronic documents to be truely portable. It lets the characters of such a document have the exact same shape, relative size, and spacing on virtually any computer, regardless of differences in operating systems, font languages, installed fonts, or the applications being run. TrueDoc lets fonted text be distributed by diskette, CD ROM, LAN, WAN, Web or net and be seen exactly as intended by all their recipients, regardless of how numerous or how unusual the document's original fonts. All that is required for this magic to take place is that the document be recorded by software having access to a TrueDoc \ r corder and that the viewing computer have a 630A 632 corresponding TrueDoc Independent From Installed Fonts Application lndependence Support For Any Font Language Supporl For Any Character Set Ability To Handle Non-Latin Character Sets Ability To Handle Non Character Shapes virtually Exact Font Fidelity 630 High Font Compression High Performance Copies Shapes Without Copyright lnfringement Ease Of lmplimentation $ave ¥ou Money PRIOR ART HTML FIG. 24