|
Description  |
|
|
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates in general to an apparatus for converting
outline data representative of the outline of characters such as letters
and symbols and other visible representations, into dot data
representative of image dots to be reproduced so as to collectively define
the visible representations in a matrix of dots. More particularly, the
invention is concerned with such a data converting apparatus capable of
converting the outline data into dot data such that the outlines of the
reproduced characters have smoothed curved portions.
2. Discussion of the Prior Art
Visible representations or characters such as letters, symbols and numerals
represented by character data are printed, displayed or otherwise
reproduced according to the character data suitably processed by a
computer. In this field of data processing, it is widely practiced to use
dot data indicative of whether an image dot is to be formed at each of
picture elements which are the smallest part of a picture image and which
determine the resolution of the reproduced image. If a batch of dot data
representative of all the characters available for reproduction is
prepared and stored in a character data memory, the memory should have an
extremely large storage capacity. It is therefore desirable to store in
the character memory a batch of outline data representative of the
outlines of the characters, and convert the outline data into the
corresponding dot data by suitable data converting means, when the
characters are printed, displayed or otherwise outputted. An example of
such data converting means is disclosed in Japanese Patent Publication No.
53-41017.
For converting the outline data into dot data as indicated above, the
outline of each character represented by the outline data is superimposed
on a coordinated pixel screen in which picture elements are defined by a
plurality of pixel lines parallel to the X axis and a plurality of pixel
lines parallel to the Y axis perpendicular to the X axis. The outline data
is converted into dot data such that bits of the dot data are set to
indicate the presence of image dots at the picture elements which are
located within the outline of a character on the screen, so as to satisfy
a predetermined condition. For instance, image dots are placed at the
picture elements whose centers lie within the character outline.
The outline of each character consists of two or more straight or curved
segments which represent one or more stroke of the character. However, the
number and positions of image dots to be reproduced for a certain stroke
of a character according to the dot data prepared by conversion from the
outline data may undesirably vary, depending upon the positions of the
outline segments defining the character stroke, relative to the pixel
screen, i.e., depending upon the position at which the character in
question is reproduced. This tendency is high especially for curved
strokes of characters (curved segments of the character outlines).
FIG. 6 shows a letter "O" consisting of a stroke whose outline includes an
outer loop 46 which consists of four curved segments. These curved
segments have maximal and minimal points 11 as viewed in the x-axis and
y-axis directions. As shown in the figure, image dots are formed at the
picture elements corresponding to the maximal and minimal points 11, while
image dots are not formed at the picture elements along the portions of
the curved segments which are near the maximal and minimal points 11. This
results in discontinuous or rugged external profile of the letter "O",
giving an unpleasant appearance of the letter "O" as defined by the image
dots formed according to the dot data prepared by conversion from the
original outline data. The same phenomenon may occur for an inner loop 47
of the outline of the letter "O", which consists of four curved segments.
For example, an image dot may not be formed at the picture element
corresponding to each of the maximal and minimal points of the curved
segments, while image dots are formed at the neighboring picture elements
along the curved segments. The rugged profile of a character is perceived
particularly where the width of the character stroke or strokes is
relatively small, that is, where the number of the successive image dots
which define the character stroke is relatively small. Even for a
character having a relatively large stroke width, however, the local
presence or absence of image dots at and near the maximal and minimal
points of the curved segments of the stroke outline causes an unpleasant
appearance of the reproduced character, as if the reproduced character was
spotted by dust or dirt at its outline.
SUMMARY OF THE INVENTION
It is therefore an object of the present invention to provide a data
converting apparatus capable of converting outline data of characters into
dot data such that the outline of a character reproduced according to the
dot data has smoothed curved portions.
The above object may be accomplished according to the principle of the
present invention, which provides a data converting apparatus having dot
data preparing means for converting a batch of original outline data
representative of an outline of a character into a batch of dot data
indicative of the presence of image dots to be formed at positions of
picture elements which lie within the outline of the character so as to
satisfy a predetermined condition, when the outline of the character is
superimposed on a coordinated pixel screen wherein the picture elements
are defined by a plurality of parallel x-axis pixel lines and a plurality
of parallel y-axis pixel lines perpendicular to the x-axis pixel lines,
the outline consisting of at least one segment, the apparatus including:
(a) calculating means for calculating a coordinate value of a maximal or
minimal point of the at least one segment of the outline of the character
in an x-axis or y-axis direction; and (b) outline moving means responsive
to the calculating means, for moving the outline such that the coordinate
value of the maximal or minimal point has a predetermined positional
relationship with the pixel lines. The dot data preparing means prepares
the dot data, according to the outline data representative of the outline
moved by the outline moving means.
In the data converting apparatus of the present invention constructed as
described above, the outline of a character represented by the original
outline data is moved by the outline moving means such that the coordinate
value of a maximal or minimal point calculated by the calculating means
has a predetermined positional relationship with the pixel screen, that
is, with respect to the pixel lines. Since the number of the picture
elements which lie within the outline of the character changes as the
outline is moved, the positions of the image dots to be formed according
to the dot data prepared by conversion from the outline data can be
changed by moving the character outline, so that the character as
reproduced according to the dot data has a smooth or continuous profile at
and near the maximal and/or minimal points, without an image dot or dots
projecting from the nominal character outline, or without an image dot or
dots being absent so as to cause indented portions at or near the maximal
and/or minimal points of the character outline.
Usually, the predetermined condition indicated above in connection with the
picture elements at which image dots are to be formed requires the center
of the picture elements to be located within the outline of the character.
In this case, the outline moving means is adapted to change the original
outline data so as to move the outline by a distance not exceeding a size
of the picture elements, so that the predetermined positional relationship
of the maximal or minimal point with the pixel lines is met. The size of
the picture element is defined by a spacing of the pixel lines.
Preferably, the predetermined positional relationship requires the
coordinate value of the maximal or minimal point of the outline moved by
the outline moving means to have a decimal fraction between 0.3 and 0.7,
while the pixel lines define coordinate values represented by integers. If
the decimal fraction is set at 0.5, for example, the coordinate values of
4.9 and 5.1 of the original maximal or minimal point are changed to 4.5
and 5.5, respectively, for example, to move the original character
outline.
Where the outline of the character includes a Bezier curve, the outline
moving means may be adapted to move the outline such that the maximal or
minimal point of the Bezier curve is moved so as to meet the predetermined
positional relationship with the pixel lines, and divide the Bezier curve
into two curves such that the two curves are connected to each other at
the maximal or minimal point which has been moved.
In one preferred arrangement of the invention, the outline moving means
includes means for finding any points which define the character outline
and which have a coordinate value whose difference from the coordinate
value of the maximal or minimal point calculated by the calculating means
falls within a predetermined range, for example, between 0 and 0.5, and
the outline moving means is adapted to move the above points to the
coordinate value to which the maximal and minimal point is moved so as to
meet the predetermined positional relationship with the pixel lines.
BRIEF DESCRIPTION OF THE DRAWINGS
The above and optional objects, features and advantages of the present
invention will be better understood by reading the following detailed
description of a presently preferred embodiment of the invention, when
considered in connection with the accompanying drawings, in which:
FIG. 1 is a schematic block diagram showing a control system of a laser
printer, which incorporates one embodiment of a data converting apparatus
of the present invention;
FIG. 2 is a schematic illustration of a central processing unit of the
control system of the laser printer of FIG. 1;
FIGS. 3A, 3B and 3C are flow charts illustrating a data converting
operation performed according to control programs stored in a program ROM
of the data converting apparatus;
FIG. 4 is a view showing an alphabetic letter "O" whose outline data is
converted into dot data by the data converting apparatus;
FIGS. 5A and 5B are views indicating original and changed outline data
stored in an outline data memory of the control system;
FIG. 6 is a view illustrating the letter "O" as superimposed on a
coordinated pixel screen;
FIGS. 7A and 7B are views explaining different image dot arrangements
depending upon the relative position of the outline of a character
relative to the printing position of the character;
FIGS. 8A and 8B are views explaining a movement of a curved outline segment
of a character in the x-axis direction;
FIGS. 9A and 9B are views explaining a movement of a curved outline segment
of a character in the y-axis direction;
FIG. 10 is a view showing each curved segment of the outline of the letter
"O", as divided into two curves;
FIG. 11 is a view showing the dot arrangement of the letter "O" as
superimposed on the pixel screen, according to the outline data changed
according to the principle of the invention; and
FIGS. 12A and 12B are views explaining a manner of defining a Bezier curve,
and division of the Bezier curve.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
Referring first to FIG. 1 showing a part of a control system of a laser
printer incorporating a data converting apparatus embodying the present
invention, the control system is principally constituted by a
microcomputer 10, which includes a CPU (central processing unit) 12, a
CHARACTER ROM (read-only memory) 14, a PROGRAM ROM (read-only memory) 16,
a TEXT memory 18, a WORKING memory 20, an OUTLINE DATA memory 22, and a
DOT DATA memory 24. These elements of the microcomputer 10 are
interconnected to each other through a data bus 28. To the bus 28, there
are connected an input device 30 and a printing device 32. The input
device 30 is provided to load the microcomputer 10 with data necessary for
printing, while the printing device 32 is constructed to effect laser
printing according to commands and signals from the microcomputer 10. The
present laser printer has image resolving power of 300 dots per inch.
As schematically indicated in FIG. 2, the CPU 12 has a data reading portion
36 for reading outline data from the CHARACTER ROM 14, an outline data
changing portion 38 for changing portions of the outline data which
represent curved segments of the character outlines, and a dot data
preparing portion 40 for converting the outline data into dot data. The
TEXT memory 18 stores a batch of character data in the form of code data
indicative of a text entered through the input device 30, and the WORKING
memory 20 stores data necessary for the microcomputer 10 to execute
various control programs stored in the PROGRAM memory 16. The OUTLINE DATA
memory 22 is provided to store the original outline data, and data
necessary to change the portions of the original outline data which
represent curved segments of the characters. FIGS. 5A and 5B show the
contents of the OUTLINE DATA memory 22. More specifically, the OUTLINE
DATA memory 22 stores the number Nx of the maximal and minimal points of
each curved segment in the x-axis direction of the outline of a character,
the total number Sx of the maximal and minimal points in the x-axis
direction of all the curved segments of the character outline, a plurality
of sets of x-axis coordinate data 81 of the points defining the original
curved segments, and a plurality of sets of x-axis coordinate data 82 for
moving the original curved segments. The data sets 82 correspond to the
data sets 81. The OUTLINE DATA memory 22 also stores the number Ny of the
maximal and minimal points of each curved segment in the y-axis direction
of the outline of the character, the total number Sy of the maximal and
minimal points in the y-axis direction of all the curved segments of the
character outline, a plurality of sets of y-axis coordinate data 83 of the
points defining the original curved segments, and a plurality of sets of
y-axis coordinate data 84 for moving the original curved segments. The
data sets 84 correspond to the data sets 83. The DOT DATA memory 24 stores
dot data prepared by the dot data preparing portion 40.
The CHARACTER ROM 14 stores multiple batches of outline data representative
of the outlines of multiple characters such as alphabetic letters and
symbols. The outline of each character consists of one or more stroke 44,
as shown in FIG. 4 with respect to alphabetic letter "O" for illustrative
purpose only. In this case, the outline of the stroke 44 consists of an
outer loop 46 and an inner loop 47. The outline data representative of a
character include coordinates of points which define individual segments
of each stroke, and segment identifying data indicative of the kind of
each segment (straight segment or curved segment). The character outline
is defined in an X-Y coordinate system having 1000 Y-axis positions taken
along the Y axis (vertical axis), and 1000 X-axis positions taken along
the X axis (horizontal axis), as indicated in FIG. 4. For a straight
stroke of a character as in letter "H", the x-axis and y-axis coordinate
values of the points defining the straight segments representative of the
straight stroke are stored in the CHARACTER ROM 14. For a curved stroke of
a character as in letter "O", the coordinate values of points defining
third-order curves called Bezier curves representative of the curved
stroke are stored in the ROM 14. Each Bezier curve is defined by four
points. In the case of letter "O" shown in FIG. 4, the outline of the
single stroke 44 consists of a total of four Bezier curves, i.e., two
Bezier curves for each of the outer and inner loops 46 and 47. Black dots
in FIG. 4 indicate the points which define the Bezier curves (curved
segments of the outline of the stroke 44). Dashed lines in the same figure
indicate control arms, which will be described in detail. It will be
understood that curved segments of the outlines of character strokes may
be represented by other curves such as circular arcs, elliptical arcs,
spline curves and B-spline curves. However, it is desirable to use curves
that can be easily calculated for defining curved segments or portions of
the character strokes. The CHARACTER ROM 14 stores sets of outline data of
each character available, which represent the coordinates of the segments
of each stroke outline, and the segment identifying data indicative of the
kind of each segment (straight or curved segment). The segments of the
character outline are stored one after another in one direction along the
closed loop of the outline, together with the data which indicates whether
the segments define the outer loop or inner loop.
Referring to FIGS. 12A and 12B, there will be described the mathematical
definition of a third-order Bezier curve, and the features of this curve.
As indicated in FIG. 12A, a cubic Bezier curve P (hereinafter referred to
simply as "curve") is defined by four points Q.sub.0, Q.sub.1, Q.sub.2 and
Q.sub.3 on a two-dimensional plane. A given point P(t) on the curve (where
0.ltoreq.t.ltoreq.1) is expressed by the following equation (1):
##EQU1##
Since P(0)=Q.sub.0, and P(1)=Q.sub.3, according to the above equation (1),
the curve P has the point Q.sub.0 as the start point, and the point
Q.sub.3 as the end point. The points Q.sub.1 and Q.sub.2 which do not lie
on the curve P are called control points, since these points control the
configuration of the curve P.
The following equation (2) for calculating maximal and minimal points of
the curve P is obtained by differentiating the above equation (1) by a
variable t:
P'(t)=(-3Q.sub.0 +9Q.sub.1 -9Q.sub.2 +3Q.sub.3)t.sup.2 +(6Q.sub.0
-12Q.sub.1 +6Q.sub.2)t+(-3Q.sub.0 +3Q.sub.1) (2)
A maximal or minimal point of the curve P is obtained where
0.ltoreq.t.ltoreq.1, and P(t)=0. The maximal and minimal points (Pt) of
the curve P in the x-axis and y-axis directions are obtained by using the
following equations for the value t in the above equation (2):
(Ax, Ay)=A=-3Q.sub.0 +9Q.sub.1 -9Q.sub.2 +3Q.sub.3
(Bx, By)=B=6Q.sub.0 -12Q.sub.1 +6Q.sub.2
(Cx, Cy)=C=-3Q.sub.0 +3Q.sub.1
The following equation (3) is used as a discriminant for the maximal and
minimal points in the x-axis direction:
Dx=Bx.sup.2 -4AxCx (3)
It will be understood that no maximal or minimal points in the x-axis
direction exists, at least where Dx<0, or where Ax=0. Where Dx.ltoreq.0,
the following equations (4) are established:
tx.sub.1 =(-Bx+SQRT(Dx))/(2Ax)
tx.sub.2 =(-Bx-SQRT(Dx))/(2Ax) (4)
Therefore, it will be understood that the curve P does not have maximal or
minimal points, where the range of two points tx.sub.1 and tx.sub.2 do not
fall within the range of 0.ltoreq.t.ltoreq.1. In the equation (4), SQRT
designates a square root.
As a discriminant for the maximal and minimal points in the y-axis
direction, the following equation (5) is used:
Dy=By.sup.2 -4AyCy (5)
It will be understood that no maximal or minimal points in the y-axis
direction exists, at least where Dy<0, or where Ay=0. Where Dy.gtoreq.0,
the following equations (6) are established:
ty.sub.1 =(-By+SQRT(Dy))/(2Ay)
ty.sub.2 =(-By-SQRT(Dy))/(2Ay) (6)
Therefore, it will be understood that the curve P does not have maximal or
minimal points, where the range of two points ty.sub.1 and ty.sub.2 do not
fall within the range of 0.ltoreq.t.ltoreq.1.
Since P'(0)=3(Q.sub.1 -Q.sub.0) and P'(1)=3(Q.sub.3 -Q.sub.2), the angle of
inclination of segment Q.sub.0 -Q.sub.1 is equal to that of the curve P at
point Q.sub.0. Accordingly, the configuration of the curve P can be
approximated by the angles of inclination of segments Q.sub.0 -Q.sub.1 and
Q.sub.3 -Q.sub.2. In this respect, these segments are called the control
arm of the curve P.
Referring to FIG. 12B, there will be described a manner of dividing the
curve P into a plurality of divided curves P, for moving the maximal or
minimal point of the original curve P. In the figure, a curve Pi between
points ti and ti+.sub.1 is represented by four points Q.sub.0, Q.sub.1,
Q.sub.2 and Q.sub.3 which define the curve P, where ti<ti+.sub.1, and
ti.noteq.ti+.sub.1. Four points Q.sub.0.sup.(i), Q.sub.1.sup.(i),
Q.sub.2.sup.(i) and Q.sub.3.sup.(i) define a curve Pi(u), where
0.ltoreq.u.ltoreq.1. It will be understood from the equation (1) that
Q.sub.0.sup.(i) =P(ti), and Q.sub.3.sup.(i) =P(ti+.sub.1). By substituting
"t" in the above equation (1) according to the equation u=(t-ti)/(ti+1-ti)
for parameter conversion, Pi(u) is obtained as follows:
##EQU2##
where, t.sub.11 =(1-ti).sup.3
t.sub.12 =(1-t).sup.2 ti
t.sub.13 =(1-ti)ti.sup.2
t.sub.14 =ti.sup.3
t.sub.21 =(1-ti).sup.2 (1-ti+.sub.1)
t.sub.22 =(1-ti){ti+.sub.1 -(3ti+.sub.1 -2)ti}
t.sub.23 =ti{2ti+.sub.1 -(3ti+.sub.1 -1)ti}
t.sub.24 =ti.sup.2 ti+.sub.1
t.sub.31 =(1-ti)(1-ti+.sub.1).sup.2
t.sub.32 =(1-ti+1) {2ti+.sub.1 -(3ti+.sub.1 -1)ti}
t.sub.33 =ti+.sub.1 {ti+.sub.1 -(3ti+.sub.1 -2)ti}
t.sub.34 =titi+.sub.1.sup.2
t.sub.41 =(1-ti+.sub.1).sup.3
t.sub.42 =(1-ti+.sub.1).sup.2 ti+.sub.1
t.sub.43 =(1-ti+.sub.1)ti+.sub.1.sup.2
t.sub.44 =ti+.sub.1.sup.3
Therefore, the following equations (7) are obtained:
Q.sub.i.sup.(i) =t.sub.21 Q.sub.0 +t.sub.22 Q.sub.1 +t.sub.23 Q.sub.2
+t.sub.24 Q.sub.3
Q.sub.2.sup.(i) =t.sub.31 Q.sub.0 +t.sub.32 Q.sub.1 +t.sub.33 Q.sub.2
+t.sub.34 Q.sub.3 (7)
Thus, the control points Q.sub.1.sup.(i) and Q.sub.2.sup.(i) of the curve
Pi can be obtained. In the manner described above, the coordinate values
of the maximal and minimal points of a Bezier curve can be calculated, and
the curve is divided at each maximal or minimal point into two curved
segments (Bezier curves). The above equations (3) through (7) are used to
calculate the value t, and the calculated values t are ordered from the
smallest to the largest, as ti(i=1 through j-1). Where no maximal or
minimal points are found on a Bezier curve, the curve is not divided. The
value j is equal to (total number of the maximal and minimal points plus
1), and t.sub.0 =0, and tj=1.
The conversion of outline data into dot data according to the data
converting apparatus of the present laser printer is effected by using a
two-dimensional coordinated pixel screen 52 as shown in FIG. 6, on which
the outline 46 of a character as represented by outline data is
superimposed for preparing the dot data by conversion from the outline
data. The pixel screen 52 consists of a multiplicity of picture elements,
which are the smallest parts of a printed picture image available on the
laser printer. The picture elements are defined by equally spaced-apart
x-axis and y-axis pixel lines which are perpendicular to each other. In
the present embodiment, each picture element has a circular form whose
center lies on an intersection of the appropriate x-axis and y-axis pixel
lines. The position of the picture element is represented by the x-axis
and y-axis coordinate values of these two pixel lines. The picture
elements may take other forms such as a rectangle. Dot data is prepared
based on the outline data such that data bits are set to indicate whether
or not an image dot is to be formed at each of the picture elements or
not.
The coordinated pixel screen 52 corresponds to a printing area on a
recording medium within which laser printing is effected according to the
prepared dot data. In the interest of brevity and simplification, FIG. 6
shows a portion of the coordinated pixel screen 52, which corresponds to
one character of a text to be printed on the recording medium. The x-axis
and y-axis pixel lines are numbered over the entire area of the screen 52.
It will be understood that the picture elements corresponding to the other
characters (not shown in FIG. 6) of the text are represented by the x-axis
and y-axis pixel lines which are appropriately numbered. The numbers
identifying these pixel lines are larger than those for the character
indicated in FIG. 6, namely, letter "O".
The conversion of the outline data into the corresponding dot data is
effected with the outline of the character superimposed on the coordinated
pixel screen 52, so that an image dot is formed at each picture element of
the screen 52 which lies within the area defined by the outline of the
character. This area is hereinafter simply called "outline of the
character". The logical value of the dot data bit corresponding to the
picture element at which an image dot is to be formed is set to "1". Each
picture element lies entirely or partially within the outline, or is
entirely outside the outline In the present embodiment, dot data bits are
set to "1" for those picture elements whose center lies within the
outline.
The present laser printer is adapted to print characters in a selected one
of different sizes, namely, 6.48 point, 10 point, 12 point, 20 point, 24
point and 30 point, for example. According to the selected character size,
the coordinates of the points defining the outline of the character in the
1000.times.1000 coordinate system of FIG. 4 are converted into the
corresponding coordinate values on the coordinated pixel screen 52 of FIG.
6 in which each picture element is dimensioned as "1" in the x-axis and
y-axis directions. If a character of a selected point size is formed by a
C.times.C matrix of picture elements (dots), the coordinate values of a
point on the pixel screen 52 are obtained by multiplying the coordinate
values of the corresponding point on the character outline in the
1000.times.1000 coordinate system, by C/1000. In this example, the
selected character size is 6.48 point, and each character is formed by a
27.times.27 matrix of picture elements or dots. The numbers 0 through 25
given on the pixel screen 52 in FIG. 6 to identify the x-axis and y-axis
pixel lines represent the coordinate values on the screen 52 in the
present example. To superimpose the outline of each character on the pixel
screen 52, the coordinate values of the reference point of the character
on the screen 52 are determined, based on the printing position data.
According to the determined coordinates of the reference point as well as
the calculated coordinates of the character outline, the character outline
is positioned on the pixel screen 52 of FIG. 6.
The position of the outline of a character on the pixel screen 52 is
influenced by the selected size and printing position of the character, as
indicated above. Consequently, the number of the picture elements which
lie within the width of the stroke 44 (FIG. 4) in the x-axis or y-axis
direction may vary depending upon the selected character size and the
relative position between the character outline (outline of the stroke 44)
and the pixel screen 52. This causes a discontinuous or rugged profile of
the stroke 44 as reproduced by image dots formed according to the dot data
prepared by conversion from the outline data. This tendency is high
particular at and near the maximal and minimal points 11 (FIG. 6) in the
x-axis and y-axis directions of the curved segments of the stroke outline.
For example, the number of picture elements (image dots) whose centers are
inside the outer loop 46 of the outline of the stroke 44 and lie on the
y-axis pixel line (vertical column) nearest to the minimal point 11 of the
curved segment of the stroke outline may vary as indicated in FIGS. 7A and
7B, which show a part of the pixel screen 52. More specifically, a
vertical column of five image dots is formed on the pixel line nearest to
the minimal point 11 as shown in FIG. 7B, giving a smoothed profile to the
stroke, while only one image dot is formed on the pixel line nearest to
the minimal point 11, as shown in FIG. 7A, causing discontinuity of the
outer profile of the stroke.
In the present laser printer having the data converting apparatus
constructed according to the principle of the present invention, the
portions of the outline data which represent curved segments of the
outline of a character stroke are changed or modified, if necessary,
before the outline data is converted into dot data, where the selected
character size is larger than 2-point size, so that the character stroke
can be printed in the matrix of dots, always with a smoothed or continuous
profile even at and near the maximal and minimal points of the curved
segments of the stroke outline. To this end, the control programs stored
in the PROGRAM ROM 16 for controlling a laser printing operation include a
data converting routine of FIG. 3A, which comprises an outline moving
routine of FIGS. 3B and 3C. Referring to the flow charts of FIGS. 3A, 3B
and 3C, the data converting routine will be described with respect to the
outline of alphabetic letter "O". However, no detailed description on the
manner of printing according to the dot data will be provided, since it is
not necessary to the understanding of the principle of the present
invention. Briefly, a text stored in the TEXT memory 18 is printed one
page after another. Each time a page is printed, character data
corresponding to that page of the text is retrieved from the TEXT memory
18, and the corresponding batch of outline data is retrieved from the
CHARACTER ROM 14 and is converted into the corresponding batch of dot
data.
Initially, step S1 is executed to activate the data reading portion 36 for
reading out the outline data of the letter "O", and the data indicative of
the selected character size. In this step S1, the outline data is changed
to the selected character size. For instance, where the selected character
size is 6.48 point, the coordinate values of the original outline data are
multiplied by 0.027. The control flow then goes to step S2 to determine
whether the selected character size is larger than 2-point size, or not. A
negative decision (NO) is obtained in step S2, if the selected character
size is 2-point or smaller. In this case, step S2 is followed by step S3
in which the data representative of any curved segments of the character
outline is converted into straight segment data which represent a
relatively large number of straight segments which approximate the curved
segments. Then, step S4 is implemented to activate the dot data preparing
portion 40 for preparing dot data based on the outline data such that the
bits of the dot data are set to indicate the presence of image dots at the
picture elements whose centers lie within the outline of the character as
superimposed on the pixel screen 52. The prepared dot data is stored in
the DOT DATA memory 24.
If the selected character size is larger than 2-point size, for example, 20
point, 24 point or 30 point, an affirmative decision is obtained in step
S2, and the control flow goes to step S5 to read out the coordinates of a
point which contributes to defining the segments of the character outline,
and segment identification data indicative of the kind of the segment
(curved or straight segment) defined by the point under consideration.
Step S5 is followed by step S6, in which a segment identifier determines
whether the segment under consideration is a curved segment or not. If the
relevant segment is a straight segment, a negative decision (NO) is
obtained in step S6, and step S12 is implemented to store the relevant
straight segment data into the OUTLINE DATA memory 22. If the relevant
segment is a curved segment, an affirmative decision (YES) is obtained in
step S6, and the control flow goes to step S7 in which the maximal and
minimal points in the x-axis direction of the relevant curved segment are
obtained by calculating tx.sub.1, tx.sub.2 according to the above
equations (3 ) and (4), while the maximal and minimal points in the y-axis
direction are obtained by calculating ty.sub.1, ty.sub.2 according to the
above equations (5) and (6). The number of the x-axis maximal and minimal
points is stored as Nx in the OUTLINE DATA memory 22, as indicated in FIG.
5A, while the number of the y-axis maximal and minimal points is stored as
Ny in the memory 22, as indicated in FIG. 5B. Further, the numbers Nx and
Ny are added to the total numbers Sx and Sy, respectively, to update these
total numbers as the points defining the outline segments are read.
The control flow then goes to step S8 to determine, based on the numbers
Nx, Ny, whether there is any maximal or minimal point, namely, whether
Nx=0 and Ny=0. If Nx=0 and Ny=0, a negative decision (NO) is obtained in
step S8, and the control flow goes to step S11, skipping steps S9 and S10.
In this case, the curved segment data of the relevant curved segment is
stored in the memory 22, without any change. If any maximal or minimal
point is found in step S8, step S9 is executed to order the values of the
variable tx, ty calculated in step S7, from the smallest to the largest,
and temporarily store these values tx, ty in the WORKING memory 20. Then,
in the same step S9, the x-axis coordinates of the maximal and minimal
points in the x-axis direction are calculated by using the variable tx in
the above equation (1), and the calculated x-axis coordinates are stored
in the memory 22, as indicated at 81 in FIG. 5A. Similarly, the y-axis
coordinates of the maximal and minimal points in the y-axis direction are
calculated by using the variable ty in the equation (1), and the
calculated y-axis coordinates are stored in the memory 22, as indicated at
83 in FIG. 5B. These coordinate values are those of the original outline
data, and are used in steps S23 and S33 in the outline moving routine of
FIGS. 3B and 3C, to identify the points of the curved segments which are
to be moved. Subsequently, the data for moving the relevant curved segment
is obtained based on the original curved segment data, and dependin | | |