Abstract:
The present invention is intended to speed up rendering that is performed in the course of displaying a document that contains both icons and characters. A character display device that displays a document containing both icons and characters includes: a searching unit that searches the position in the document where an icon appears, a counter unit that counts the number of characters which successively appear until the position where the icon appears searched by the searching unit; and a rendering unit that renders the same number of characters, which successively appear, as the number of characters counted by the counter after designating the attributes shared by the characters, and then renders the icon after designating the attributes of the icon.

Description:
BACKGROUND OF THE INVENTION 
       [0001]    1. Field of the Invention 
         [0002]    The present invention relates to a character display method for handheld devices, or more particularly, to a character display device, a character display method, and a character display program that can display a document containing both icons and characters. 
         [0003]    2. Description of the Related Art 
         [0004]    As far as conventional handheld devices are concerned, when a document containing both icons and characters is displayed, the attributes of each letter are designated irrespective of whether the letter is a icon or a character. The icon or character whose attributes have been designated is then rendered. Thus, the document containing both icons and characters is displayed. Therefore, when an icon or a character contained in a document containing both icons and characters is rendered in the conventional handheld device, the attributes of each letter must be determined irrespective of whether the letter is an icon or a character. It therefore takes much time to render each letter. By the way, in this specification, the icon shall refer to a picture having the size of a character, and the character shall refer to a character or symbol capable of being entered at a computer. 
         [0005]    The attributes of a character or an icon include a color (red, blue, yellow, etc.), a font type (Mincho type, Gothic type, etc.), a font typeface (standard fact, italic face, boldface, etc.), a font size (8, 12, 16, etc.), and a background color (white, black, yellow, etc.). 
         [0006]    Patent Document 1 describes a method of searching mails, which are preserved in a portable cellular phone, for a mail containing a specific character string or icon. According to the first embodiment described in Patent Document 1, mails are searched to see if their subjects and/or texts contain a specific character string. According to the second embodiment described in Patent Document 1, mails are searched according to a color of an icon contained in the mails. Specific codes representing icons include a code representing the pattern of an icon and a code representing the color thereof. In Patent Document 1, the code representing the color of an icon is checked to discriminate the icon. 
         [0007]    Patent Document 1: Japanese Unexamined Patent Publication No. 2003-141044 (refer to Claims and Paragraphs in Specification [0001], [0005], [0030] to [0032]) 
         [0008]    However, according to the method of searching a mail preserved in a portable cellular phone described in Patent Document 1, a long processing time is required for displaying a document which contains both icons and characters, and it takes much time to display the document. 
       SUMMARY OF THE INVENTION 
       [0009]    The present invention addresses the above problems. An object of the present invention is to provide a character display device, a character display method, and a character display program that require a short processing time for displaying a document containing kinds of characters which are different from each other in terms of an attribute, for example, a document containing both icons and characters, and that enjoy a high rendering speed. 
         [0010]    A character display device in accordance with the first aspect of the present invention intended to accomplish the foregoing object displays a document that contains kinds of characters which are different from each other in terms of an attribute. 
         [0011]    The character display device includes: a counting unit for counting the number of characters, which share a first attribute and successively appear in a document, until a character having a second attribute different from the first attribute appears; and a rendering unit for rendering the same number of characters, which share the first attribute, as the number of characters counted by the counting unit after designating the attributes shared by the characters, and then rendering the character, which has the second attribute, after designating the attributes of the character. 
         [0012]    The character display device further comprises a searching unit for searching for the position in the document where a character having a second attribute different from a first attribute appears, wherein said searching unit searches by checking whether a character code representing the character having the second attribute agrees with any of character codes previously registered in association with respective icons in an icon registration table. 
         [0013]    In the character display device, characters having a first attribute are characters other than icons and characters having a second attribute are icons. 
         [0014]    A character display method in accordance with the first aspect of the present invention intended to accomplish the aforesaid object displays a document that contains kinds of characters which are different from each other in terms of an attribute. 
         [0015]    The character display method includes: a counting step of counting the number of characters, which share a first attribute and successively appear in the document, until a character having a second attribute different from the first attribute appears; and a rendering step of rendering the same number of characters, which share the first attribute, as the number of characters counted at the counting step after designating the attributes shared by the characters, and then rendering the character, which has the second attribute, after designating the attributes of the characters. 
         [0016]    The character display method further comprises: a searching step of searching for the position in the document where an icon appears, wherein said searching step searches by checking whether a character code representing the character having the second attribute agrees with any of character codes previously registered in association with respective icons in an icon registration table. 
         [0017]    A computer-readable recording medium in accordance with the first aspect of the present invention intended to accomplish the aforesaid object in which a program for displaying a document that contains kinds of characters which are different from each other in terms of an attribute is recorded. 
         [0018]    The character display program allows a computer to execute: a counting step of counting the number of characters, which share a first attribute and successively appear in the document, until a character having a second attribute different from the first attribute appears; and a rendering step of rendering the same number of characters, which share the first attribute, as the number of characters counted at the counting step after designating the attributes shared by the characters, and then rendering the character, which has the second attribute, after designating the attributes of the character. 
         [0019]    According to the character display method in which the first aspect of the present invention is implemented, characters sharing the first attribute and successively appearing in a document that contains kinds of characters different from each other in terms of an attribute are not rendered until a character having the second attribute different from the first attribute appears. When the character having the second attribute appears, the same number of characters, which share the first attribute, as the number of characters that successively appear and share the first attribute is rendered after the attributes shared by the characters are designated. Thereafter, the character having the second attribute is rendered. This speeds up rendering of a document. 
         [0020]    According to the character display method, the position in a document, which contains both icons and characters, where an icon appears is searched. The same number of characters as the number of characters that successively appear until the searched position where the icon appears is rendered after the attributes shared by the characters are designated. Thereafter, the icon is rendered. This speeds up rendering of a document. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0021]      FIG. 1  is a block diagram showing an icon display device in accordance with an embodiment of the present invention; 
           [0022]      FIG. 2  shows a concrete example of display of a document containing both characters and icons; 
           [0023]      FIG. 3  is a flowchart describing an icon display routine in accordance with the embodiment of the present invention; and 
           [0024]      FIG. 4  shows an icon registration table. 
       
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
       [0025]    Referring to the drawings, an embodiment of the present invention will be described below. 
         [0026]      FIG. 1  is a block diagram showing an icon display device in accordance with the embodiment of the present invention.  FIG. 1  shows an icon display device  1  in accordance with the embodiment of the present invention, that is, shows an outline configuration of a portable cellular phone. An operating unit  11  and a display (liquid-crystal display)  12  are connected to an icon processing unit  10 . 
         [0027]    The icon processing unit  10  includes a central processing unit (CPU)  100 , a ROM  101 , a RAM  102 , an input interface  103 , an output interface  104 , and a bus  105  over which these components are interconnected so that they can communicate with one another. 
         [0028]    The CPU  100  controls the entire portable cellular phone and runs an icon display program, which will be described later, stored in the ROM  101 . The CPU  100  computes and manipulates data written in the RAM  102  via the input interface  103  according to the icon display program stored in the ROM  101 . The CPU  100  then transfers the resultant display data, which represents a document containing both characters and icons, to the display  12  via the output interface  104 . An icon code registration table that will be described later is stored in the ROM  101  and is used to decide whether individual letters contained in a document are icons or characters. In the present embodiment, a static random-access memory (SRAM) is adopted as the RAM  102 , and a fusible read-only memory (FROM) is adopted as the ROM  101 . 
         [0029]    The operating unit  11  is a unit having push buttons and keys thereof to be manipulated, and is used to transfer operational information via the input interface  103 . 
         [0030]    The display  12  receives the display data, which results from computation and manipulation performed by the CPU and represents a document, via the output interface  104 , and displays the document on the screen thereof. 
         [0031]    Characters and icons to be displayed on the icon display device in accordance with the embodiment of the present invention which will be described below are different from each other in terms of attributes. 
         [0032]      FIG. 2  shows a concrete example of a document containing both characters and icons. Some portable cellular phones can display a document, which contains twenty characters per line and includes twenty lines (four hundred characters at most), on the screens thereof as long as an appropriate font size is designated. In the concrete example shown in  FIG. 2 , for convenience, a specific font size is designated so that a document containing ten characters per line and including three lines (thirty characters at most) can be displayed on the screen of the portable cellular phone  1 . 
         [0033]    Data items representing          , corresponding to “A B” in the alphabet, . . .          , corresponding to “mountain and river” in English, . . .          , corresponding to “with rain” in English, ” and                    , corresponding to “got wet” in English, succeeding          , corresponding to “with rain” in English, respectively that are included in a character string contained in a document containing both characters and icons, as shown in  FIG. 2 , are buffered in a predetermined area in the RAM  102 . The buffer area has a predetermined storage capacity that is large enough to hold both data representing a document portion displayed in the entire field on the screen and data representing a document portion that extends outside the field on the screen and is not displayed. Numerals  0  to  9 ,  10  to  19 , and  20  to  29  written above the character string are letter numbers i of letters contained in a document that contains both icons and characters. As shown in  FIG. 2 , in the example shown in  FIG. 2 , display data items representing respective characters are stored at positions identified with the letter numbers i that denote  0  to  2 ,  4 ,  5 ,  7  to  11 ,  14  to  20 , and  22  to  29 . Display data items representing respective icons are stored at positions identified with the letter numbers i that denote  3 ,  6 ,  12 ,  13 , and  21 . 
         [0034]      FIG. 3  is a flowchart describing an icon display routine in accordance with the embodiment of the present invention. The icon display routine in accordance with the embodiment of the present invention will be described below. Herein, the icon display routine is initiated in order to display on the screen a document newly created using the portable cellular phone  1 , a document that is not yet transmitted or has been transmitted as an e-mail, or a document that has been received as an e-mail. Otherwise, the icon display routine is initiated in order to scroll a displayed screen image, that is, vertically or laterally move a displayed text for the purpose of displaying a document portion that extends outside the field on the display screen and is not displayed. Incidentally, scrolling and displaying methods include: a method of handling a document so that the entire document including a portion which extends of the display field can be displayed, then transferring data, which represents a document portion to be displayed on the screen, in response to a scrolling manipulation, and then displaying the document portion on the screen; and a method of handling a document so that the document portion be displayed on the screen can be displayed, and then displaying the document portion in response to a scrolling manipulation. The present embodiment adopts the latter method. 
         [0035]    First, at step S 1 , values are initialized. Specifically, a count value i indicating a letter to be referenced is reset to  0 . The length max of a character string that has been rendered is reset to  0 . A count value drew, indicating the number of characters having been rendered, is reset to  0 . Herein, the count value i indicating a letter to be referenced is equivalent to the letter number i shown in  FIG. 2 . Moreover, a count value docs indicating a final reference letter in a document is designated. When a document is displayed over the entire display field on the screen of the display  12 , the count value docs indicating the final reference letter is set to the known maximum number of letters that can be displayed on the screen. When a document is displayed in part of the display field on the screen, the count value docs indicating the final reference letter is set to the number of letters contained in the document portion displayed on the screen. In the latter case, the number of letters contained in the document should be counted in advance. 
         [0036]    At step S 2 , a decision is made on whether i&lt;max is established. If i&lt;max is established, control is passed to step S 3 . If i≧max is established, control is passed to step S 11 . 
         [0037]    At step S 3 , a decision is made on whether letter data representing a letter of a letter number i (hereinafter, an i-th letter) is present. If the decision is made in the affirmative (Yes), control is passed to step S 4 . If the decision is made in the negative (No), the routine is terminated. For a blank display, letter data is present. Therefore, for the blank display, control is passed to step S 4 . Whether letter data is present at the i-th location is decided by checking whether a character code corresponding to the letter data is registered in advance and stored in the ROM  101 . 
         [0038]    At step S 4 , letter data representing the i-th letter is acquired. 
         [0039]    An icon registration table will be described below. 
         [0040]      FIG. 4  shows the icon registration table. Character codes, colors, and background colors that are associated with icons are registered in advance in the icon registration table shown in  FIG. 4 . The icon registration table is stored in the ROM  101 . Referring to  FIG. 4 , the registered numbers of icons, icons, character codes, colors, and background colors are listed in that order from the leftmost column. A character code is registered data unique to each icon. A color and a background color are the attributes of each icon and can be arbitrarily registered for each icon. Consequently, for example, in relation to the registered number  1 , an icon of a heart, a character code of  123   aaa , the color of the heart of red, and a background color of white are registered. In relation to the registered number  11 , an icon of a heart, a character code of  123   aab , the color of the heart of blue, and a background color of white are registered. In the present embodiment, as attributes shared by characters, a color is set to black and a background color is set to white. Consequently, the attributes shared characters and the attributes of each icon are different from each other. 
         [0041]    The flowchart of  FIG. 3  will be referred to again. 
         [0042]    At step S 5 , a decision is made on whether the i-th letter is an icon. The decision is made by checking whether the character code representing the i-th letter agrees with any of character codes registered in association with respective icons in the icon registration table shown in  FIG. 4 . If the decision is made in the affirmative (Yes), control is passed to step S 6 . If the decision is made in the negative (No), control is passed to step S 9 . With the processing, a document is searched to see if an icon appears. 
         [0043]    At step S 6 , after the attributes shared by (i-drew) characters ranging from the character identified with the drew value to the character of the i-th letter in a character string are designated, the characters are rendered. With the processing, characters that successively appear until an icon appears are rendered. 
         [0044]    At step S 7 , after the attributes of the icon of the i-th letter are designated, the icon of the i-th letter is rendered. With the processing, after characters that successively appear until an icon appears are rendered, the icon is rendered. 
         [0045]    At step S 8 , the drew value is set to the i value (drew=i). 
         [0046]    At step S 9 , the i value is incremented by 1 (i=i+1), and control is returned to step S 2 . With the processing, the number of characters that successively appear until an icon appears is counted. 
         [0047]    On the other hand, if i≧max is established at step S 2 , control is passed to step S 11 . At step S 11 , whether drew&lt;docs is established is decided. If drew&lt;docs is established, control is passed to step S 12 . If drew≧docs is established, control is passed to step S 13 . 
         [0048]    At step S 12 , (i-drew) characters ranging from the character identified with the drew value to the character of the i-th letter in the character string are rendered. 
         [0049]    At step S 13 , the max value is incremented by 1 (max=max+1), and control is returned to step S 2 . 
         [0050]    Referring to the flowchart of  FIG. 3 , a procedure of displaying the document shown in  FIG. 2  will be described below. 
         [0051]    First, at step S 1 , the i, max, and drew values are initialized to 0s. 
         [0052]    Since a decision is made in the negative (No) at step S 2 , control is passed to step S 11 . Since a decision is made in the negative (No) at step S 11 , control is passed to step S 13 . The max value is incremented by 1, that is, max=max+1 is worked out, and control is returned to step S 2 . 
         [0053]    Thereafter, as a decision is made in the affirmative (Yes) at step S 2 , control is passed to step S 3 . A decision is made in the affirmative (Yes) at step S 3 . The i=0-th letter, that is, the character of          , corresponding to “A” in the alphabet, is acquired at step S 4 , and control is passed to step S 5 . Since the i-th letter is not an icon, control is passed to step S 9 . The i value is incremented by 1, that is, i=i+1=1 is worked out, and control is passed to step S 2 . 
         [0054]    A decision is made in the negative (No) at step S 2 , and control is passed to step S 11 . Since a decision is made in the negative (No) at step S 11 , control is passed to step S 13 . The max value is incremented by 1, that is, max=max+1=2 is worked out, and control is returned to step S 2 . 
         [0055]    A decision is made in the affirmative (Yes) again at step S 2 , and control is passed to step S 3 . A decision is made in the affirmative (Yes) at step S 3 . The i=1-th letter, that is, the character of          , corresponding to “B” in the alphabet, is acquired, and control is passed to step S 5 . Since the i-th letter is not an icon, control is passed to step S 9 . The i value is incremented by 1, that is, i=i+1=2 is worked out, and control is returned to step S 2 . 
         [0056]    A decision is made in the negative (No) for the third time at step S 2 , and control is passed to step S 11 . A decision is made in the negative (No) at step S 11 , and control is passed to step S 13 . The max value is incremented by 1, that is, max=max+1=3 is worked out, and control is returned to step S 2 . 
         [0057]    A decision is made in the affirmative (Yes) for the third time at step S 2 , and control is passed to step S 3 . A decision is made in the affirmative (Yes) at step S 3 . The 2nd letter (i=2), that is, the character of          , corresponding to “C” in the alphabet, is acquired at step S 4 , and control is passed to step S 5 . Since the i-th letter (i=i) is not an icon, control is passed to step S 9 . The i value is incremented by 1, that is, i=i+1=3 is worked out, and control is returned to step S 2 . 
         [0058]    A decision is made in the negative (No) for the fourth time at step S 2 , and control is passed to step S 11 . Since a decision is made in the negative (No) at step S 11 , control is passed to step S 13 . The max value is incremented by 1, that is, max=max+1=4 is worked out, and control is returned to step S 2 . 
         [0059]    A decision is made in the affirmative (Yes) for the fourth time at step S 2 , and control is passed to step S 3 . Since a decision is made in the affirmative (Yes) at step S 3 , the i=3-th letter, that is, an icon of a heart (see i=3 in  FIG. 2 ) is acquired at step S 4 . Control is then passed to step S 5 . Since the i-th letter is an icon, control is passed to step S 6 . After the attributes shared by the three (=i-drew) characters          , corresponding to “A B C” in the alphabet, ranging from the character identified with the drew value of 0 to the character of the third letter (i=3) are designated, the characters          , corresponding to “A B C” in the alphabet, are rendered. After the attributes of the i=3-th letter of the icon of the heart (see i=3 in  FIG. 2 ) are designated at step S 7 , the icon of the heart is rendered. The drew value is set to 3 at step S 8 , and control is passed to step S 9 . The i value is incremented by 1, that is, i=i+1=4 is worked out. Control is then returned to step S 2 . 
         [0060]    A decision is made in the negative (No) for the fifth time at step S 2 , and control is passed to step S 11 . Since a decision is made in the negative (No) at step S 11 , control is passed to step S 13 . The max value is incremented by 1, that is, max=max+1=5 is worked out, and control is returned to step S 2 . 
         [0061]    Thereafter, steps S 2  to S 13  are repeatedly executed. After the character or icon of the 0-th letter in the document is rendered, when the last letter in the document appears, a decision is made in the affirmative (Yes) at step S 11 . As for the example shown in  FIG. 2 , when the i value comes to 21, an icon is rendered. When the i value comes to 29, the last letter in the document appears. At this time, the decision is made in the affirmative (Yes) at step S 11 . At step S 12 , after the attributes shared by eight characters ranging from the character identified with the drew value of 21 to the character of the twenty-ninth (i=29) letter, that is,                    , corresponding to “with rain as I forgot” in English, are designated, the eight characters are rendered. The routine is then terminated. 
         [0062]    The character display device in accordance with the present invention has been described by taking for instance a case where in a document containing both characters and icons, the attributes shared by characters are different from the characters of an icon. The present invention is not limited to this case but can be applied to rendering of a document containing characters that share the attributes different from the attributes shared by characters and icons, for example, characters having the first attribute, that is, characters to be rendered in black, and characters having the second attribute, that is, characters to be rendered in blue.