text: the following discussion deals mainly with horizontal typesetting , but it should be noted that the inventive line leading technique can be applied to both horizontal typesetting and to vertical typesetting . [ 0029 ] fig1 shows an electronic typesetting dtp system 1 in accordance with one implementation of the invention . the dtp system 1 has a dtp processing control device 2 , for performing electronic typesetting and layout editing and so forth , a display device 3 for displaying the data being processed , an input device 5 for inputting various types of data such as but not limited to graphics , text , control instructions , and an output device 6 for outputting processed data . the dtp processing control device 2 includes typesetting control device 2 a , which controls typesetting , layout control device 2 b , which controls layout editing , and font file 2 c , which stores font information about attributes of the text to be output on a display or printed . in particular , font file 2 c includes roman fonts and cjk fonts 8 , which are fonts for ideographic characters such as but not limited to japanese , chinese , and korean . in addition , the typesetting control device 2 a includes line leading device 7 , which calculates the line leading of adjacent lines . the display device 3 can be various types of display devices such as but not limited to a crt or a lcd . the input device 5 can be a keyboard , a pointing device ( e . g ., a mouse , a track ball , and a track point ), a scanner , or a communication interface . in addition , the output device 6 can be a printer and an external memory device . the dtp processing control device 2 can include a processor such as a cpu , a memory , or an electronic typesetting processing program that includes a line leading routine that is loaded into the memory and processed by a processor . alternatively , the dtp processing control device 2 can also be implemented in part or in whole as hardware or firmware . [ 0031 ] fig2 shows a dtp system 10 that includes a line leading function in accordance with one aspect of the present invention , implemented in a general - purpose computer system . the system 10 shown in fig2 has a cpu 11 , a memory 12 , a crt 13 , a hard disk 14 , a keyboard 15 , a mouse 16 , a cd - rom drive 17 , a fd drive 18 and a printer 19 . these units are coupled and work together through a bus 9 . the system 10 includes a line leading program 7 ′ as well as other electronic typesetting programs . line leading program can be included in other electronic typesetting programs . the electronic typesetting programs , including the line leading program , are installed in system 10 by using cd - rom drive 17 or fd drive 18 , and are stored in memory such as hard disk 14 , which can also store font file 2 c . when the line leading program 7 ′ or an electronic typesetting program containing the line leading program 7 ′ is executed by a user operating keyboard 15 or mouse 16 , the line leading program is loaded into memory 12 and executed by the cpu 11 . in one implementation , a computer - readable recording medium ( e . g ., cd - rom , fd , tape , or semiconductor memory ) storing a line leading program is provided so that a general - purpose computer system can be converted into a dtp system providing a line leading function in accordance with the present invention . [ 0032 ] fig3 shows a line leading method 100 in accordance with the invention . as shown , a dtp system performing method 100 receives a document ( step 302 ). the document can be any dtp document and includes multiple lines of glyphs . the line procession is from top to bottom . alternatively , the line procession can be any combination of top to bottom , bottom to top , right to left , and left to right . each line of glyphs in the document includes at least one glyph , which can represent any combination of a character , a symbol , and a blank space . each glyph is framed in an embox which includes a preceding edge on the side of the preceding line of glyphs , which in this case is the top edge , and a following edge on the side of the following line of glyphs , which in this case is the bottom edge . as discussed , the dimension of the embox usually varies from font to font . the size of the embox is determined by the type size of the character represented by the glyph framed by the embox . the lines of glyphs in the document can follow either the roman or the cjk line definitions . the system receives an input selecting a line of glyphs in the document ( step 304 ). the selected line is referred to as the current line of glyphs . inputs to the system includes but are not limited to user inputs . the system receives an input specifying a line leading metric ( step 306 ). the line leading metric specifies a position , along the direction of a line procession , relative to an embox . this relative position can be thought of as a line parallel to the preceding and following edges of an embox . fig3 a shows an example of the described implementation of the line leading metric . in this example , the line procession is from top to bottom . in this implementation , the input specifies a line leading metric 301 that indicates a vertical position that is in the middle of the top and bottom edges 303 and 305 of embox 307 . alternatively , the line leading metric is any point , such as points 309 and 311 , that can indicate vertical position relative to the embox 307 . as shown in fig3 the system determines line leading values for the current and the immediately preceding lines of glyphs ( step 308 ). for example , the line leading value of a line of glyphs can be set as the line leading value of the largest embox in the line of glyphs . alternatively , the system can receive the line leading values from a user or a computer program that either stores default line leading values or calculates line leading values . the system calculates the line height of the immediately preceding line of glyphs ( step 310 ) by calculating the vertical distance between the preceding line and the following line of the immediately preceding line of glyphs . alternatively , in systems having the cjk line definition , the system calculates line height by calculating the height of the largest embox in the line . the system determines a line leading measure point of the immediately preceding line of glyphs ( step 312 ). the line leading measure point of a current line of glyphs is a vertical position relative to the current line of glyph , from which a line leading ray ( such as the line leading ray 902 of fig9 ) can originate . this same vertical position also is the vertical position at which a line leading ray originating from an immediately preceding line of glyphs ends . that is , a line leading ray representing the distance between current and immediately preceding lines , originates at the line leading measure point of the immediately preceding line of glyphs and ends at the line leading measure point of the current line of glyphs . to determine the line leading measure point , the system uses the line leading metric and the line height calculated . the system calculates the line leading measure point by locating the largest embox in the current line of glyphs and then determining the vertical position of this largest embox relative to the current line of glyphs . the embox position depends on the dtp convention being used . for roman dtp line definitions , the top line of a current line of glyphs coincides with the base line of the emboxes in the immediately preceding line of glyphs and the bottom line of the current line of glyphs coincides with the baseline of the emboxes in the current line of glyphs . for cjk dtp line definitions , the top line of a line of glyphs coincides with the top edge of the largest embox in the current line of glyphs and the bottom line of the current line of glyphs coincides with the bottom edge of the largest embox . once the largest embox is positioned correctly in the vertical direction , the system uses the line leading metric ( which specifies a vertically position relative to this largest embox ) to determine the position of the line leading measure point . the system determines a line leading measure point of the current line of glyphs ( step 314 ). to determine a line leading measure point of the current line , the system selects one of the line leading values received in step 308 . for backward line leading models , the system selects the line leading value of the current line of glyphs . for forward line leading models , the system selects the line leading value of the immediately preceding line of glyphs . the system starts at the vertical position indicated by the line leading measure point of the immediately preceding line of glyphs and moves downward a distance corresponding to the selected largest line leading value to a new vertical position , which is the vertical position of the line leading measure point of the current line of glyphs . the system calculates the line height of the current line of glyphs ( step 316 ). the calculations involved in this step are similar to those in step 310 where the system calculates the line height for the immediately preceding line of glyphs . the system calculates the position of the current line of glyphs ( step 318 ). the system can perform this calculation because the system knows the vertical position of the line leading measure point of the current line of glyphs relative to the largest embox in the current line of glyphs . the line leading metric specifies this relationship . furthermore , the system knows the vertical position of the current line relative to this largest embox . fig4 a - c illustrate one implementation of calculations performed in method 100 . a dtp system receives a document and input specifying a current line of glyphs , from which the system selects an immediately preceding line of glyphs 400 . as shown in fig4 a , this line of glyphs follows the cjk line definition and includes a top line 402 and a bottom line 404 as defined by the largest embox 406 contained in the line of glyphs 400 . the system also receives input specifying a line leading metric that is 75 percent from the top edge 408 of the embox 406 . from these input , the system calculates the vertical position of the line leading measure point for the immediately preceding line of glyphs 400 . specifically , the system calculates the vertical offset 410 between the top edge 408 and the line leading metric . the system then uses this offset 410 to locate the vertical position of the lead - line measuring point by starting at the top line 402 and moving downward a distance corresponding to the calculated offset 410 . the vertical position of the line leading measure point for the immediately preceding line of glyphs 400 is shown as point 412 . figuratively , the system determines the lead - line measuring point by superimposing the largest embox 406 and its line leading metric over the immediately preceding line of glyphs 400 . as shown in fig4 b , the system then moves from point 412 downward a distance 414 corresponding to the line leading value of the immediately preceding line of glyphs ( assuming but not limited to a forward line leading model ). the resulting position , shown as point 416 , is the line leading measure point of the current line of glyphs . as shown in fig4 c , the system calculates the offset 418 between a top edge 420 of the largest embox 422 in the current line of glyphs . the system moves from point 416 a distance corresponding to the offset 418 . this vertical position represents the vertical position of the top line of the current line of glyphs . this vertical position also represents the vertical position of the top edge 421 of the largest embox 422 . figuratively , the system is superimposing the largest embox 422 so that its line leading metric is at the same vertical position as the line leading measure point ( represented by point 416 ) of the current line of glyphs . the top edge 421 of the largest embox 422 represents the vertical position of the top line of the current line of glyphs . as shown in fig4 d , the system sets the top line 424 of the current line of glyphs at the vertical position calculated from the previous steps . to calculate the bottom line 426 , the system starts at the vertical position of the top line 424 and moves down a distance 428 corresponding to the line height of the current line of glyphs to a vertical position that represents the bottom line of the current line of glyphs . the system has determined the position of the current line of glyphs 430 . the invention can be implemented in digital electronic circuitry , or in computer hardware , firmware , software , or in combinations of them . apparatus of the invention can be implemented in a computer program product tangibly embodied in a machine - readable storage device for execution by a programmable processor ; and method steps of the invention can be performed by a programmable processor executing a program of instructions to perform functions of the invention by operating on input data and generating output . the invention can be implemented advantageously in one or more computer programs that are executable on a programmable system including at least one programmable processor coupled to receive data and instructions from , and to transmit data and instructions to , a data storage system , at least one input device , and at least one output device . each computer program can be implemented in a high - level procedural or object - oriented programming language , or in assembly or machine language if desired ; and in any case , the language can be a compiled or interpreted language . suitable processors include , by way of example , both general and special purpose microprocessors . generally , a processor will receive instructions and data from a read - only memory and / or a random access memory . the essential elements of a computer are a processor for executing instructions and a memory . generally , a computer will include one or more mass storage devices for storing data files ; such devices include magnetic disks , such as internal hard disks and removable disks ; magneto - optical disks ; and optical disks . storage devices suitable for tangibly embodying computer program instructions and data include all forms of non - volatile memory , including by way of example semiconductor memory devices , such as eprom , eeprom , and flash memory devices ; magnetic disks such as internal hard disks and removable disks ; magneto - optical disks ; and cd - rom disks . any of the foregoing can be supplemented by , or incorporated in , asics ( application - specific integrated circuits ). to provide for interaction with a user , the invention can be implemented on a computer system having a display device such as a monitor or lcd screen for displaying information to the user and a keyboard and a pointing device such as a mouse or a trackball by which the user can provide input to the computer system . the computer system can be programmed to provide a graphical user interface through which computer programs interact with users . the invention has been described in terms of particular embodiments . other embodiments are within the scope of the following claims . for example , steps of the invention can be performed in a different order and still achieve desirable results . a dtp system in accordance with the invention is not limited to a forward line leading model but rather can support either a forward or backward line leading model . the line leading metric can specify any arbitrary point relative to an embox and is not limited to starting from an embox top and ending at an embox top . for example , the line leading metric can be changed so that the system measures line leading from current embox bottom to previous embox bottom , current embox top to previous embox top , or current embox center to previous embox center . the line leading metric can further specify an arbitrary point relative to an embox , including a relative point that is outside the embox . the described line leading technique applies to line setting in any direction , including but not limited to horizontal and vertical line settings . the described line leading technique applies in any line procession direction , including but not limited to line procession from top to bottom , from bottom to top , from left to right , and from right to left . the system can determine a line leading measure point of an immediately preceding line of glyphs in any manner , including calculating an offset between the top of an embox and a line leading metric , calculating an offset between the bottom of an embox and a line leading metric , calculating an offset between the middle of an embox and a line leading metric , and calculating an offset between any point relative to an embox and the line leading metric . once the system has determined the line leading measure point of the current line of glyphs , the system can calculate the position of a current line of glyphs in any manner , including calculating an offset between the top of an embox and a line leading metric , calculating an offset between the bottom of an embox and a line leading metric , calculating an offset between the middle of an embox and a line leading metric , and calculating an offset between any point relative to an embox and the line leading metric .