[go: up one dir, main page]

HK1093591B - Character display apparatus and character display method - Google Patents

Character display apparatus and character display method Download PDF

Info

Publication number
HK1093591B
HK1093591B HK07100498.0A HK07100498A HK1093591B HK 1093591 B HK1093591 B HK 1093591B HK 07100498 A HK07100498 A HK 07100498A HK 1093591 B HK1093591 B HK 1093591B
Authority
HK
Hong Kong
Prior art keywords
sub
pixel
character
stroke
color element
Prior art date
Application number
HK07100498.0A
Other languages
Chinese (zh)
Other versions
HK1093591A1 (en
Inventor
瑞 作田
至幸 小山
Original Assignee
夏普株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from JP2003191436A external-priority patent/JP4079268B2/en
Application filed by 夏普株式会社 filed Critical 夏普株式会社
Publication of HK1093591A1 publication Critical patent/HK1093591A1/en
Publication of HK1093591B publication Critical patent/HK1093591B/en

Links

Description

Character display apparatus and character display method
Technical Field
The present invention relates to a character display apparatus and a character display method for displaying characters using a display apparatus capable of color display; a character display program for causing a computer to execute the method; and a computer-readable recording medium for storing the program.
Background
For example, a conventional character display device for displaying characters with high definition using a display device capable of color display is disclosed in japanese unexamined publication No. 2001-100725.
In the character display device of japanese unexamined publication No.2001-100725, the color element level of the sub-pixel corresponding to the basic portion of the character is set to a predetermined color element level. The color element level of a sub-pixel adjacent to a sub-pixel corresponding to the basic portion of the character is set to a color element level different from a predetermined color element level according to at least one correction pattern. The set pigment level is converted into a luminance level according to a predetermined table. As a result, characters are displayed on the display section (display device).
In this conventional technique, a basic part of a character represents a core (central skeleton) of the character.
Data such as RGB, CYM, and the like are assigned as color elements to the respective sub-pixels included in the pixel. The pixel level indicates how much the pigment contributes to the character color. In this conventional technique, the pigment levels are represented by numerical values of "0" to "7". "7" represents the character color. "0" represents a background color. Therefore, by using the pigment levels assigned per sub-pixel, a logical model can be constructed that does not depend on the combination of the actual character and the background color.
In order to actually display characters on the character display device, the pigment level needs to be converted into a luminance value. To this end, a luminance table for converting the pigment level into a luminance value is provided according to a combination of the character color and the background color. For example, when a black character is displayed on a white background, the pigment level "7" is converted into a set of R, G and B luminance values all of "0", and the pigment level "0" is converted into a set of R, G and B luminance values all of "255".
Fig. 16 is a diagram showing an example in which the color element level of a sub-pixel corresponding to the basic portion of the character "/" is set to a predetermined value, and the color element level of a sub-pixel adjacent to the basic portion of the character is set according to a specific correction pattern.
Each rectangle corresponds to a single sub-pixel. The shaded rectangle is the sub-pixel whose pigment level is represented by its concentration. The pigment level increases with increasing concentration. In this example, there are four pigment levels, namely "0", "1", "2", and "3". When the luminance levels range from "0" to "255", the pigment levels are converted into the corresponding luminance levels "255", "170", "85" and "0", and displayed on the display section.
Therefore, by individually controlling the color element levels of the sub-pixels, the resolution can be significantly improved in the direction in which the sub-pixels are arranged. Further, by appropriately controlling the color element levels of the sub-pixels adjacent to the sub-pixel corresponding to the basic portion of the character, colors other than black given to the character cannot be easily recognized by the human eye. As a result, the outline of the character and the character itself can be displayed on the display screen with high definition.
Another conventional technique for displaying characters by individually controlling sub-pixels is disclosed in japanese unexamined publication No. 2002-.
In the conventional display apparatus of japanese unexamined publication No. 2002-. The sub-pixel is associated with each of three picture element arrays (pixels) arranged in series in the longitudinal direction of the sub-pixel included in the character image. The luminance values of the sub-pixels are calculated from picture element values of associated picture elements arranged consecutively along the bus.
Fig. 17 is a schematic diagram for explaining a specific operation of the conventional display device of japanese unexamined publication No. 2002-91369.
Typically, an image such as a character or graphic is represented by a binary picture element value. As shown in fig. 17(a), for example, when a diagonal line is displayed on the display plane, one of two luminance values is simply mapped onto each picture element (pixel). In fig. 17(a) and 17(b), each rectangle represents a pixel constituting a display screen, and the filled portion corresponds to an oblique line.
In this case, in the conventional display device disclosed in japanese unexamined publication No.2002-91369, simple mapping to each picture element on the display screen is not performed. Initially, a character image having a resolution three times that of the display device is generated. For example, when it is assumed that one picture element of the display device is composed of a 3 × 3 matrix, the rasterized character image has a size three times as large as the image to be displayed. For example, when the oblique line shown in fig. 17(a) is rasterized at a resolution three times the resolution of the display device, a rasterized image shown in fig. 17(b) is obtained.
The average value of a plurality of picture elements (associated with each sub-pixel of the display device) contained in the above-described triple-sized character image is mapped to the picture element. For example, the character image of fig. 17(b) is mapped to the sub-pixels as shown in fig. 17 (c). In fig. 17(c), a rectangle corresponds to a sub-pixel. The sub-pixel on which the character is R appears red. The sub-pixel on which the character is G appears green. The sub-pixel on which the character is B appears blue. Further, the filled portion represents six sub-pixels to which the average value of the picture element values is mapped. Each of the six sub-pixels (longer in length than in width) corresponds to three adjacent picture elements in the vertical direction of fig. 17 (b).
As a result, the resolution in the sub-pixel arrangement direction can be improved. Further, since the intensity of the color exhibited by each sub-pixel is determined according to the magnitude of the association of the respective portions of the character generated at 3 times the resolution with a single sub-pixel, the resolution in the longitudinal direction of the sub-pixel can be improved appropriately.
However, in the above-described conventional technique of japanese unexamined publication No.2001-100725, the resolution in the longitudinal direction of the sub-pixel is not considered. Therefore, when the oblique line is displayed, the zigzag pattern is conspicuous depending on the angle of the oblique line.
In the above conventional technique of japanese unexamined publication No. 2002-. Therefore, there is a problem in that a large amount of work memory is required. Further, there is a limitation that the width or font of the character cannot be freely changed.
The present invention provides a solution to the above-mentioned conventional problems. An object of the present invention is to provide a character display apparatus and a character display method which suitably improve the resolution of sub-pixels in the arrangement direction and the longitudinal direction without requiring a large amount of working memory and which can freely change the width of a character; and a character display program for causing a computer to execute the steps of the method; and a computer-readable recording medium.
Disclosure of Invention
The present invention provides a character display apparatus for displaying a character on a screen based on stroke data containing character information, the character display apparatus comprising: a control section for setting a color element level of a sub-pixel overlapping a basic portion of the character based on a distance between a center of the sub-pixel and at least one point included in the stroke, and a line width set for the stroke or one of them. Thus, the above object is achieved.
At least one point included in the stroke may have the same X-coordinate value as the center of the sub-pixel.
The control section may set a smaller sub-pixel pigment level (color element level) as the distance increases.
The control section may set the color element level of the sub-pixel according to a line width in at least one of the X direction and the Y direction set for the stroke.
The control section may set the color element level of the sub-pixel to a predetermined value when the distance is within a predetermined range.
The character display apparatus may include: and a display section including a plurality of display pixels arranged in a matrix on a screen, each of the plurality of display pixels including a plurality of sub-pixels arranged in a predetermined direction and associated with a plurality of respective color elements. The control section may control display of the character on the screen by controlling levels of a plurality of color elements associated with the plurality of sub-pixels, respectively, according to the stroke data.
The character display apparatus may include: a storage section for storing a table associating at least one of a distance between a center of a subpixel and at least one point included in the stroke and a line width set for the stroke with a color element level of the subpixel. The control section may set the color element level of the sub-pixel according to the information of the table.
The control section may set the color element level of the sub-pixel in the vicinity of the sub-pixel having the set color element level according to the distance between the sub-pixels and the set color element level.
The character display apparatus may include: a storage section for storing a table associating a distance between the sub-pixel having the set color element level and a nearby sub-pixel, and the set color element level and a color element level of the nearby sub-pixel. The control section may set the color element level of the nearby sub-pixel according to the information in the table.
The stroke data may be skeleton data representing a skeleton shape of the character or character outline information representing an outline shape of the character.
The present invention provides a character display apparatus for displaying a character on a screen based on stroke data containing character information, the character display apparatus comprising: a control section for setting a color element level of the sub-pixel within a predetermined range based on a distance between a center of the sub-pixel and at least one point included in the stroke, and a line width or one of the line widths set for the stroke. Thus, the above object is achieved.
The control section may set the color element levels of the sub-pixels within the predetermined range according to a predetermined table defining the color element levels of the sub-pixels within the predetermined range and the distance.
At least one point included in the stroke may have the same X-coordinate value as the center of the sub-pixel.
The control section may set a smaller sub-pixel color element level as the distance increases.
The control section may set the color element level of the sub-pixel according to a line width in at least one of the X direction and the Y direction set for the stroke.
The control section may set the color element level of the sub-pixel to a predetermined value when the distance is within a predetermined range.
The character display apparatus may include: and a display section including a plurality of display pixels arranged in a matrix on a screen, each of the plurality of display pixels including a plurality of sub-pixels arranged in a predetermined direction and associated with a plurality of respective color elements. The control section may control display of the character on the screen by controlling levels of a plurality of color elements associated with the plurality of sub-pixels, respectively, according to the stroke data.
The character display apparatus may include: a storage section for storing a table associating at least one of a distance between a center of a subpixel and at least one point included in the stroke and a line width set for the stroke with a color element level of the subpixel. The control section may set the color element level of the sub-pixel according to the information of the table.
The control section may set the color element level of the sub-pixel in the vicinity of the sub-pixel having the set color element level according to the distance between the sub-pixels and the set color element level.
The character display apparatus may include: a storage section for storing a table associating a distance between the sub-pixel having the set color element level and a nearby sub-pixel, and the set color element level and a color element level of the nearby sub-pixel. The control section may set the color element level of the nearby sub-pixel according to the information in the table.
The stroke data may be skeleton data representing a skeleton shape of the character or character outline information representing an outline shape of the character.
The invention provides a character display method for displaying characters on a screen according to stroke data containing character information, the character display method comprising: a step of obtaining a distance between a center of a sub-pixel overlapping a basic portion of the character and at least one point included in the stroke, and a step of obtaining a line width set for the stroke or one of the above two steps; and setting the color element level of the sub-pixel according to the obtained distance and line width or one of them. Thus, the above object is achieved.
The present invention provides a character display program for causing a computer to execute the respective steps of the above character display method.
The present invention provides a computer-readable recording medium for recording the above character display program.
The invention provides a character display method for displaying characters on a screen according to stroke data containing character information, the character display method comprising: a step of obtaining a distance between the center of a sub-pixel within a predetermined range and at least one point included in the stroke, and a step of obtaining a line width set for the stroke, or one of the two steps; and setting the color element level of the sub-pixel according to the obtained distance and line width or one of them. Thus, the above object is achieved.
The present invention provides a character display program for causing a computer to execute the respective steps of the above character display method.
The present invention provides a computer-readable recording medium for recording the above character display program.
(effect of the invention)
Effects and functions of the present invention will be described.
In the character display device of the present invention, the color element level of the sub-pixel overlapping with the basic portion of the character is controlled so as to be set in accordance with at least one of the distance between the center of the sub-pixel and at least one point included in the stroke and the line width set for the stroke. Thereby, the color element level of the sub-pixel can be controlled to be set quickly and with high definition from the stroke data without requiring a large amount of working memory. The stroke data may be skeleton data representing a skeleton shape of the character, character outline information representing an outline shape of the character, or the like.
In the character display device of the present invention, the color element level of the sub-pixel within the predetermined range is controlled so as to be set in accordance with at least one of the distance between the center of the sub-pixel and at least one point included in the stroke and the line width set for the stroke. Thereby, the color element level of the sub-pixel can be controlled to be set quickly and with high definition from the stroke data without requiring a large amount of working memory. The line width or font of the font can be flexibly changed. The predetermined range defines a range of sub-pixels to be processed, and may be, for example, a predetermined sub-pixel region near a basic portion of a character. Alternatively, the predetermined range may be determined according to the distance between the sub-pixel overlapping the stroke and the other sub-pixels.
A table associating at least one of a distance between the center of the sub-pixel and at least one point included in the stroke and a line width set for the stroke with a color element level of the sub-pixel is provided in advance. The color element level of the sub-pixel may be controlled to set the color element level of the sub-pixel according to the information of the table. Thereby, the pigment level can be controlled so that the setting is performed quickly and carefully.
At least one point included in the stroke may have the same X-coordinate value as the center of the sub-pixel. Thus, the color element level of the sub-pixel can be controlled according to the positional relationship in the Y direction. Therefore, the vertical resolution of the sub-pixels can be improved appropriately.
The color element level of the sub-pixel is controlled so as to be set to a smaller value as the distance between the center of the sub-pixel and at least one point included in the stroke increases. This enables smooth display of characters.
The color element level of the sub-pixel may be controlled so as to be set in accordance with the line width in at least one of the X direction and the Y direction set for the stroke. Thereby, the line width of the character can be accurately set.
When the distance between the center of the subpixel and at least one point included in the stroke is within a predetermined range (e.g., less than 0.3), the color element level of the subpixel may be controlled so as to be set to a predetermined value (e.g., a maximum value of "7"). Thereby, the core part of the stroke may be emphasized.
The color element level of the sub-pixel may be set in two or more steps, although it may be set in one step. For example, when setting is performed in two steps, the color element level (first color element level) of a sub-pixel is set according to at least one of the distance between the center of the sub-pixel and at least one point included in a stroke and the line width set for the stroke. The color element level (second color element level) of a sub-pixel and its neighboring sub-pixels may be set according to the distance between the neighboring sub-pixel and the sub-pixel having the first color element level, and the first color element level.
In this case, a table associating the distance between the nearby pixel and the sub-pixel having the first color pixel level, and the first color pixel level and the second color pixel level may be provided in advance. The second pixel level can be controlled based on the information of the table, and thus set. Thereby, the pigment level can be controlled so that the setting is performed quickly and carefully.
The character display method of the present invention includes the steps of: obtaining at least one of a distance between a center of a sub-pixel overlapping a basic portion of the character and at least one point included in the stroke, and a line width set for the stroke; and setting the color element level of the sub-pixel according to at least one of the obtained distance and line width. Thereby, the color element level of each sub-pixel can be controlled to be set quickly and with high definition from the stroke data without requiring a large amount of working memory.
The character display method of the present invention includes the steps of: obtaining at least one of a distance between a center of a sub-pixel within a predetermined range and at least one point included in the stroke, and a line width set for the stroke; and setting the color element level of the sub-pixel according to at least one of the obtained distance and line width. Thereby, the color element level of each sub-pixel can be controlled to be set quickly and with high definition from the stroke data without requiring a large amount of working memory. The line width or font of the character can be flexibly changed.
The character display program of the present invention describes a procedure for causing a computer to execute the character display method of the present invention. Thus, the color element level of each sub-pixel can be controlled by a computer, so that setting can be performed quickly and with high definition from the stroke data without requiring a large amount of working memory. In addition, the line width or font of the character can be flexibly changed.
The readable recording medium of the present invention is a computer readable recording medium in which the character display program of the present invention is recorded. Thus, the color element level of each sub-pixel can be controlled by a computer, so that setting can be performed quickly and with high definition from the stroke data without requiring a large amount of working memory. In addition, the line width or font of the character can be flexibly changed.
Drawings
Fig. 1 is a block diagram showing a main structure of a character display apparatus according to embodiment 1 of the present invention.
Fig. 2 is a schematic diagram schematically showing the structure of a display screen of the display device of fig. 1.
Fig. 3 is a diagram illustrating an exemplary data structure of the skeletal data of fig. 1.
Fig. 4 is a schematic diagram showing an example of applying skeleton data "wood" to fig. 1.
Fig. 5 is a schematic diagram showing an example of the skeleton data "wood" of fig. 4 displayed in a coordinate plane.
Fig. 6 is a diagram showing an exemplary set of specific numerical values of the Y-direction correction table of fig. 1.
Fig. 7 is a schematic diagram showing a subpixel through which a stroke made up of a line segment passes and subpixels in the vicinity thereof.
Fig. 8(a) to 8(c) are diagrams showing typical numerical values of the X-direction correction table of fig. 1.
Fig. 9(a) to 9(c) are schematic diagrams for explaining a method of setting a second color element level according to a first color element level. Fig. 9(a) is a schematic diagram showing the first color pixel levels set for two typical sub-pixels. Fig. 9(b) is a diagram showing the second pixel level set according to the sub-pixel 26A of fig. 9 (a). Fig. 9(c) is a diagram showing the second pixel level set according to the sub-pixel 26B of fig. 9 (a).
Fig. 10 is a flowchart showing a procedure of a character display method according to embodiment 1 of the present invention.
Fig. 11A is a diagram showing how the pigment level is set in the character display method of embodiment 1 of the present invention, representing a stroke mapped onto a display screen.
Fig. 11B is a diagram showing how the pigment level is set in the character display method of embodiment 1 of the present invention, and represents the calculation result of the distance between the stroke and each sub-pixel of fig. 11A.
Fig. 11C is a diagram showing how the color element level is set in the character display method of embodiment 1 of the present invention, showing the first color element level set according to the distance of fig. 11B.
Fig. 11D is a diagram showing how the color element level is set in the character display method of embodiment 1 of the present invention, showing the result of setting the second color element level in accordance with the first color element level of fig. 11C.
Fig. 12 is a block diagram showing a main structure of a character display apparatus according to embodiment 2 of the present invention.
Fig. 13 is a diagram illustrating a data structure of the character outline information of fig. 12.
Fig. 14 is a schematic diagram showing a sub-pixel through which a stroke made up of a contour line passes and sub-pixels in the vicinity thereof.
Fig. 15 is a flowchart showing a procedure of a character display method according to embodiment 2 of the present invention.
Fig. 16 is a diagram showing the color element levels of sub-pixels displayed on a diagonal line "/" on a display screen by the conventional technique.
Fig. 17(a) to 17(c) are schematic diagrams for explaining the operation of the conventional display device. Fig. 17(a) shows a state of diagonal lines in pixel rasterization. Fig. 17(b) shows a state of diagonal lines of fig. 17(a) rasterized at 3-fold resolution. Fig. 17(c) is a schematic diagram showing a state of the oblique line of fig. 17(b) mapped to the sub-pixel.
Detailed Description
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
(example 1)
Fig. 1 is a block diagram showing a main structure of a character display apparatus according to embodiment 1 of the present invention.
In fig. 1, for example, the character display apparatus 1A may be implemented by a personal computer. As the personal computer, any type of computer such as a desktop, a laptop, etc. may be used. Alternatively, the character display apparatus 1A may be implemented by a word processor.
Alternatively, the character display device 1A may be any device such as an electronic instrument, an information instrument, or the like, including a display device capable of color display. For example, the character display device 1A may be an electronic instrument (such as a digital camera including a color liquid crystal display device, etc.), a personal digital assistant as a portable information tool, a mobile phone (such as PHS, etc.), a communication instrument (such as a general telephone/facsimile, etc.).
The character display device 1A has a display device 2 grouped into display sections capable of color display, a control section 3 connected to the display device 2 and respectively controlling a plurality of color elements corresponding to a plurality of sub-pixels included in a display screen of the display device 2, an input device 6 connected to the control section 3, and an auxiliary storage device 7 as a storage section connected to the control section 3.
As the display device 2, any color display device having a plurality of pixels (picture elements) arranged in a matrix on a display screen may be used, including, for example, a color liquid crystal display device.
Fig. 2 is a schematic diagram schematically showing the display screen 13 of the display device 2 of fig. 1.
The display device 2 has a plurality of pixels 14 arranged in a matrix in the X direction and the Y direction indicated by arrows at the lower left of fig. 2. Each of the plurality of pixels 14 includes a plurality of sub-pixels arranged in the X direction. In the example of fig. 2, one pixel 14 has three sub-pixels 15a, 15b, and 15c, which are adjacent to each other in the lateral direction. The sub-pixel 15a is assigned to the color element R in advance so as to represent R (red). The sub-pixel 15b is assigned to the color element G in advance so as to represent G (green). The sub-pixel 15c is assigned to the color element B in advance so as to represent B (blue). The X direction indicates a direction in which a plurality of sub-pixels constituting a pixel are adjacent to each other, and the Y direction indicates a direction perpendicular to the X direction.
It should be noted that the number of sub-pixels included in each pixel is not limited to "3". Each pixel may include two or more sub-pixels arranged in a predetermined direction. For example, when displaying a color with N color elements (N.gtoreq.2: natural number), each pixel includes N sub-pixels. The order of arrangement of the pigments is not limited to the order shown in fig. 2. For example, the pigments may be arranged in order along the X-direction B, G and R. In addition, the arrangement direction of the sub-pixels is not limited to the direction shown in fig. 2. The sub-pixels may be arranged in an arbitrary direction.
The color elements corresponding to the sub-pixels are not limited to R (red), G (green), and B (blue), but may be other color elements such as C (cyan), Y (yellow), and M (violet).
The control section 3 has a CPU 4 (central processing unit) and a main memory 5. The control section 3 controls the display of the display device 2 by controlling the setting of the pigment levels of the sub-pixels included in the display screen of the display device 2 according to the character display program 7a and the various data 7b, thereby displaying characters on the display screen 13.
More specifically, the control section 3 controls the plurality of color element levels respectively assigned to the respective sub-pixels 15a to 15c arranged on the display screen 13 of the display device 2, thereby displaying information representing characters input through the input device 6 on the display device 2.
The CPU 4 contained in the control section 3 controls and monitors the entire character display apparatus 1A, and executes each step of the character display program 7a stored in the auxiliary storage device 7.
The main memory 5 included in the control section 3 temporarily stores a character display program 7a and various data 7b such as data input through the input device 6, data to be displayed on the display device 2, data necessary for executing the character display program 7a, and the like. The main memory 5 is accessed by the CPU 4.
The CPU 4 executes each step of the character display program 7a based on the display program 7a and the plurality of types of data 7b read into the main memory 5, and obtains a character pattern. The resulting character pattern is temporarily stored in the main memory 5, and then, output and displayed on the display device 2. The timing of outputting and displaying the character pattern on the display device 2 is controlled by the CPU 4.
The input device 6 is used for inputting character information to be displayed on the display device 2 into the control section 3. Examples of the character information include a character code for identifying a character, a character size indicating a size of the character, line widths of strokes of the character to be displayed in the X direction and the Y direction, and the like.
As the input device 6, any type of input device capable of inputting character codes, character sizes, and line widths of strokes in the X direction and the Y direction may be used. For example, an input device such as a keyboard, a mouse, a pen input device, or the like is preferably used as the input device 6.
In embodiment 1, the line widths of the strokes of the display character input through the input device 6 in the X direction and the Y direction are specified in three levels: "bold", indicates bold characters; "medium", meaning medium line width; and "thin", meaning a thin line width. It should be noted that the line width set for the stroke may be set by the user through the input device 6, or a preset line width or a bandwidth reset due to a prescribed subsequent change may be used.
The auxiliary storage device 7 stores a character display program 7a and various data 7b required for executing the character display program 7 a. The required plural kinds of data 7b include skeleton data 71b defining the skeleton shape of the character, and a Y-direction correction table 72b and an X-direction correction table 73b, which will be described later, and the like.
Although a stroke is defined as a line segment having no thickness (constituting the skeleton shape of the character in embodiment 1), a stroke may be defined as a line segment having a thickness (constituting the outline shape of the character described in embodiment 2). The skeleton data is used to specify the skeleton shape of each stroke constituting the character. Alternatively, as described in embodiment 2 below, the stroke data may define the outline shape of each stroke constituting the character. Therefore, the term skeleton data (skeletton data) is used to distinguish such stroke data.
The secondary storage device 7 may be any type of storage device capable of storing the character display program 7a and the data 7 b. In the secondary storage device 7, any recording medium may be used as the recording medium 7c storing the character display program 7a and various data 7b required therefor. For example, as the recording medium 7c, various computer-readable recording media such as a hard disk, a CD-ROM, an MO, a floppy disk, an MD, a DVD, an IC card, an optical disk, and the like can be preferably used.
Although the character display program 7a and the data 7b are stored in the secondary storage device 7, the present invention is not limited to this. For example, the character display program 7a and the data 7b may be stored in the main memory 5 or a ROM (not shown). For example, mask ROM, EPROM, EEPROM, flash ROM, and the like can be used as such ROM. In the case of a ROM system, various processes can be easily realized by replacing the ROM. For example, the ROM system can be preferably applied to a mobile terminal device, a mobile phone, and the like.
Further, the recording medium for storing the character display program 7a and the data 7b may include a medium fixedly carrying the program or the data (such as a medium like a disk or a card as described above, and a semiconductor memory, etc.) and a communication medium (for transferring the program or the data over a communication network, and non-fixedly carrying the program or the data). For example, when the character display apparatus 1A includes a device for connecting a communication line (such as the internet or the like), the character display program 7a and the data 7b can be downloaded through the communication line. In this case, the loader program required for downloading may be stored in advance in a ROM (not shown), or may be installed from the secondary storage device 7 into the control section 3.
Next, each item of data 7b stored in the secondary storage device 7 will be described. The data 7b includes skeleton data 71b defining the skeleton shape of the character, and a Y-direction correction table 72b and an X-direction correction table 73 b.
First, the skeleton data 71b will be described.
Fig. 3 is a diagram showing an exemplary data structure of the skeleton data 71b stored in the secondary storage device 7 of fig. 1.
In fig. 3, skeleton data 71b represents a skeleton shape of a character, including character codes 16 for distinguishing character types from each other, a stroke number 17 representing the number M of strokes (M is an integer of 1 or more) constituting the character, and stroke information 18 corresponding to each stroke.
The stroke information 18 includes a coordinate number 19 indicating the number N of points constituting a stroke (N is an integer of 1 or more), a line type 20 indicating the line type of the stroke, and a plurality of sets of coordinate data 21 indicating the coordinates of the points constituting the stroke.
The number of coordinate data sets 21 (points) is equal to the number of coordinates 19. Therefore, N sets of coordinate data are stored as coordinates constituting the stroke. Also, the number of groups of stroke information 18 is equal to the number of strokes 17. Thus, the skeleton data 71b contains M sets of stroke information 18.
For example, the line type 20 includes a line type "straight line" and a line type "curved line". When the line type 20 is a "straight line", a plurality of points constituting the stroke are approximated with a straight line. When the line type 20 is a "curve", points constituting the stroke are approximated with a curve (e.g., a spline curve, etc.).
Fig. 4 is a diagram showing an example of skeleton data 71b representing the skeleton shape of the kanji character "wood".
In fig. 4, skeleton data 71b representing the skeleton shape of the kanji character "wood" has four strokes #1 to # 4.
The stroke #1 is defined as a straight line connecting between the start point (0, 192) and the end point (255, 192). The stroke #2 is defined as a straight line connecting between the start point (128, 255) and the end point (128, 0). The stroke #3 is obtained by approximating five points (121, 192), (97, 141), (72, 103), (41, 69), and (4, 42) with a curve. The stroke #4 is obtained by approximating five points (135, 192), (156, 146), (182, 107), (213, 72), and (251, 42) with a curve.
Fig. 5 is a schematic diagram showing an example of skeleton data 71b, which shows the skeleton shape of the kanji character "wood" in fig. 4, displayed in the coordinate plane. In the example of fig. 5, strokes #3 and #4 are approximated in straight lines for simplicity.
Next, the Y-direction correction table 72b will be described.
The control section 3 sets the first color pixel levels of the subpixels in the basic portion of the character to be displayed and the subpixels sequentially arranged in the Y direction from the basic portion of the character, using the Y-direction correction table 72b stored in the secondary storage device 7. As described below, the Y-direction correction table 72b associates the numerical value of the first pixel level with a combination of the range including the Y-direction distance between the stroke (point on the stroke) and the sub-pixel and the Y-direction line width of the stroke input through the input device 6.
In embodiment 1, the color element level of each sub-pixel is not directly determined, but is determined in two steps.
Initially, the color element level of the subpixel of interest is determined based on the Y-direction distance between the stroke and the center of the subpixel and the Y-direction line width of the stroke. In embodiment 1 and embodiment 2, this pigment level is referred to as a first pigment level.
Next, the color element level of a sub-pixel adjacent to the sub-pixel having the first color element level in the X direction is determined based on the distance between the first color element level sub-pixel and the adjacent pixel and the X-direction line width of the stroke. In embodiment 1 and embodiment 2, this pigment level is referred to as a second pigment level. This second pigment level is used as the pigment level which is finally converted into a luminance value of the display device 2.
The reason for determining the pigment level in two steps is to simplify the table used. The pigment level may also be determined in one step or three or more steps.
Fig. 6 is a diagram showing an exemplary set of specific numerical values of the Y-direction correction table 72b stored in the secondary storage device 7 of fig. 1.
In fig. 6, the Y-direction correction table 72b contains the range of Y-direction distances between the stroke and the sub-pixels (i.e., 0 to 0.3, 0.3 to 0.8, 0.8 to 1.2, 1.2 to 1.6, and 1.6 to 2.0, where a to b denote the range between a (inclusive) and b (exclusive)) and the Y-direction line width (thickness) of the stroke (i.e., "thick", "medium", and "thin"). A combination of these terms is associated with a first level of color elements.
The control section 3 sets the first pixel level of the sub-pixel within a predetermined range in the Y direction using the Y-direction correction table 72 b. The range includes sub-pixels that overlap with a substantial portion of the character.
In embodiment 1, when the skeleton data 71b is mapped onto the display screen 13 according to the character size, the sub-pixels through which the stroke passes are regarded as the basic part of the character.
The control section 3 determines the first pixel level of the basic portion of the character as follows.
The center of a sub-pixel overlapping a basic portion of the character, and the distance between the X-coordinate value of the center and a point on the stroke having the same X-coordinate value as the center (hereinafter, referred to as Y-direction stroke-sub-pixel distance) are calculated. The stroke-sub-pixel distance range defined in the Y-direction correction table 72b including the calculated distance, and the Y-direction line width of the stroke input through the input device 6 determine the form value in the Y-direction correction table 72b as the first color pixel level. If the sub-pixel has the same X-coordinate value as the point on the stroke, the sub-pixel not overlapping with the basic portion is also set to have the first color pixel level.
Similarly, the control section 3 sets the first color pixel level as follows for sub-pixels (sub-pixels having the same X-coordinate value as that of the sub-pixels overlapping the basic portion of the character) arranged sequentially in the Y direction from the basic portion of the character.
The Y-direction stroke-sub-pixel distance of sub-pixels sequentially arranged in the Y-direction from the basic portion of the character is calculated. From the distance range defined in the Y-direction correction table 72b including the calculated distance and the Y-direction line width of the stroke input through the input device 6, a form value is determined and set as the first pixel level.
It should be noted that the sub-pixels whose Y-direction stroke-sub-pixel distance does not fall within the range defined in the Y-direction correction table 72b are not given the first pixel level.
As described above, the control section 3 determines the first color pixel level of the sub-pixel according to the Y-direction correction table 72 b. When the line width of the character is "thick" in the Y-direction correction table 72b of fig. 6, the color element level is decreased in a stepwise manner such as 7, 5, 4, 2, 1 as the Y-direction stroke-sub-pixel distance increases. When the line width of the character is "medium", the color element level is decreased in a stepwise manner such as 7, 4, 2, 1 as the Y-direction stroke-sub-pixel distance increases. When the line width of the character is "thin", the color element level is decreased in a stepwise manner such as 7, 2, 1 as the Y-direction stroke-sub-pixel distance increases. In the Y-direction correction table 72b of fig. 6, the distance between the centers of two sub-pixels adjacent to each other in the Y-direction is defined as 1, and the maximum value of the first color pixel level is defined as 7.
Fig. 7 is a diagram showing the mapping of its skeleton data 71b (fig. 1) to strokes, and some typical sub-pixels, on the display screen 13 according to the character size.
Next, a process of setting the first color pixel level of the sub-pixel of fig. 7 according to the Y-direction correction table 72b by the control section 3 will be described in detail.
In fig. 7, three rectangles extending in the vertical direction indicate the sub-pixel 23A, the sub-pixel 23B, and the sub-pixel 23C sequentially arranged in the Y direction. The solid circles 22A to 22C in the respective rectangles represent the center points of the respective sub-pixels. The oblique straight line represents stroke 24.
Stroke 24 crosses over sub-pixels 23A and 23B so that each sub-pixel constitutes the basic part of the character.
The Y coordinate values of the center points 22A to 22C of the sub-pixels 23A to 23C are 4, 3, and 2, respectively. Point 25 on stroke 24 (having the same X coordinate value as center points 22A through 22C) has a Y coordinate value of 3.4. Therefore, the Y-direction stroke-subpixel distances calculated by the control section 3 are 1.4 for the subpixel 23C, 0.4 for the subpixel 23B, and 0.6 for the subpixel 23A.
From these results, the control section 3 selects the range 1.2 to 1.6 for the sub-pixel 23C from the Y-direction stroke-sub-pixel distance range defined in the Y-direction correction table 72 b. The control section 3 also selects the range of 0.3 to 0.8 for the sub-pixel 23B from the Y-direction stroke-sub-pixel distance range defined in the Y-direction correction table 72B. The control section 3 selects the range of 0.3 to 0.8 for the sub-pixel 23A from the Y-direction stroke-sub-pixel distance range defined in the Y-direction correction table 72 b.
When the Y-direction line width of the stroke is set to "coarse", the first pixel level of the sub-pixel 23C is set to "2", which is a numerical value of a portion where a row containing the line width "coarse" intersects a column containing the Y-direction stroke-sub-pixel distance range 1.2 to 1.6 in the Y-direction correction table 72 b. Also, setting the first color pixel level of the sub-pixel 23B to "5" is a numerical value of a portion where a row including the line width "thick" intersects a column including the Y-direction stroke-sub-pixel distance range of 0.3 to 0.8 in the Y-direction correction table 72B. Further, setting the first color pixel level of the sub-pixel 23A to "5" is a numerical value of a portion where a row including the line width "thick" intersects a column including the Y-direction stroke-sub-pixel distance range of 0.3 to 0.8 in the Y-direction correction table 72 b.
When the Y-direction line width of the stroke is set to "medium", the first pixel level of the sub-pixel 23C is set to "1", which is a numerical value of a portion where a row containing the line width "medium" intersects a column containing the Y-direction stroke-sub-pixel distance range 1.2 to 1.6 in the Y-direction correction table 72 b. Also, setting the first color pixel level of the sub-pixel 23B to "4" is a numerical value of a portion where a row containing a line width of "medium" and a column containing a Y-direction stroke-sub-pixel distance range of 0.3 to 0.8 intersect in the Y-direction correction table 72B. Also, setting the first color pixel level of the sub-pixel 23A to "4" is a numerical value of a portion where a row containing a line width of "medium" and a column containing a Y-direction stroke-sub-pixel distance range of 0.3 to 0.8 intersect in the Y-direction correction table 72 b.
When the Y-direction line width of the stroke is set to "thin", the first pixel level of the sub-pixel 23C is not set. This is because, in the Y-direction correction table 72b, there is no numerical value at a portion where a row containing the line width "thin" intersects a column containing the Y-direction stroke-subpixel distance range 1.2 to 1.6. Also, setting the first color pixel level of the sub-pixel 23B to "2" is a numerical value of a portion where a row including the line width "thin" intersects a column including the Y-direction stroke-sub-pixel distance range of 0.3 to 0.8 in the Y-direction correction table 72B. Also, setting the first color pixel level of the sub-pixel 23A to "2" is a numerical value of a portion where a row including the line width "thin" intersects a column including the Y-direction stroke-sub-pixel distance range of 0.3 to 0.8 in the Y-direction correction table 72 b.
The first pixel level is not set for sub-pixels having a Y-direction stroke-sub-pixel distance of 2.0 or more. This is because such a distance exceeds the Y-direction stroke-sub-pixel distance range in the Y-direction correction table 72 b.
Even for a sub-pixel included in the basic part of the character, such as the pixel 23A or the pixel 23B, when the Y-direction stroke-sub-pixel distance is 0.3 or more, the first color pixel level is not set to the maximum value of 7. In contrast, when the Y-direction stroke-sub-pixel distance is less than 0.3, the first pixel level is always set to the maximum value of 7. As a result, the first pixel level is always set to the maximum value when the stroke substantially passes through the center of the pixel, thereby emphasizing the core portion of the stroke. Thereby, display quality can be improved. In this case, the pigment level does not have to be the maximum value, and may be close to the maximum value. In example 1, the maximum value is assumed to be "7".
Even for a sub-pixel not included in the basic part of the character, such as the sub-pixel 23C, the first pixel level can be set in accordance with the Y-direction stroke-sub-pixel distance and the Y-direction line width of the stroke.
In embodiment 1, the Y-direction correction table 72b is used to set the first color pixel level of the sub-pixel, or alternatively, the first color pixel level of the sub-pixel may be directly calculated in accordance with the above-described Y-direction stroke-sub-pixel distance. For example, the first pixel level of a sub-pixel may be obtained using a linear function with the Y-direction stroke-sub-pixel distance as a parameter. In this case, when the Y-direction stroke-sub-pixel distance of the sub-pixel is within a predetermined Y-direction stroke-sub-pixel distance or more, the first color pixel level of the sub-pixel may not be set.
Next, the X-direction correction table 73b will be described.
The control section 3 sets the second pixel level of the sub-pixel having the first color pixel level and the sub-pixel arranged in the X direction in order from the sub-pixel having the first color pixel level (i.e., the sub-pixel having the same Y coordinate value as the sub-pixel having the first color element) using the X-direction correction table 73b stored in the auxiliary storage 7. The X-direction correction table 73b associates the numerical value of the second pixel level with the set numerical value of the first pixel level, the distance between the sub-pixel having the set first pixel level and the sub-pixel of interest, and the X-direction line width of the stroke input through the input device 6.
Fig. 8 is a diagram showing typical numerical values of the X-direction correction table 73b stored in the auxiliary storage device 7 of fig. 1.
In the control section 3, when the X-direction line width of the stroke is set to "coarse", the second pixel level is set using the X-direction correction table 73b as shown in fig. 8 (a). When the X-direction line width of the stroke is set to "medium", the second pixel level is set using the X-direction correction table 73b as shown in fig. 8 (b). When the X-direction line width of the stroke is set to "thin", the second pixel level is set using the X-direction correction table 73b as shown in fig. 8 (c).
The first pixel level is set using the above-described Y-direction correction table 72b for sub-pixels located within a predetermined range in the Y-direction including the basic portion of the character. The second pixel level is set using the X-direction correction table 73b for the sub-pixels located within a predetermined range in the X-direction including the above sub-pixels.
In the X-direction correction table 73b of fig. 8, the distance from the sub-pixel to which the first color pixel level has been set is shown, where the length of each sub-pixel in the X-direction is 1.
When the line width in the X direction is "thick", the control section 3 sets the second pixel level as follows according to the X direction correction table 73b of fig. 8 (a).
For a sub-pixel whose first pixel level has been set to "7", the second pixel level is set to "7". The second pixel level is set to "5" for the sub-pixel located at a sub-pixel distance in the X direction from the sub-pixel having the first pixel level of "7". The second pixel level is set to "4" for the sub-pixel located at a distance of two sub-pixels from the sub-pixel having the first pixel level of "7" in the X direction. The second pixel level is set to "3" for the sub-pixel located at a distance of three sub-pixels from the sub-pixel whose first pixel level is "7" in the X direction. The second pixel level is set to "2" for the sub-pixel located at a distance of four sub-pixels from the sub-pixel whose first pixel level is "7" in the X direction.
Similarly, for a sub-pixel whose first pixel level has been set to "5", the second pixel level is set to "5". The second pixel level is set to "4" for the sub-pixel located at a sub-pixel distance of one sub-pixel distance from the sub-pixel having the first pixel level of "5" in the X direction. The second pixel level is set to "3" for the sub-pixel located at a distance of two sub-pixels from the sub-pixel having the first pixel level of "5" in the X direction. The second pixel level is set to "1" for the sub-pixel located at a distance of three sub-pixels from the sub-pixel whose first pixel level is "5" in the X direction.
Similarly, for a sub-pixel whose first pixel level has been set to "4", the second pixel level is set to "4". The second pixel level is set to "2" for the sub-pixel located at a sub-pixel distance in the X direction from the sub-pixel having the first pixel level of "4".
Similarly, for a sub-pixel whose first pixel level has been set to "2", the second pixel level is set to "2".
Similarly, for a sub-pixel whose first pixel level has been set to "1", the second pixel level is set to "1".
When the line width in the X direction is set to "medium" and "thin", the second pixel level is set according to the X direction correction table 73b of fig. 8(b) and 8(c), respectively.
In embodiment 1, if different second pixel levels are set for the sub-pixels, the highest value among them is set as the final second pixel level value. Alternatively, other statistics may be used, such as averages and the like.
Fig. 9(a) is a schematic diagram showing two typical sub-pixels to which respective first color pixel values are assigned. In fig. 9, the horizontal axis represents the X direction of the sub-pixels, and the vertical axis represents the first and second color pixel levels set for each sub-pixel. In fig. 9(a), the height of the vertical bar shown by the dotted line indicates the magnitude of the first color element level. As shown in fig. 9(a), the first color pixel level of the sub-pixel 26A is set to "7", and the first color pixel level of the sub-pixel 26B is set to "5".
Next, how the control section 3 sets the second pixel level of each sub-pixel in fig. 9(a) will be described in detail, assuming that the line width in the X direction is set to be "thin".
Fig. 9(b) is a schematic diagram showing a state after the sub-pixel 26A and the sub-pixel 26 arranged in order with the sub-pixel 26A in the X direction are set in accordance with the first color pixel level of the sub-pixel 26A. In fig. 9(b), the height of the vertical bar shown by a thick line indicates the magnitude of the second pixel level.
The control section 3 refers to the X-direction correction table 73b of fig. 8(c) corresponding to the line width in the X direction being "thin" to obtain the second pixel level corresponding to "7" (the first pixel level set for the sub-pixel 26A).
According to the X-direction correction table 73b of fig. 8(c), the second pixel level corresponding to the first pixel level "7" is set to "7", "3", "1" (the closest preceding) at a distance from the sub-pixel having the set first pixel level. In fig. 9(b), these numerical values are indicated by hatched portions. Therefore, as shown by the thick lines in fig. 9(b), the second pixel level of the sub-pixel 26A is set to "7", the second pixel level of the sub-pixel located at a distance of one sub-pixel from it in the X direction is set to "3", and the second pixel level of the sub-pixel located at a distance of two sub-pixels from it in the X direction is set to "1".
Fig. 9(c) is a schematic diagram showing a state after the sub-pixel 26B is set and the second pixel level of the sub-pixel 26B and the sub-pixels sequentially arranged with the sub-pixel 26B in the X direction are set according to the first color pixel level of the sub-pixel 26B. In fig. 9(c), the height of the vertical bar shown by a thick line indicates the magnitude of the second pixel level.
The control section 3 refers to the X-direction correction table 73B of fig. 8(c) corresponding to the line width in the X direction being "thin" to obtain the second pixel level corresponding to "5" (the first pixel level set for the sub-pixel 26B).
According to the X-direction correction table 73b of fig. 8(c), the second pixel level corresponding to the first pixel level "5" is set to "5", "2" (the closest prior) at a distance from the sub-pixel having the set first pixel level. In fig. 9(c), these numerical values are indicated by hatched portions. Therefore, as shown by the thick line in fig. 9(c), the second pixel level of the sub-pixel 26B is set to "5", and the second pixel level of the sub-pixel located at a distance of one sub-pixel therefrom in the right-hand direction is set to "2". It should be noted that the second pixel level of the sub-pixel located at a distance of one sub-pixel from the sub-pixel 26B in the left-hand direction is set to the higher value "7", so the second pixel level is not updated.
Next, the character display program 7a will be described.
Fig. 10 is a flowchart showing the procedure of the character display program 7a of fig. 1. The character display program 7a is executed by the CPU 4. Next, each step included in the process of the character display program 7a will be described with reference to the following process.
As shown in fig. 10, in step S1, character information including a character code, a character size, sharpness of a stroke of a character to be displayed, and line widths of the stroke in the X and Y directions is input through the input device 6. For example, a character code 4458(JIS (japanese industrial standard) character code, part (ku)44, point (ten)58) is input to display the kanji character "wood" on the display device 2. The character size is represented by the number of dots in the horizontal direction and the number of dots in the vertical direction of the character to be displayed (for example, 20 dots × 20 dots). For example, the sharpness of the stroke of a character to be displayed is represented by a code corresponding to one of "sharp", "normal", and "soft". For example, the line widths of the strokes in the X and Y directions are represented by codes each corresponding to one of "thick", "medium", and "thin". From this code, the Y-direction correction table 72b is determined.
Next, in step S2, the skeleton data 71b of the character corresponding to the input character code is stored in the main memory 5.
In step S3, the coordinate data 21 of the skeleton data 71b is scaled according to the input character size. By the scaling, the coordinate system preset for the coordinate data 21 of the skeleton data 71b is converted into the actual pixel coordinate system for the display device 2. It should be noted that scaling is performed while taking the arrangement of the sub-pixels into consideration.
In embodiment 1, as shown in fig. 2, the pixel 14 has three sub-pixels 15a, 15b, and 15c arranged in the X direction. When the character size is 20 dots × 20 dots, the coordinate data 21 of the skeleton data 71b is scaled to 60(═ 20 × 3) sub pixels × 20 pixels.
In step S4, data of strokes (stroke information 18) is obtained from the skeleton data 71 b.
In step S5, the line type 20 contained in the stroke information 18 is referred to. When the line type 20 is a straight line, sub-pixels through which the straight line connecting the scaled coordinate data 21 passes and sub-pixels arranged in the vicinity of these sub-pixels in the Y direction are extracted. When the line 20 is a curve, sub-pixels through which the curve approximating the scaled coordinate data 21 passes and adjacent sub-pixels located above and below these sub-pixels are extracted. For example, the curve may be a spline curve.
In step S6, the distance between the point on the stroke having the same X-coordinate value as the center point of each sub-pixel and the center point of the sub-pixel is calculated. For example, the distance is calculated by the absolute value of the difference in the Y coordinate values of two points.
In step S7, with reference to the Y-direction correction table 72b, a first pixel level is set according to the distance calculated in step S6 and the Y-direction line width of the stroke obtained in step S1.
In step S8, with reference to the X-direction correction table 73b, for the sub-pixels located in the X-direction near each sub-pixel extracted in step S5, a second pixel level is set in accordance with the first pixel level set in step S7 and the X-direction line width of the stroke obtained in step S1. It should be noted that when the higher second pixel level has been set, no update is performed.
In step S9, luminance data corresponding to the second pixel level of the sub-pixel set in step S8 is transmitted to the display device 2. The second pixel level may be converted into luminance data with reference to table data.
In step S10, it is determined whether steps S4 to S9 have been completed for all strokes contained in the character. If the result of the determination is negative ("no"), the process returns to the processing in step S4. If the result of the determination is affirmative (yes), the process ends.
Fig. 11A to 11D show how the color element level of the sub-pixel is set.
Fig. 11A is a schematic diagram showing the state of the stroke 27 after scaling the coordinate data 21 and then mapping it to the actual pixel coordinates of the display screen 13.
Fig. 11B is a diagram showing the Y-direction stroke-sub-pixel distance (represented by a rectangle corresponding to a sub-pixel) of each sub-pixel obtained by the control section 3. It should be noted that the sub-pixels having a stroke-sub-pixel distance of 2.0 or more in the Y direction have an empty rectangle because these sub-pixels are not set.
Fig. 11C is a diagram showing that the control section 3 sets the first pixel level of each pixel of fig. 11B according to the Y-direction stroke-sub-pixel distance (expressed in a rectangle corresponding to a sub-pixel). It should be noted that the Y-direction line width of the stroke is set in the data.
Fig. 11D is a schematic diagram showing that the control section 3 sets the second pixel level of each pixel of fig. 11C in accordance with the first color pixel level (shown in a rectangle corresponding to a sub-pixel). It should be noted that the X-direction line width of the stroke is set in the data.
(example 2)
Fig. 12 is a block diagram showing a main structure of a character display apparatus according to embodiment 2 of the present invention. In fig. 12, the same components as those of the character display apparatus 1A of embodiment 1 of fig. 1 are denoted by the same reference numerals, and explanation thereof will be omitted.
In fig. 12, the character display device 1B includes an auxiliary storage device 8 that stores a character display program 8a and data 8B necessary for executing the character display program 8 a. The data 8b contains character outline information 81b defining an outline of a character, a Y-direction correction table 82b, and an X-direction correction table 83 b. The other portions are similar to the character display device 1A of embodiment 1 described above. As the secondary storage device 8, any type of storage device capable of storing the character display program 8a and the data 8b may be used. The character display program 8a and the data 8b may also be stored in the recording medium 7 c.
Next, the data 8b stored in the secondary storage device 8 will be described.
First, the character outline information 81b will be described.
Fig. 13 is a diagram showing a data structure of character outline information 81b stored in the auxiliary storage device 8 in fig. 12.
In fig. 13, the character outline information 81b contains character codes 28 for distinguishing character types from each other, the number of strokes 29 indicating the number of strokes constituting a character, and stroke information 30 corresponding to each stroke.
The stroke information 30 contains a stroke code 31 for distinguishing stroke types from each other, contour point numbers 32 indicating the number of contour points constituting a stroke, and pointers 33 of contour point coordinate data 34 indicating the coordinates of the contour points constituting a stroke. The pointer 33 indicates the position of the contour point coordinate data 34 stored in the secondary storage device 8. By referring to the stroke information 30, the coordinates of the contour points constituting the stroke can be obtained. In the contour point coordinate data 34, the coordinates of the contour points constituting the stroke are arranged in a counterclockwise manner.
The number of groups of stroke information 30 is equal to the number of strokes 29. Therefore, when the stroke number 29 is N (N is an integer of 1 or more), the character outline information 81b contains N sets of outline information 30 for the stroke codes 1 to N.
Examples of the method for reproducing the outline shape of the character include: (1) approximating the contour line of the character with a straight line; (2) approximating the outline of the character by a combination of straight lines and arcs; (3) approximating the contour lines of the characters by a combination of straight lines and curves (such as spline curves and the like); and the like. The character outline information 81b may contain a plurality of outline points obtained by any one of the above-described methods (1) to (3) as the outline point coordinate data 34. In consideration of the character quality and the data capacity, it is preferable that the character outline information 81b contain the outline point coordinate data 34 obtained by the method (3).
The character outline information 81b is stroke data for specifying an outline shape of each stroke constituting the character. Alternatively, the stroke data may define the skeleton shape of the stroke, as described in embodiment 1. For the purpose of distinction, in embodiment 2, stroke data is referred to as character outline information.
Next, the Y-direction correction table 82b will be described.
The control section 3 uses the Y-direction correction table 82b to set the first color pixel levels of the sub-pixels in the basic portion of the character to be displayed and the sub-pixels sequentially arranged in the Y direction from the basic portion of the character. In embodiment 2, when mapping the character outline information 81b onto the display screen 13 according to the character size, it is assumed that a sub-pixel containing a part of the area enclosed by the outline of each stroke constitutes a basic part of a character. It should be noted that the Y-direction correction table 72b of fig. 6 and the X-direction correction table 73b of fig. 8 may be used as examples of the Y-direction correction table 82b and the X-direction correction table 83b, respectively, and are not explained again.
The control section 3 sets the first pixel level of the basic portion of the character as follows.
When the center of a sub-pixel overlapping with a basic part of a character is located outside an area surrounded by the outline of a stroke, the shortest distance (hereinafter, referred to as Y-direction stroke-sub-pixel distance) among distances from points on the outline of the stroke having the same X-coordinate value as the center of the sub-pixel is calculated. The Y-direction stroke-sub-pixel distance is defined as "0" when the center of the sub-pixel is located inside the region surrounded by the outline of the stroke. The form value of the Y-direction correction table 82b determined from the distance range defined in the Y-direction correction table 82b including the calculated stroke-sub-pixel distance and the Y-direction line width of the stroke input through the input device 6 is set to the first color pixel level.
Similarly, the control section 3 sets the first color pixel level as follows for the sub-pixels sequentially arranged in the Y direction from the basic portion of the character.
The Y-direction stroke-sub-pixel distance of sub-pixels sequentially arranged in the Y-direction from the basic portion of the character is calculated. The form value determined from the distance range defined in the Y-direction correction table 82b including the calculated stroke-sub-pixel distance and the Y-direction line width of the stroke input through the input device 6 is set to the first pixel level.
Next, a process of setting the Y-direction stroke-subpixel distance of the subpixel using the control section 3 will be described in detail with reference to fig. 14.
Fig. 14 is a diagram showing a typical stroke obtained by mapping the character outline information 81b of fig. 12 onto the display screen 13 in accordance with the character size and a part of sub-pixels.
In fig. 14, three rectangles respectively indicate the sub-pixel 36A, the sub-pixel 36B, and the sub-pixel 36C sequentially arranged in the reverse direction Y. The solid circles 35A to 35C represent the center points of the respective sub-pixels. The slanted rectangle represents stroke 37.
Each of the hatched subpixels 36A and 36B overlaps a portion of the stroke 37 and thus constitutes a basic part of the character.
The Y coordinate values of the center points 35A to 35C of the sub-pixels 36A, 36B, and 36C are 2, 3, and 4, respectively. Points 38A and 38B, which have the same X-coordinate values as the center points 35A to 35C and are located on the outline of the stroke 37, have Y-coordinate values of 2.4 and 3.2, respectively.
The center point 35A of subpixel 36A is located below stroke 37 and, therefore, closer to point 38A than to point 38B. Therefore, the Y-direction stroke-subpixel distance calculated by the control section 3 is 0.4 as the distance between the point 38A and the center point 35A of the subpixel 36A.
The center point 35B of the sub-pixel 36B is located within a range surrounded by the outline of the stroke 37. Thus, the Y-direction stroke-subpixel distance is 0.
The center point 35C of subpixel 36C is located above stroke 37 and, therefore, closer to point 38B than to point 38A. Therefore, the Y-direction stroke-subpixel distance calculated by the control section 3 is a distance between the point 38B and the center point 35C of the subpixel 36C, which is 0.8.
As described above, in embodiment 2, the operation of calculating the Y-direction stroke-subpixel distance by the control section 3 is different from that in embodiment 1. It should be noted that the operation for setting the first pixel level in accordance with the Y-direction correction table 82b, the operation for setting the second pixel level in accordance with the Y-direction stroke-sub-pixel distance, and the operation for setting the first pixel level in accordance with the X-direction correction table 83b are similar to embodiment 1, and will not be explained again.
Next, the character display program 8a will be described.
Fig. 15 is a flowchart showing the procedure of the character display program 8a of fig. 12. The character display program 8a is executed by the CPU 4. Next, each step included in the process of the character display program 8a will be described with reference to the following process.
As shown in fig. 15, first, in step S11, character information containing a character code, a character size, sharpness of a stroke of a character to be displayed, and line widths of the stroke in the X and Y directions is input through the input device 6. For example, a character code 4458(JIS (japanese industrial standard) character code, part 44, point 58) is input to display the kanji character "wood" on the display device 2. The character size is represented by the number of dots in the horizontal direction and the number of dots in the vertical direction of the character to be displayed (for example, 20 dots × 20 dots). For example, the sharpness of the stroke of the character to be displayed is represented by a code corresponding to one of "sharp", "general", and "soft". For example, line widths of the strokes in the X and Y directions are respectively represented by codes corresponding to one of "thick", "medium", and "thin". From this code, the Y-direction correction table 82b is determined.
Next, in step S12, the character outline information 81b of the character corresponding to the input character code is read into the main memory 5.
In step S13, an ideal outline of the character is calculated from the outline point coordinate data 34 of the stroke based on the character outline information 81 b. According to known methods, the ideal contour of the character is approximated by a straight or curved line.
In step S14, the ideal contour of the character calculated in step S13 is scaled according to the input character size. By scaling, the coordinate system preset for the contour point coordinate data 34 is converted into the actual pixel coordinate system for the display device 2.
In step S15, data of strokes is obtained from the scaled outline of the character in step S14.
In step S16, subpixels including the region surrounded by the outline of the stroke obtained in step S15, and adjacent subpixels sequentially arranged in the Y direction are extracted.
In step S17, it is determined whether the center point of each sub-pixel extracted in step S16 is located inside the stroke obtained in step S15. When the result of step S17 is yes, the process proceeds to step S18. When the result of step S17 is "no", the process proceeds to step S19.
In step S18, the distance D is set to "0". The process proceeds to step S20.
In step S19, the distance D is set to be the distance between the center point of each sub-pixel extracted in step S16 and one of the points on the outline of the stroke that has the same X-coordinate value as the center point and is closest thereto.
In step S20, with reference to the Y-direction correction table 82b, a first pixel level is set in accordance with the distance D set in step S18 or step S19 and the Y-direction line width of the stroke obtained in step S11.
Next, in step S21, for sub-pixels located in the vicinity of each sub-pixel extracted in step S16 in the X direction, a second pixel level is set in accordance with the first pixel level set in step S20 and the X-direction line width of the stroke obtained in step S11 with reference to the X-direction correction table 83 b. It should be noted that when the higher second pixel level has been set, no update is performed.
In step S22, luminance data corresponding to the second pixel level of the sub-pixel set in step S21 is transmitted to the display device 2.
In step S23, it is determined whether steps S15 to S22 have been completed for all strokes contained in the character. If the result of the determination is "no", the process returns to the processing in step S15. If the result of the determination is "YES," the process ends.
As described above, according to embodiment 1 and embodiment 2, the control section 3 controls and sets the color element level of the sub-pixel according to the distance between the center of the sub-pixel and at least one point included in the stroke and the line width set for the stroke, thereby enabling display of a character on the display screen of the display device 2. As a result, the longitudinal resolution of the sub-pixels can be improved appropriately, and the line width of the character can be changed freely without requiring a large amount of working memory.
Although not specified in embodiment 1 or 2, the color element level of the sub-pixel may be controlled so as to be set in accordance with at least one of the distance between the center of the sub-pixel and at least one point included in the stroke and the line width set for the stroke, whereby a character can be displayed on the display screen of the display device 2. For example, the color element level of the sub-pixel may be controlled so as to be set according to the distance between the center of the sub-pixel and two points included in the stroke, or alternatively, may be controlled and set according to only the line width.
Industrial applicability
According to the present invention, a plurality of color element levels corresponding to a plurality of sub-pixels are controlled according to the positional relationship between the sub-pixels and the strokes. Thus, characters can be displayed quickly and with high definition without requiring a large amount of working memory.
Further, a plurality of color element levels corresponding to a plurality of sub-pixels are controlled according to the line width of the stroke. Thus, the character can be freely displayed with high definition while changing the character width.

Claims (23)

1. A character display apparatus for displaying a character on a screen based on stroke data containing character information, the character display apparatus comprising:
a control section for setting a color element level of a sub-pixel overlapping a basic portion of the character based on a distance between a center of the sub-pixel and at least one point included in the stroke, and a line width set for the stroke or one of them.
2. The character display apparatus according to claim 1, wherein at least one point included in the stroke is on a straight line with a center of the sub-pixel in a direction perpendicular to a direction in which a plurality of sub-pixels constituting the pixel are adjacent to each other.
3. The character display apparatus according to claim 1, wherein the control section sets the sub-pixel color element level smaller as the distance increases.
4. The character display apparatus according to claim 1, wherein the control section sets a color element level of the sub-pixel according to a line width in at least one of an X direction and a Y direction set for the stroke, and
where the X direction denotes a direction along a direction in which a plurality of sub-pixels constituting a pixel are adjacent to each other, and the Y direction denotes a direction perpendicular to the X direction.
5. The character display apparatus according to claim 1, wherein the control section sets the color element level of the sub-pixel to a predetermined value when the distance is within a predetermined range.
6. The character display apparatus according to claim 1, characterized by comprising: a display section including a plurality of display pixels arranged in a matrix on a screen, each of the plurality of display pixels including a plurality of sub-pixels arranged in a predetermined direction and associated with a plurality of respective color elements,
wherein the control section controls display of the character on the screen by controlling levels of a plurality of color elements associated with the plurality of sub-pixels, respectively, according to the stroke data.
7. The character display apparatus according to claim 1, characterized by comprising: a storage section for storing a table associating at least one of a distance between a center of a subpixel and at least one point included in a stroke and a line width set for the stroke with a color element level of the subpixel,
wherein the control section sets the color element level of the sub-pixel according to information contained in the table.
8. The character display apparatus according to claim 1, wherein the control section sets the color element level of the sub-pixel in the vicinity of the sub-pixel having the set color element level, based on the distance between the sub-pixels and the set color element level.
9. The character display apparatus according to claim 8, characterized by comprising: a storage section for storing a table associating a distance between the sub-pixel having the set color element level and a neighboring sub-pixel, and the set color element level and a color element level of the neighboring sub-pixel,
wherein the control section sets the color element level of the nearby sub-pixel based on the information contained in the table.
10. The character display device according to claim 1, wherein the stroke data is skeleton data representing a skeleton shape of a character or character outline information representing an outline shape of a character.
11. A character display apparatus for displaying a character on a screen based on stroke data containing character information, the character display apparatus comprising:
a control section for setting a color element level of the sub-pixel within a predetermined range based on a distance between a center of the sub-pixel and at least one point included in the stroke, and a line width or one of the line widths set for the stroke.
12. The character display apparatus according to claim 11, wherein the control section sets the color element levels of the sub-pixels within the predetermined range according to a predetermined table defining the color element levels of the sub-pixels within the predetermined range and the distance.
13. The character display apparatus according to claim 11, wherein at least one point included in the stroke is on a straight line with a center of the sub-pixel in a direction perpendicular to a direction in which a plurality of sub-pixels constituting the pixel are adjacent to each other.
14. The character display apparatus according to claim 11, wherein the control section sets the sub-pixel color element level smaller as the distance increases.
15. The character display apparatus according to claim 11, wherein the control section sets the color element level of the sub-pixel in accordance with a line width in at least one of an X direction and a Y direction set for the stroke, wherein the X direction represents a direction along a direction in which a plurality of sub-pixels constituting the pixel are adjacent to each other, and the Y direction represents a direction perpendicular to the X direction.
16. The character display apparatus according to claim 11, wherein the control section sets the color element level of the sub-pixel to a predetermined value when the distance is within a predetermined range.
17. The character display apparatus according to claim 11, characterized by comprising: a display section including a plurality of display pixels arranged in a matrix on a screen, each of the plurality of display pixels including a plurality of sub-pixels arranged in a predetermined direction and associated with a plurality of respective color elements,
wherein the control section controls display of the character on the screen by controlling levels of a plurality of color elements associated with the plurality of sub-pixels, respectively, according to the stroke data.
18. The character display apparatus according to claim 11, characterized by comprising: a storage section for storing a table associating at least one of a distance between a center of a subpixel and at least one point included in a stroke and a line width set for the stroke with a color element level of the subpixel,
wherein the control section sets the color element level of the sub-pixel according to information contained in the table.
19. The character display apparatus according to claim 11, wherein the control section sets the color element level of the sub-pixel in the vicinity of the sub-pixel having the set color element level, based on the distance between the sub-pixels and the set color element level.
20. The character display apparatus according to claim 19, characterized by comprising: a storage section for storing a table associating a distance between the sub-pixel having the set color element level and a neighboring sub-pixel, and the set color element level and a color element level of the neighboring sub-pixel,
wherein the control section sets the color element level of the nearby sub-pixel based on the information contained in the table.
21. The character display device according to claim 11, wherein the stroke data is skeleton data representing a skeleton shape of a character or character outline information representing an outline shape of a character.
22. A character display method for displaying a character on a screen based on stroke data containing character information, the character display method comprising: a step of obtaining a distance between a center of a sub-pixel overlapping a basic portion of the character and at least one point included in the stroke, and a step of obtaining a line width set for the stroke or one of the above two steps; and a step of setting the color element level of the sub-pixel based on one or both of the obtained distance and line width.
23. A character display method for displaying a character on a screen based on stroke data containing character information, the character display method comprising: a step of obtaining a distance between the center of a sub-pixel within a predetermined range and at least one point included in the stroke, and a step of obtaining a line width set for the stroke, or one of the two steps; and a step of setting the color element level of the sub-pixel based on one or both of the obtained distance and line width.
HK07100498.0A 2003-07-03 2004-07-01 Character display apparatus and character display method HK1093591B (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2003191436A JP4079268B2 (en) 2003-07-03 2003-07-03 Character display device, character display method, character display program, and readable recording medium
JP2003-191436 2003-07-03
PCT/JP2004/009344 WO2005004105A1 (en) 2003-07-03 2004-07-01 Character display apparatus, character display method, character display program, and recording medium

Publications (2)

Publication Number Publication Date
HK1093591A1 HK1093591A1 (en) 2007-03-02
HK1093591B true HK1093591B (en) 2009-07-31

Family

ID=

Similar Documents

Publication Publication Date Title
US6542161B1 (en) Character display apparatus, character display method, and recording medium
US7006096B2 (en) Character display apparatus, character display method, and recording medium
KR100432288B1 (en) Graphic display apparatus, character display apparatus, display method, and recording medium
US7148893B2 (en) Automatic optimization of the position of stems of text characters
EP1203351B1 (en) System for rapidly performing scan conversion with anti-aliasing upon outline fonts and other graphic elements
JP3552094B2 (en) Character display device, character display method, and recording medium
JP4079268B2 (en) Character display device, character display method, character display program, and readable recording medium
JP2003248476A (en) Character display device, character display method, control program for controlling the character display method, and recording medium storing the control program
CN100380438C (en) Display apparatus, information display method, and information apparatus
HK1093591B (en) Character display apparatus and character display method
KR101666131B1 (en) Vector Font Rendering with considering sub-pixel pattern
HK1089543A (en) Character display apparatus, character display method, character display program, and recording medium
JP4667464B2 (en) Image information generating apparatus, image information generating method, image information generating program, and recording medium
HK1115469B (en) Display apparatus and information apparatus
HK1081313B (en) Character display apparatus and character display method
HK1118632B (en) Graphic display apparatus, character display apparatus, display method, recording medium, and program