JP2903531B2 - Data converter - Google Patents
Data converterInfo
- Publication number
- JP2903531B2 JP2903531B2 JP1054577A JP5457789A JP2903531B2 JP 2903531 B2 JP2903531 B2 JP 2903531B2 JP 1054577 A JP1054577 A JP 1054577A JP 5457789 A JP5457789 A JP 5457789A JP 2903531 B2 JP2903531 B2 JP 2903531B2
- Authority
- JP
- Japan
- Prior art keywords
- line
- line width
- data
- display
- pixel
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
- 239000000470 constituent Substances 0.000 claims description 27
- 238000006243 chemical reaction Methods 0.000 claims description 13
- 230000009467 reduction Effects 0.000 claims description 2
- 238000007639 printing Methods 0.000 description 19
- 238000012937 correction Methods 0.000 description 18
- 230000015654 memory Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 9
- 230000001174 ascending effect Effects 0.000 description 5
- 230000033228 biological regulation Effects 0.000 description 3
- 230000003247 decreasing effect Effects 0.000 description 3
- 238000000034 method Methods 0.000 description 3
- 230000003936 working memory Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000007648 laser printing Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
Landscapes
- Controls And Circuits For Display Device (AREA)
- Image Processing (AREA)
Description
【発明の詳細な説明】 産業上の利用分野 本発明は、文字・記号等のキャラクタの輪郭を表すア
ウトラインデータをドットデータに変換するデータ変換
装置に関するものであり、特に、キャラクタを構成する
線の幅の修正に関するものである。Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data conversion device for converting outline data representing the outline of a character such as a character or a symbol into dot data, and more particularly to a data conversion device for converting a line constituting a character. It is about width correction.
従来の技術 文字・記号等キャラクタを表すデータをコンピュータ
を用いて処理し、印字,ディスプレイ表示など何等かの
形で表示する場合、最小処理単位である画素毎にドット
データを形成することが広く行われている。この際、表
示されるキャラクタ全部について予めドットデータを作
成し、メモリに記憶させると極めて容量の大きいメモリ
が必要となるため、特公昭53−41017号公報に記載され
ているようにキャラクタをその輪郭を表すアウトライン
データで記憶させ、印字,ディスプレイ表示等の表示時
にドットデータ設定手段を備えた装置によりドットデー
タに変換することが望ましい。2. Description of the Related Art When data representing characters such as characters and symbols are processed using a computer and displayed in any form such as printing or display, it is widely used to form dot data for each pixel, which is the minimum processing unit. Have been done. At this time, if dot data is created in advance for all the characters to be displayed and stored in the memory, an extremely large memory is required, so that the character is defined by the outline as described in JP-B-53-41017. It is desirable that the data is stored as outline data representing the image data and converted to dot data by a device including dot data setting means at the time of display such as printing and display.
このアウトラインデータをドットデータに変換するに
は画素スクリーンが用いられる。画素スクリーンは、一
平面内において互に直交するX軸とY軸とにそれぞれ平
行な複数ずつのX方向規定線とY方向規定線とにより画
素を規定するものであり、ドットデータ設定手段は、画
素スクリーンにキャラクタの輪郭を重ね合せた場合に、
輪郭内に一定の基準以上の部分が含まれる画素に対応す
るドットデータをドットの存在を表す存在データに設定
するのである。To convert the outline data into dot data, a pixel screen is used. The pixel screen defines pixels by a plurality of X direction defining lines and Y direction defining lines parallel to the X axis and the Y axis orthogonal to each other in one plane, and the dot data setting means includes: When the outline of the character is superimposed on the pixel screen,
The dot data corresponding to the pixel whose outline includes a portion equal to or more than a predetermined reference is set as existence data representing the existence of a dot.
発明が解決しようとする課題 しかし、このようにアウトラインデータをドットデー
タに変換し、キャラクタを表示する場合には、キャラク
タが表示される位置によって同じキャラクタ構成線であ
ってもその内側に一定の基準以上含まれる画素の数,位
置等が異なり、そのキャラクタ構成線の幅、すなわちキ
ャラクタ構成線を幅方向において画定する2本の輪郭線
内に幅方向のいて含まれる画素の数が常に同じになると
は限らない。キャラクタ構成線の幅はデザイナがデザイ
ンする際にキャラクタが見映良く表示される大きさに決
められるのであるが、表示位置によってキャラクタ構成
線の幅が異なり、予定された幅が得られない場合にはキ
ャラクタ全体のバランスが崩れ、見映えが悪くなる。ま
た、キャラクタ構成線が画素スクリーンのX軸方向,Y軸
方向に対して傾斜した傾斜線や曲線の場合には、1本の
キャラクタ構成線において画素スクリーンに重ね合わさ
れる状態が部分的に異なり、その幅が部分的に異なるこ
とが多く、見映良く表示することは容易ではない。However, when outline data is converted to dot data and a character is displayed in this manner, even if the character is composed of the same line depending on the position where the character is displayed, a certain standard is set inside the line. If the number, position, etc. of the pixels included are different, the width of the character constituting line, that is, the number of pixels included in the width direction in two outlines defining the character constituting line in the width direction is always the same. Not necessarily. The width of the character composition line is determined by the size that the character is displayed with good appearance when designing the designer, but the width of the character composition line differs depending on the display position, and if the expected width can not be obtained In this case, the balance of the entire character is lost, and the appearance is deteriorated. In addition, when the character constituent line is an inclined line or a curve inclined with respect to the X-axis direction and the Y-axis direction of the pixel screen, the state in which one character constituent line is superimposed on the pixel screen is partially different. The width is often partially different, and it is not easy to display with good appearance.
本発明は、キャラクタ構成線の実際に表示される幅が
アウトラインデータにより定められた幅に近い大きさと
なるようにアウトラインデータをドットデータに変換す
ることができるデータ変換装置を提供することを課題と
して為されたものである。An object of the present invention is to provide a data conversion device that can convert outline data into dot data so that the width of a character constituent line that is actually displayed is close to the width determined by the outline data. It was done.
課題を解決するための手段 本発明は上記の課題を解決するために、第1図に示す
ように、アウトラインデータによって表されるキャラク
タの輪郭を、互に直交するX軸方向とY軸方向とにそれ
ぞれ平行な複数ずつのX方向規定線およびY方向規定線
により画素を規定する画素スクリーンに重ね合せたと想
定した場合に、キャラクタを構成するキャラクタ構成線
に対応する画素のドットデータをドットの存在を表す存
在データを設定するドットデータ設定手段を備え、アウ
トラインデータをドットデータに変換するデータ変換装
置において、(a)前記キャラクタ構成線を画定する2
本の輪郭線の前記X方向規定線と前記Y方向規定線との
うちの一方の規定線に平行な方向における間隔である目
標線幅と、そのキャラクタ構成線が前記存在データに基
づいて形成されるドットにより表示される表示線幅と
を、複数である前記一方の規定線の各々について比較す
る目標線幅・表示線幅比較手段と、(b)その目標線幅
・表示線幅比較手段による比較の結果、前記一方の規定
線の各々について、目標線幅が表示線幅より第一設定値
以上大きい場合に前記存在データ数を増加させる存在デ
ータ増加と、表示線幅が目標線幅より第二設定値以上大
きい場合に存在データ数を減少させる存在データ減少と
の少なくとも一方を行って、目標線幅と表示線幅との差
を小さくする線幅修正手段とを設けたことを要旨とする
ものである。Means for Solving the Problems In order to solve the above-mentioned problems, the present invention, as shown in FIG. 1, sets the outline of a character represented by outline data in the X-axis direction and the Y-axis direction, which are orthogonal to each other. When it is assumed that pixels are superimposed on a pixel screen that defines pixels by a plurality of X-direction definition lines and a plurality of Y-direction definition lines that are parallel to each other, the dot data of the pixels corresponding to the character configuration lines forming the character are represented by dots. A data conversion device for converting the outline data into the dot data, comprising: (a) defining the character constituent line;
A target line width which is an interval in a direction parallel to one of the X-direction defining line and the Y-direction defining line of the book outline, and a character constituent line thereof are formed based on the existence data. Target line width / display line width comparing means for comparing each of the plurality of one specified lines with the display line width displayed by the dot, and (b) the target line width / display line width comparing means. As a result of the comparison, for each of the one specified line, when the target line width is larger than the display line width by the first set value or more, the presence data increase that increases the number of the presence data, and the display line width is more than the target line width. A gist of the invention is to provide line width correction means for performing at least one of the existing data reduction for reducing the number of existing data when the value is larger than the second set value and reducing the difference between the target line width and the display line width. Things.
作用および効果 キャラクタ構成線を画定する2本の輪郭線のX方向規
定線またはY方向規定線に平行な方向における間隔であ
る目標線幅は、キャラクタを見映良く表示できる線幅で
あるが、この目標線幅と、ドットの形状,大きさ等によ
って大きさが左右される表示線幅とには多少の差が生ず
るのが普通である。したがって、設定値を定め、目標線
幅と表示線幅との間に生ずる差が設定値より大きい場合
に表示線幅を修正して目標線幅との差が小さくなるよう
にすることにより、キャラクタ構成線を目標線幅に近い
幅で表示することができる。特に、本発明においては、
キャラクタ構成線を画定する2本の輪郭線のX方向規定
線とY方向規定線とのうちの一方の規定線に平行な方向
における間隔である目標線幅と、ドットにより表示され
る表示線幅とが、その一方の規定線の各々について、目
標線幅・表示線幅比較手段により比較され、その比較結
果に基づいて、線幅修正手段によりその一方の規定線の
各々について表示線幅が修正されるため、傾斜線,曲線
等の各部についても均一な幅で表示することが可能とな
り、表示品質を向上させることができる。Action and Effect The target line width, which is the distance between two outlines defining the character constituent line in the direction parallel to the X-direction defining line or the Y-direction defining line, is a line width capable of displaying the character with good visibility. Usually, a slight difference occurs between the target line width and the display line width whose size depends on the dot shape, size, and the like. Accordingly, by setting a set value and correcting the display line width when the difference between the target line width and the display line width is larger than the set value so that the difference between the target line width and the target line width becomes small, The constituent lines can be displayed with a width close to the target line width. In particular, in the present invention,
A target line width which is an interval in a direction parallel to one of the X-direction definition line and the Y-direction definition line of the two contour lines defining the character constituent line, and a display line width displayed by dots. Are compared by the target line width / display line width comparing means for each of the one prescribed line, and the display line width is corrected for each of the one prescribed line by the line width correcting means based on the comparison result. Therefore, it is possible to display even portions such as inclined lines and curves with a uniform width, and display quality can be improved.
実施例 以下、レーザプリンタにおいてアウトラインデータを
ドットデータに変換する装置に本発明を適用した場合を
例に取り、図面に基づいて詳細に説明する。Embodiment Hereinafter, a case where the present invention is applied to a device that converts outline data into dot data in a laser printer will be described in detail with reference to the drawings.
第2図はレーザプリンタの制御回路のうち、データ変
換に関する部分を主として示す図である。この制御回路
の主体を成すマイクロコンピュータ部10は、CPU12,キャ
ラクタROM14,プログラムROM16,テキストメモリ18,ワー
キングメモリ20,ドットデータメモリ22,目標座標メモリ
24,表示座標メモリ26,画素指定メモリ27を備えている。
これらCPU12等はバス28により接続されており、バス28
には入力装置30および印字部32が接続されている。入力
装置30は必要なデータをマイクロコンピュータ部10に入
力するものであり、印字部32はマイクロコンピュータ部
10からの指令に基づいてレーザプリント方式により印字
を行う部分である。あお、本レーザプリンタの解像度は
30ドット/インチとする。FIG. 2 is a diagram mainly showing a part related to data conversion in a control circuit of the laser printer. The microcomputer unit 10, which is a main component of the control circuit, includes a CPU 12, a character ROM 14, a program ROM 16, a text memory 18, a working memory 20, a dot data memory 22, and a target coordinate memory.
24, a display coordinate memory 26, and a pixel designation memory 27.
These CPUs 12 and the like are connected by a bus 28.
Is connected to an input device 30 and a printing unit 32. The input device 30 is for inputting necessary data to the microcomputer unit 10, and the printing unit 32 is for inputting necessary data to the microcomputer unit.
This is a part for performing printing by a laser printing method based on a command from 10. Oh, the resolution of this laser printer is
30 dots / inch.
CPU12には、第3図に概念的に示すようにデータ読出
部36,線幅を修正する線幅修正部38,ドットデータをドッ
トの存在を表す存在データに設定するデータ設定部40等
が設けられている。テキストメモリ18は、入力装置30か
ら入力されるコードデータから成る文書データを記憶す
るものであり、ワーキングメモリ20は、プログラム実行
時に必要なデータを記憶するものである。また、ドット
データメモリ22にはデータ設定部40の設定により得られ
るドットデータが記憶され、目標座標メモリ24にはキャ
ラクタ構成線を画定する輪郭線と後述する画素スクリー
ンの画素規定線との交点の座標が記憶される。さらに、
表示座標メモリ26には各画素規定線上においてキャラク
タ構成線を表示する画素の列の両端の座標(画素中心の
座標ではなく、画素の端の座標)が記憶され、画素指定
メモリ27には表示座標メモリ26に記憶された座標を有
し、キャラクタ構成線を表示する画素の位置を指定する
番号が記憶される。As shown conceptually in FIG. 3, the CPU 12 is provided with a data reading unit 36, a line width correcting unit 38 for correcting the line width, a data setting unit 40 for setting the dot data to presence data representing the presence of a dot, and the like. Have been. The text memory 18 stores document data composed of code data input from the input device 30, and the working memory 20 stores data necessary for executing a program. Further, the dot data obtained by the setting of the data setting unit 40 is stored in the dot data memory 22, and the intersection of the contour defining the character constituting line and the pixel defining line of the pixel screen described later is stored in the target coordinate memory 24. The coordinates are stored. further,
The display coordinates memory 26 stores the coordinates of both ends (not the coordinates of the pixel center but the coordinates of the ends of the pixels) of the column of the pixels displaying the character constituent lines on each pixel defining line. A number that has the coordinates stored in the memory 26 and specifies the position of the pixel that displays the character constituent line is stored.
キャラクタROM14には、アルファベットその他の文字
や記号等キャラクタのアウトラインデータが記憶されて
いる。第5図にアルファベットの“U"を例に取って示す
ように、キャラクタは1本以上のキャラクタ構成線44
(Uのキャラクタ構成線は1本と考える。)から成り、
各キャラクタ構成線は幅方向,長さ方向においてそれぞ
れ2本ずつの輪郭線46によって画定されるとともに、そ
れら輪郭線46が集まってキャラクタの輪郭を形成してい
る。キャラクタの輪郭を決定する座標面は、第5図に示
すように、縦(Y軸),横(X軸)がそれぞれ1000×10
00の大きさとされており、アルファベットの大文字はY
軸の座標値の200から1000までの間で描かれ、小文字は
0から200の間も使って描かれる。このような座標面上
においてキャラクタの輪郭がデザインされるとき、アウ
トラインデータは輪郭の図中黒丸印が付されている点と
点とを結ぶ線素毎に作成され、その線素の種類および両
端の点毎の座標等を含んでおり、1本の輪郭線が2本以
上の線素から成ることもある。これら各点の座標は輪郭
線上に定められた一定の方向(図中矢印で示されてい
る)に沿って順番に記憶され、各線素の両端の2点のう
ち、先に記憶される点が始点であり、後に記憶される点
が終点である。アウトラインデータは、線素が直線の場
合には直線データ(直線であることを示すコードデー
タ)および始点,終点の各座標を含み、線素が曲線の場
合には曲線であることを示すデータ,曲線の関数式およ
び始点,終点,補助点の各座標を含み、円弧の場合には
円弧であることを示すデータおよび始点,終点,円の中
心点の各座標データを含むものとされる。キャラクタRO
M14にはまた、各キャラクタ毎に線素の数Nが記憶され
ている。The character ROM 14 stores outline data of characters such as alphabets and other characters and symbols. As shown in FIG. 5 by taking the alphabet “U” as an example, the character is composed of one or more character constituent lines 44.
(Consider that the character configuration line of U is one.)
Each character constituent line is defined by two outlines 46 in the width direction and the length direction, respectively, and the outlines 46 are gathered to form the outline of the character. As shown in FIG. 5, the coordinate plane for determining the outline of the character has a vertical (Y-axis) and horizontal (X-axis) of 1000 × 10
00 and the capital letter of the alphabet is Y
Axis coordinates are drawn between 200 and 1000, and lowercase letters are drawn between 0 and 200. When a contour of a character is designed on such a coordinate plane, outline data is created for each line element connecting points indicated by black circles in the outline of the outline, and the type of the line element and both ends. , And one contour line may be composed of two or more line elements. The coordinates of these points are sequentially stored along a fixed direction (indicated by an arrow in the figure) defined on the contour line. Of the two points at both ends of each line element, the point stored first is The starting point, and the point stored later is the end point. The outline data includes straight line data (code data indicating that it is a straight line) when the line element is a straight line, and coordinates indicating the start point and end point, and data indicating that the line element is a curve when the line element is a curve. It includes the function formula of the curve and the coordinates of the starting point, the ending point, and the auxiliary point. In the case of an arc, it includes data indicating the arc and the coordinate data of the starting point, the ending point, and the center point of the circle. Character RO
M14 also stores the number N of line elements for each character.
本レーザプリンタにおいてアウトラインデータのドッ
トデータへの変換は、第6図に示す画素スクリーン52を
使用し、キャラクタの輪郭を画素スクリーン52に重ね合
わせたと想定して行われる。画素スクリーン52はアウト
ラインデータをドットデータに変換するための計算上の
ものであるが、ここでは理解を容易にするために実在す
るものとして図示することとする。また、ここにおいて
画素とは、レーザにより印字が行われる際の最小印字単
位であり、画素スクリーン52は、一平面内において互に
直交し、X軸方向とY軸方向とにそれぞれ平行であっ
て、等間隔に設けられた複数の画素区間線p(図中、実
線で示されている。)により画素を規定しており、本実
施例において画素は正方形とされている。また、画素中
心点を通り、X軸方向とY軸方向とにそれぞれ平行なx
方向規定線xとy方向規定線y(図中破線で示されてい
る。)とが設定されている。画素区画線pには画素スク
リーン52における位置を示す座標値が付され、x方向規
定線x,y方向規定線yの位置はそれぞれY座標値,X座標
値で表すことができる。印字を行うか否かのドットデー
タは画素毎に作成されるが、本レーザプリンタではキャ
ラクタの輪郭内に画素中心点が含まれる画素にドットが
形成されるようになっており、その画素のドットデータ
が1とされる。なお、画素は矩形その他の形状とするこ
とも可能である。In this laser printer, the conversion of outline data into dot data is performed using the pixel screen 52 shown in FIG. 6 and assuming that the outline of the character is superimposed on the pixel screen 52. The pixel screen 52 is a computational one for converting outline data to dot data, but is shown here as an actual one for easy understanding. The pixel here is a minimum printing unit when printing is performed by the laser, and the pixel screens 52 are orthogonal to each other in one plane, and are respectively parallel to the X-axis direction and the Y-axis direction. , Pixels are defined by a plurality of pixel section lines p (shown by solid lines in the figure) provided at equal intervals, and the pixels are square in this embodiment. Further, x, which passes through the pixel center point and is parallel to the X-axis direction and the Y-axis direction, respectively.
A direction defining line x and a y-direction defining line y (shown by a broken line in the figure) are set. A coordinate value indicating a position on the pixel screen 52 is attached to the pixel dividing line p, and the positions of the x-direction defining line x and the y-direction defining line y can be represented by a Y coordinate value and an X coordinate value, respectively. The dot data for printing or not is created for each pixel, but in this laser printer, a dot is formed at a pixel including the pixel center point in the outline of the character, and the dot of that pixel is formed. The data is set to 1. Note that the pixel may have a rectangular shape or another shape.
画素スクリーン52は印字用紙の印字面に対応して想定
されるものであるが、第6図には理解を容易にするため
に1キャラクタ分を取り出して示してある。したがっ
て、画素スクリーン52全体において画素区画線p,x方向
規定線x,y方向規定線yに実際に付される座標値は、第
6図において付されている値に適宜の整数をそれぞれ加
えた値となるが、ここでは1キャラクタ分についてのみ
考えることとする。The pixel screen 52 is supposed to correspond to the printing surface of the printing paper, but FIG. 6 shows only one character for easy understanding. Therefore, in the entire pixel screen 52, the coordinate values actually assigned to the pixel dividing lines p, x direction defining line x, y direction defining line y are obtained by adding appropriate integers to the values given in FIG. Although it is a value, here, only one character is considered.
また、本レーザプリンタは、キャラクタを4.8ポイン
ト,10ポイント,12ポイント,20ポイント,24ポイント,30
ポイント等任意のサイズで印字することができ、印字サ
イズにより1個のキャラクタを構成する画素数が異な
り、1画素の1辺に相当する1000×1000の座標面上の値
が異なる。あるポイントのキャラクタがC×C画素で表
されるとすれば、1画素の1辺は1000/Cに相当し、画素
スクリーン52の1目盛が1000/Cであるとしてキャラクタ
の輪郭の重ね合わせが行われる。ここでは1個のキャラ
クタが20×20画素で表される4.8ポイントで印字を行う
場合について説明する。この場合、画素スクリーン52上
の1目盛は1000×1000の座標面上の50に相当し、第6図
の画素スクリーン52の画素区画線pには1000×1000の座
標面上の値が付されている。また、この目盛値と並んで
付されている値は、各画素の画素スクリーン52全体にお
ける位置を指定する番号であり、1画素分を1として付
されており、X軸方向の位置を指定する番号とY軸方向
の位置を指定する番号との組合せにより、画素の画素ス
クリーン52上における位置を指定することができる。例
えば、X座標値がそれぞれ100,150の画素区画線pおよ
びY座標値がそれぞれ100,150画素区画線pによって画
定される画素は(2,2)で指定することができる。な
お、キャラクタの輪郭を画素スクリーン52に重ね合わせ
る際には、印字位置データに基づいて各キャラクタの基
準点の画素スクリーン52上における座標値の決定も行わ
れ、得られた基準点の座標値を用いて重ね合わせが行わ
れる。In addition, this laser printer can display characters of 4.8 points, 10 points, 12 points, 20 points, 24 points, and 30 points.
Printing can be performed in any size such as points, and the number of pixels constituting one character differs depending on the printing size, and the value on a 1000 × 1000 coordinate plane corresponding to one side of one pixel differs. Assuming that a character at a certain point is represented by C × C pixels, one side of one pixel is equivalent to 1000 / C, and assuming that one scale of the pixel screen 52 is 1000 / C, superimposition of the outline of the character is performed. Done. Here, a case in which one character performs printing at 4.8 points represented by 20 × 20 pixels will be described. In this case, one graduation on the pixel screen 52 corresponds to 50 on the 1000 × 1000 coordinate plane, and the pixel division line p of the pixel screen 52 in FIG. 6 is assigned a value on the 1000 × 1000 coordinate plane. ing. The value assigned alongside the scale value is a number that designates the position of each pixel on the entire pixel screen 52. One pixel is assigned as 1, and the position in the X-axis direction is designated. The position of the pixel on the pixel screen 52 can be specified by a combination of the number and the number specifying the position in the Y-axis direction. For example, a pixel defined by a pixel division line p having an X coordinate value of 100 or 150 and a pixel division line p having a Y coordinate value of 100 or 150 can be specified by (2,2). When the outline of the character is superimposed on the pixel screen 52, the coordinate value of the reference point of each character on the pixel screen 52 is also determined based on the print position data, and the coordinate value of the obtained reference point is calculated. Superposition is performed using the above.
このようにキャラクタの輪郭の画素スクリーン52上に
おける位置はキャラクタの大きさの他、印字位置にも影
響されるため、同じキャラクタ構成線でもそのキャラク
タ構成線を表示する画素数が変わり、幅に違いが生ずる
ことがある。本レーザプリンタにおいてキャラクタ構成
線のX軸に平行な方向の寸法が幅であり、1画素内に形
成されるドットを円で表せば、第7図に示すようにアル
ファベットの“U"の2本の腕部はその幅が同じ大きさで
表示されるようにアウトラインがデザインされている
が、印字時には幅が異なることがある。また、第6図に
示す曲線54のようにX軸,Y軸に対して傾斜した線の場
合、長さ方向において幅が同じになるようにデザインさ
れていても、円(白抜きの円)で表されるドットによっ
て印字されるキャラクタ構成線の幅が部分的に異なる場
合が生ずる。As described above, since the position of the character outline on the pixel screen 52 is affected not only by the size of the character but also by the printing position, the number of pixels for displaying the character configuration line changes even for the same character configuration line. May occur. In this laser printer, the width of the character configuration line in the direction parallel to the X axis is a width, and if dots formed in one pixel are represented by circles, then two characters of the alphabet “U” as shown in FIG. The outline of the arm is designed so that its width is displayed in the same size, but the width may be different at the time of printing. In the case of a line inclined with respect to the X-axis and the Y-axis as shown by a curve 54 in FIG. 6, even if the width is designed to be the same in the length direction, a circle (open circle) In some cases, the widths of the character constituent lines printed by the dots represented by are partially different.
これに対し、本レーザプリンタにおいては、キャラク
タ構成線を常に輪郭線により画定される幅に見合った幅
で印字し得るようにされており、プログラムROM16に
は、第4図にフローチャートで示す線幅修正機能を備え
たデータ変換用のプログラムを始めとして、印字に必要
な種々のプログラムが記憶されている。以下、第6図の
曲線54を例に取り、アウトラインデータのドットデータ
への変換について説明する。なお、本レーザプリンタに
おけるアウトラインデータのドットデータへの変換は、
キャラクタ構成線を幅方向において表示する画素のうち
両端の画素の位置を求め、それら画素間(両端画素も含
む)の画素に対応するドットデータを一挙に1に設定す
ることにより行われるが、これは本出願人に係る特願昭
63−269074号に記載のデータ変換装置と同じである。ま
た、印字については本発明を理解する上で不可欠ではな
いため詳細な説明は省略するが、本レーザプリンタにお
いては印字が1頁毎に行われる。テキストメモリ18に記
憶された文書データのうち1頁分ずつのデータが読み出
され、そのデータに対応する多数のキャラクタのアウト
ラインデータがそれぞれドットデータに変換されて印字
が行われるのである。On the other hand, in the present laser printer, the character constituting lines can always be printed with a width corresponding to the width defined by the outline, and the program ROM 16 stores the line width shown in the flowchart in FIG. Various programs necessary for printing are stored, including a data conversion program having a correction function. Hereinafter, the conversion of the outline data into the dot data will be described using the curve 54 in FIG. 6 as an example. The conversion of outline data to dot data in this laser printer is as follows:
This is performed by obtaining the positions of the pixels at both ends of the pixels displaying the character constituent line in the width direction, and setting dot data corresponding to the pixels between the pixels (including both end pixels) to 1 at a stroke. Is the Japanese patent application filed by the applicant
This is the same as the data conversion device described in JP-A-63-269074. Further, printing is not indispensable for understanding the present invention, and therefore detailed description is omitted. However, in this laser printer, printing is performed for each page. Data for one page is read out of the document data stored in the text memory 18, and outline data of a large number of characters corresponding to the data is converted into dot data and printed.
まず、ステップS1(以下、S1と略記する。他のステッ
プについても同じ。)において処理されるキャラクタの
アウトラインデータ,線素の数Nおよびx方向規定線x
の数S(この数Sは印字サイズと対応付けて記憶されて
おり、印字サイズが4.8ポイントの場合は20本であ
る。)が読み出された後、S2において線素の一つとx方
向規定線xとの交点のX座標が算出され、目標座標メモ
リ24に記憶される。この算出は、矢印で示すように曲線
54を構成する輪郭線の始点から終点に向かって行われ
る。交点は図中黒丸を付して示す点であり、交点のX座
標は第8図に示すようにx方向規定線xの位置を表すY
座標に対応して記憶される。なお、第12図に示すように
キャラクタ構成線56の線素の終点と次に交点が求められ
る線素の始点とがちょうどx方向規定線x上に位置する
場合、同じ交点のX座標が2個記憶される。1本のキャ
ラクタ構成線毎に交点のX座標が2個ずつ算出されるよ
うになっているのであり、1本の線素について交点のX
座標が算出されたならば、S3においてnが1増加させら
れた後、S4において全部の線素について交点の算出が終
了したか否かの判定が行われるが、この判定はNOであ
り、プログラムの実行はS2に戻る。First, in step S1 (hereinafter abbreviated as S1; the same applies to other steps), the outline data of the character, the number N of line elements, and the x-direction defining line x
After reading the number S (this number S is stored in association with the print size and is 20 when the print size is 4.8 points), one of the line elements and the x-direction The X coordinate of the intersection with the line x is calculated and stored in the target coordinate memory 24. This calculation is performed as shown by the arrow
The process is performed from the start point to the end point of the outline forming 54. The intersection is a point indicated by a black circle in the figure, and the X coordinate of the intersection is Y representing the position of the x-direction defining line x as shown in FIG.
It is stored corresponding to the coordinates. As shown in FIG. 12, when the end point of the line element of the character constituent line 56 and the start point of the line element for which the next intersection is to be found are exactly on the x-direction defining line x, the X coordinate of the same intersection is 2 Are stored. The X coordinate of the intersection is calculated two by two for each character constituent line, and the X coordinate of the intersection is calculated for one line element.
Once the coordinates have been calculated, n is incremented by 1 in S3, and then a determination is made in S4 as to whether or not the calculation of the intersections has been completed for all the line elements. Execution returns to S2.
1個のキャラクタの全部の線素について交点の算出が
終了したならば、S5においてn1が0にされた後、S6にお
いて目標座標メモリ24に記憶されたX座標が小さい順に
並べ変えられて、小さいものから順に2個ずつのペアに
なるようにされる。交点のX座標は線素毎に求められ、
S2ではX座標の値が求められた順にメモリ24に記憶され
るため、X座標の値が大きい方の線素について小さい方
の線素より先に求められることがあり、X座標は順序不
同に並んでおり、これが小さい順に並べ変えられるので
ある。1本のキャラクタ構成線についてx方向規定線x
毎に2個ずつの目標座標が求められるため、交点のX座
標を小さい順に並び変えて2個ずつペアにすれば、それ
ら2個のX座標値間には必ずキャラクタ構成線が存在
し、その差はキャラクタ構成線の2本の輪郭線間の各x
方向規定線x上における間隔、すなわち幅を表すことと
なる。以下、線素とx方向規定線xとの交点のX座標を
目標座標と称し、2個の目標座標の差を目標線幅と称す
ることとする。If calculating the intersection of all the line elements of a single character has been completed, after the n 1 is 0 at S5, and X coordinates stored in the target coordinate memory 24 is rearranged in the ascending order in S6, The pairs are arranged in pairs starting from the smallest one. The X coordinate of the intersection is obtained for each line element,
In S2, since the X coordinate values are stored in the memory 24 in the order in which they were obtained, the X coordinate value may be obtained before the smaller line element for the larger line element. They are lined up and can be rearranged in ascending order. X direction definition line x for one character constituent line
Since two target coordinates are obtained for each, if the X coordinates of the intersections are rearranged in ascending order and paired two by two, a character constituent line always exists between the two X coordinate values. The difference is each x between the two contour lines of the character constituent line.
It represents the interval on the direction defining line x, that is, the width. Hereinafter, the X coordinate of the intersection of the line element and the x-direction defining line x is referred to as a target coordinate, and the difference between the two target coordinates is referred to as a target line width.
次いでS7において目標座標に基づいて表示座標が算出
される。表示座標とは、1本のx方向規定線x上におい
て曲線54を表示するドット列の両端のドットの外側の端
の座標であり、Y軸に平行な画素区画線pのうち目標座
標に最も近い画素区画線pの座標が表示座標として求め
られる。表示座標が求められる画素区画線pとx方向規
定線xとの交点を×印で示す。Next, in S7, display coordinates are calculated based on the target coordinates. The display coordinates are the coordinates of the outer ends of the dots at both ends of the dot row that displays the curve 54 on one x-direction defining line x, and are the closest to the target coordinates among the pixel division lines p parallel to the Y axis. The coordinates of the nearby pixel division line p are obtained as display coordinates. The point of intersection between the pixel division line p at which the display coordinates are determined and the x-direction defining line x is indicated by a cross.
このようにして求められる表示座標は、第9図に示す
ようにx方向規定線x毎に記憶される。目標座標は曲線
54について2個ずつ求められており、表示座標は目標座
標の各々に基づいて求められるため、小さい方から順に
2個ずつの表示座標の差は曲線54が実際に表示される幅
を表すこととなる。この幅を表示線幅と称する。全部の
目標座標について表示座標が算出されたならば、S8にお
いてx方向規定線x毎に目標線幅と表示線幅との差が算
出される。目標座標ペアの大きい方の値から小さい方の
値が引かれ、目標線幅が求められるとともに、表示座標
ペアの大きい方の値から小さい方の値が引かれて表示線
幅が求められた後、表示線幅から目標線幅が引かれ、そ
の差が求められるのであり、この差はその符号と共にワ
ーキングメモリ20に記憶される。The display coordinates obtained in this way are stored for each x-direction defining line x as shown in FIG. Target coordinates are curves
Since two display coordinates are obtained for each of the 54 and the display coordinates are obtained based on each of the target coordinates, the difference between the two display coordinates from the smallest one indicates that the width of the curve 54 is actually displayed. Become. This width is called a display line width. When the display coordinates have been calculated for all the target coordinates, the difference between the target line width and the display line width is calculated for each x-direction prescribed line x in S8. After the smaller value is subtracted from the larger value of the target coordinate pair to determine the target line width, and the smaller value is subtracted from the larger value of the display coordinate pair to determine the display line width. , The target line width is subtracted from the display line width, and the difference is obtained, and this difference is stored in the working memory 20 together with the sign.
続いて、S9において線幅差の絶対値が設定値以上であ
るか否かの判定が行われる。本実施例では設定値は1画
素の1辺の座標値の2分の1である25とされており、線
幅差の絶対値と設定値とを比較することにより、目標線
幅と表示線幅とのいずれが大きい場合にも共通の設定値
25によって線幅修正の必要の有無を判定することができ
る。設定値25が第一設定値でも第二設定値でもあるので
あり、線幅差の絶対値が設定値より小さい場合には線幅
差は許容し得る範囲であって修正は行われず、設定値以
上であればS10において表示線幅が修正される。Subsequently, in S9, it is determined whether or not the absolute value of the line width difference is equal to or larger than a set value. In the present embodiment, the set value is set to 25, which is one half of the coordinate value of one side of one pixel. By comparing the absolute value of the line width difference with the set value, the target line width and the display line are compared. Common setting value regardless of which width is larger
25 determines whether or not the line width needs to be corrected. If the set value 25 is both the first set value and the second set value, and the absolute value of the line width difference is smaller than the set value, the line width difference is within an acceptable range and no correction is performed. If so, the display line width is corrected in S10.
曲線54のY座標がそれぞれ175,225であるx方向規定
線xについて求められる目標線幅と表示線幅とを例に取
って説明する。Y座標が175のx方向規定線xについて
求められる目標座標は190,330、表示座標は200,350であ
り、目標線幅は140,表示線幅は150であってその差の絶
対値は設定値より小さく、線幅の修正は行われない。The target line width and the display line width obtained for the x-direction defining line x in which the Y coordinate of the curve 54 is 175 and 225, respectively, will be described as an example. The target coordinates obtained for the x-direction defining line x of Y coordinate 175 are 190,330, the display coordinates are 200,350, the target line width is 140, the display line width is 150, and the absolute value of the difference is smaller than the set value, No line width correction is made.
それに対し、Y座標値が225のx方向規定線xについ
ては、目標座標が180,315、表示座標が200,300であり、
目標線幅は135,表示線幅が100であって、目標線幅と表
示線幅との差の絶対値が設定値より大きいため表示線幅
が修正される。この修正は表示座標を修正することによ
り行われる。2個ずつの目標座標と表示座標とのうち、
小さい方の座標同士と大きい方の座標同士との差がそれ
ぞれ求められ、差の絶対値の大きい方の表示座標が修正
されるのである。表示座標の値が増減させられるのであ
るが、増加か減少かは、表示線幅と目標線幅とのいずれ
が大きいかによる。S8において記憶された線幅差の符号
が読み出され、その符号が負であって表示線幅が目標線
幅より小さい場合に小さい方の表示座標を修正するので
あれば、X座標が小さい側に隣接するY軸方向の画素区
画線pのX座標に修正される。また、大きい方の表示座
標を修正するのであれば、X座標が大きい側に隣接する
Y軸方向の画素区画線pのX座標に修正される。一方、
表示線幅が目標線幅より大きい場合に小さい方の表示座
標を修正するのであれば、X座標が大きい側に隣接する
Y軸方向の画素区画線pのX座標に修正され、大きい方
の表示座標を修正するのであれば、X座標が小さい側に
隣接するY軸方向の画素区画線pのX座標に修正され
る。なお、小さい方の座標同士と大きい方の座標同士と
のそれぞれの差が等しい場合には、いずれの表示座標を
修正してもよいが、ここでは小さい方の表示座標を修正
するものとする。On the other hand, for the x-direction defining line x with the Y coordinate value of 225, the target coordinates are 180,315 and the display coordinates are 200,300,
Since the target line width is 135 and the display line width is 100, and the absolute value of the difference between the target line width and the display line width is larger than the set value, the display line width is corrected. This correction is performed by correcting the display coordinates. Of the two target coordinates and display coordinates,
The difference between the smaller coordinates and the larger coordinates is determined, and the display coordinates with the larger absolute value of the difference are corrected. The value of the display coordinates is increased or decreased, and whether the value is increased or decreased depends on which of the display line width and the target line width is larger. If the sign of the line width difference stored in S8 is read out and the sign is negative and the display line width is smaller than the target line width, and if the smaller display coordinate is to be corrected, the smaller the X coordinate, the smaller the X coordinate. Is corrected to the X coordinate of the pixel division line p in the Y-axis direction adjacent to. If the larger display coordinate is to be corrected, the X coordinate is corrected to the X coordinate of the pixel division line p in the Y-axis direction adjacent to the larger X coordinate. on the other hand,
If the smaller display coordinates are to be corrected when the display line width is larger than the target line width, the smaller display coordinates are corrected to the X coordinate of the pixel division line p in the Y-axis direction adjacent to the larger X coordinate side. If the coordinates are to be corrected, the coordinates are corrected to the X coordinate of the pixel division line p in the Y-axis direction adjacent to the side having the smaller X coordinate. If the difference between the smaller coordinate and the larger coordinate is the same, any of the display coordinates may be corrected, but here, the smaller display coordinate is corrected.
Y座標が225のx方向規定線xについて求められた目
標座標180,315、表示座標200,300について見れば、小さ
い方の座標同士の差の絶対値の方が大きく、また、表示
線幅が目標線幅より小さいため、表示座標200が150に修
正され、それにより表示線幅が1画素分増加することと
なる。本実施例において設定値が1画素の1辺の座標値
の2分の1に設定されているのは、表示座標の修正によ
り表示線幅が1画素分ずつ増減させられるが、設定値が
上記2分の1より小さい場合には、表示座標の修正によ
る増減量の方が目標線幅と表示線幅との差より大きくな
り、却って修正前より差が大きくなって見映が悪くなる
からである。設定値を1画素の1辺の2分の1とすれば
表示座標の修正による線幅の増減量は線幅差以下とな
り、修正により差が大きくなることはないのである。な
お、複数本のキャラクタ構成線が同じx方向規定線xと
交差し、目標座標,表示座標がそれぞれ2個より多い偶
数個算出される場合には、線幅差の算出は小さい方から
順に2個ずつの座標同士で行われ、S9において線幅修正
の有無が判定されるとき、1本のx方向規定線xにおい
て1つでも線幅の修正が必要な座標があればS9がYESと
なり、必要な修正が行われる。Looking at the target coordinates 180 and 315 and the display coordinates 200 and 300 obtained for the x-direction defining line x of Y coordinate 225, the absolute value of the difference between the smaller coordinates is larger, and the display line width is larger than the target line width. Due to the small size, the display coordinates 200 are modified to 150, thereby increasing the display line width by one pixel. In the present embodiment, the setting value is set to one half of the coordinate value of one side of one pixel because the display line width is increased or decreased by one pixel by correcting the display coordinates. If it is smaller than one half, the amount of increase / decrease due to the correction of the display coordinates is larger than the difference between the target line width and the display line width. is there. If the set value is set to one half of one side of one pixel, the amount of increase or decrease of the line width due to the correction of the display coordinates is equal to or less than the line width difference, and the correction does not increase the difference. If a plurality of character constituent lines intersect with the same x-direction defining line x and the target coordinates and the display coordinates are each calculated as an even number larger than two, the line width difference is calculated in ascending order from the smallest one. It is performed between individual coordinates, and when the presence or absence of line width correction is determined in S9, if there is at least one coordinate whose line width needs to be corrected in one x direction defining line x, S9 becomes YES, Necessary modifications are made.
1本のx方向規定線xについて表示線幅の修正の有無
の判定ならびに修正が行われたならば、S11においてn2
が1増加させられた後、S12において全部のx方向規定
線xについて表示線幅の修正の有無の判定ならびに修正
が為されたか否かの判定が行われるが、この判定はNOで
あり、プログラムの実行はS8に戻る。以下、S12がYESに
なるまでS8〜S12が繰り返し実行される。If it is determined whether or not the display line width has been corrected and corrected for one x-direction defining line x, n 2 in S11.
Is incremented by 1, a determination is made in S12 as to whether or not the display line width has been corrected and whether or not the display line width has been corrected for all the x-direction prescribed lines x. This determination is NO, and the program proceeds to step S12. Execution returns to S8. Hereinafter, S8 to S12 are repeatedly executed until S12 becomes YES.
S12がYESになればS13において、n2が0にされるとと
もに、表示座標に基づいてドットデータを1に設定する
画素の位置を指定する番号が求められる。前述のように
表示座標はY軸に平行な画素区画線pのX座標であり、
そのX座標が2個ずつペアとして扱われる目標座標の小
さい方の目標座標について求められたのであれば、その
X座標を有する画素区画線pと、その画素区画線pにX
座標が大きい側に隣接する画素区画線pとによって画定
される画素の番号がドットデータを1に設定する画素の
X軸方向の位置を指定する番号とされる。また、大きい
方の表示座標については、その表示座標を有する画素区
画線pと、その画素区画線pにX座標が小さい側に隣接
するY軸方向の画素区画線pとによって画定される画素
の番号がX軸方向の指定番号とされる。この番号はx方
向規定線x毎に記憶されるが、この場合、第10図に示す
ように、x方向規定線xはそれが含まれる画素をY軸方
向において指定する番号で表されており、このx方向規
定線xのY軸方向の位置と表示座標のX軸方向の位置と
から画素の画素スクリーン52上における位置を指定する
ことができる。このように2個の表示座標から求められ
る画素の番号は、曲線54を幅方向において表示する全部
の画素のうち両端の画素の位置を指定するものであり、
Y座標が225のx方向規定線xについては修正された表
示座標の位置指定番号が求められ、それにより第6図に
斜線付の円で示すドットが形成される画素の番号が求め
られ、その画素についてドットが形成されて曲線54のこ
の部分は目標線幅に近い幅で表示されることとなる。S12 in S13 if the is YES, with n 2 is 0, the number specifying the position of the pixel of a dot data to 1 based on the display coordinate are determined. As described above, the display coordinates are the X coordinates of the pixel division line p parallel to the Y axis.
If the X coordinate is obtained for the smaller target coordinate of the target coordinates treated as a pair two by two, a pixel division line p having the X coordinate and an X
The number of the pixel defined by the pixel division line p adjacent to the side having the larger coordinate is the number specifying the position in the X-axis direction of the pixel for which the dot data is set to 1. For the larger display coordinates, the pixel division line p having the display coordinates and the pixel division line p in the Y-axis direction adjacent to the pixel division line p on the side where the X coordinate is smaller than the pixel division line p. The number is the designated number in the X-axis direction. This number is stored for each x-direction defining line x. In this case, as shown in FIG. 10, the x-direction defining line x is represented by a number designating the pixel that includes it in the Y-axis direction. The position of the pixel on the pixel screen 52 can be designated from the position of the x-direction defining line x in the Y-axis direction and the position of the display coordinates in the X-axis direction. Thus, the pixel numbers obtained from the two display coordinates specify the positions of the pixels at both ends of all the pixels that display the curve 54 in the width direction.
With respect to the x-direction defining line x having the Y coordinate of 225, the position designation number of the corrected display coordinate is obtained, and thereby the number of the pixel forming the dot indicated by the hatched circle in FIG. 6 is obtained. A dot is formed for the pixel, and this portion of the curve 54 is displayed with a width close to the target line width.
なお、表示線幅が目標線幅より設定値以上大きい場合
には、線幅が次のように修正され、ドットデータを1に
設定する画素の指定番号が求められる。第11図に示すキ
ャラクタ構成線58においてY座標が325のx方向規定線
xの目標座標は315,380、表示座標は300,400であり、目
標線幅が65,表示線幅が100であって2個の表示座標のう
ち目標座標との差の絶対値が大きい400が350に修正され
る。表示座標300,350からドットデータを1に設定する
画素の指定番号は6が2個求められ、それにより斜線付
の円で示すドットが印字されず、キャラクタ構成線58の
幅は1個のドットにより同じ大きさで印字されることと
なる。When the display line width is larger than the target line width by a set value or more, the line width is corrected as follows, and the designated number of the pixel for setting the dot data to 1 is obtained. In the character configuration line 58 shown in FIG. 11, the target coordinates of the x-direction defining line x with the Y coordinate of 325 are 315,380, the display coordinates are 300,400, the target line width is 65, the display line width is 100, and two Of the display coordinates, 400 having the larger absolute value of the difference from the target coordinates is corrected to 350. From the display coordinates 300 and 350, the designation number of the pixel for which the dot data is set to 1 is two, and two dots are obtained. As a result, a dot indicated by a hatched circle is not printed, and the width of the character constituting line 58 is the same by one dot. It will be printed in the size.
また、第12図に示すキャラクタ構成線56の場合、目標
座標として同じ値が2個求められており、それぞれにつ
いて表示座標が求められる。同じ座標が2個表示座標と
されるのであり、表示線幅,目標線幅がいずれも0であ
ってS9がNOとなり、表示座標の修正が行われない。この
ように2個の表示座標が同じ値である場合には、ドット
データを1に設定する画素の位置を指定する番号は、表
示座標に対して目標座標がある側の画素の位置を指定す
る番号とされ、この画素の指定番号が2個記憶される。In the case of the character constituent line 56 shown in FIG. 12, two identical values are obtained as the target coordinates, and the display coordinates are obtained for each of them. Since the same coordinates are set as two display coordinates, the display line width and the target line width are both 0, S9 becomes NO, and the display coordinates are not corrected. When the two display coordinates have the same value, the number designating the position of the pixel for which the dot data is set to 1 designates the position of the pixel on the side where the target coordinates are located with respect to the display coordinates. And two designated numbers of the pixel are stored.
さらに、第13図に示すように、キャラクタ構成線60が
Y軸に平行であって、隣接する2本の画素区画線pの間
にy方向規定線yを挟んで位置する場合には、1つの画
素を画定し、Y軸に平行な2本の画素区画線pのX座標
がそれぞれ表示座標とされる。この場合、キャラクタ構
成線60の幅が25より大きい場合にはS9がNOとなり、線幅
の修正は行われないが、25以下の場合には目標線幅と表
示線幅との差が設定値以上となって線幅が修正される。
2個の表示座標の一方が表示線幅が短くなるように修正
されるのであるが、それにより2個の表示座標が同じ値
となり、ドットデータを1に設定する画素の位置を指定
する番号は、表示座標に対して目標座標がある側の画素
の位置を指定する番号とされる。Further, as shown in FIG. 13, when the character constituting line 60 is parallel to the Y axis and is located with the y direction defining line y interposed between two adjacent pixel dividing lines p, 1 One pixel is defined, and the X coordinates of two pixel division lines p parallel to the Y axis are respectively set as display coordinates. In this case, if the width of the character constituent line 60 is larger than 25, S9 becomes NO and the line width is not corrected, but if the width is 25 or less, the difference between the target line width and the display line width is set value. As described above, the line width is corrected.
One of the two display coordinates is corrected so that the display line width is shortened. However, the two display coordinates have the same value, and the number specifying the position of the pixel for setting the dot data to 1 is , A number specifying the position of the pixel on the side where the target coordinates are located with respect to the display coordinates.
第14図に示すように、キャラクタ構成線62がY軸に平
行であって隣接する2本のy方向規定線yの間に位置す
る場合には、それらy方向規定線yの間にあってY軸に
平行な画素区画線pのX座標が表示座標として2個記憶
されることとなる。この場合、目標線幅が25より小さけ
ればS9はNOとなり、表示座標は修正されず、ドットデー
タを1に設定する画素の位置指定番号は、目標座標が画
素区画線pの一方の側にあるときは目標座標が位置する
画素の番号とされ、目標座標が画素区画線pの両側にあ
るときには画素区画線pとの距離が大きい目標座標が位
置する画素の番号とされる。また、2個の目標座標の各
々と画素区画線pとの距離が同じ場合には、その表示座
標を有する画素区画線pにより画定される2個の画素の
うち一方の画素の番号とされる。一方、目標線幅が25よ
り大きければS9がYESとなり、表示線幅が修正される
が、2個の目標座標は画素区画線pの両側に位置するた
め、その画素区画線pとの距離が大きい方の目標座標が
位置する側の画素区画線pのX座標に表示座標が修正さ
れる。画素区画線pとの距離が同じ場合には、いずれか
一方の画素の側の画素区画線pのX座標に修正される。As shown in FIG. 14, when the character constituting line 62 is parallel to the Y axis and is located between two adjacent y direction defining lines y, it is located between the y direction defining lines y and Are stored as the display coordinates. In this case, if the target line width is smaller than 25, S9 becomes NO, the display coordinates are not corrected, and the position designation number of the pixel for setting the dot data to 1 is such that the target coordinates are on one side of the pixel division line p. When the target coordinates are located on both sides of the pixel division line p, the target coordinates are set to the number of the pixel where the target coordinate is located. When the distance between each of the two target coordinates and the pixel division line p is the same, the number is one of the two pixels defined by the pixel division line p having the display coordinates. . On the other hand, if the target line width is larger than 25, S9 becomes YES and the display line width is corrected. However, since the two target coordinates are located on both sides of the pixel division line p, the distance from the pixel division line p is The display coordinates are corrected to the X coordinate of the pixel division line p on the side where the larger target coordinate is located. If the distance from the pixel division line p is the same, the coordinate is corrected to the X coordinate of the pixel division line p on one of the pixels.
全部のx方向規定線xについて画素の位置を指定する
番号が算出されたならばS14においてドットデータが設
定される。この設定は、画素指定メモリ27に記憶された
画素指定番号のうち、小さい方から順に2個ずつの番号
の間に位置する画素のドットデータを一挙に1に設定す
ることにより行われ、設定されたデータはドットデータ
メモリ22に記憶される。なお、画素指定番号により指定
される画素のドットデータも1に設定する。If the numbers specifying the pixel positions have been calculated for all the x-direction defining lines x, dot data is set in S14. This setting is performed by setting the dot data of the pixels located between the two numbers in ascending order of the pixel designation numbers stored in the pixel designation memory 27 to one at a time. The data is stored in the dot data memory 22. The dot data of the pixel specified by the pixel specification number is also set to 1.
この設定は、1バイト単位でまとめて行われる。マイ
クロコンピュータ部10は1バイトのデータを並列に処理
し得るものであり、1画素のドットデータは1ビットで
表されるため、8個の画素のドットデータが一挙に設定
されることとなる。この設定は、ペアを成す2個の画素
指定番号を1バイトの区切となるビットの座標(互に隣
接するバイト間の区切となるビットの座標)に基づいて
1バイト毎に区切られ、同じバイトに属し、キャラクタ
が存在する画素に対応するドットデータがまとめて1に
設定される。This setting is performed collectively in units of one byte. The microcomputer unit 10 can process 1-byte data in parallel. Since dot data of one pixel is represented by one bit, dot data of eight pixels are set at a time. In this setting, the two pixel designation numbers forming a pair are separated on a byte-by-byte basis on the basis of the coordinates of the bits that separate one byte (the coordinates of the bits that separate adjacent bytes). And the dot data corresponding to the pixel where the character exists are set to 1 collectively.
Y軸方向の位置が4のx方向規定線xについて求めら
れた画素指定番号を例に取り、第15図に基づいて説明す
る。なお、この番号は画素スクリーン52上の実際の画素
の位置を表すものとする。まず、2つの番号ペア(3,
5)のうち小さい方の番号より大きく、1バイトの区切
となるビットの座標7と大きい方の画素指定番号5とが
比較される。画素指定番号の方が小さいため、この番号
ペアによって表されるキャラクタ構成線は1バイト中に
含まれることとなり、画素指定番号3,5にそれぞれ対応
するドットデータがまとめて1に設定される。第15図に
おいて斜線付の円は1に設定されたドットデータを表
す。2個の画素指定番号のうち、大きい方の番号が1バ
イトの区切となる座標より大きい場合には、その区切と
なる座標と小さい方の画素指定番号との間の画素が1バ
イトに含まれることとなり、それらがまとめて1に設定
された後、残りの番号中に8を1単位とするグループが
幾つあるか算出され、1バイトずつドットデータが設定
される。A description will be given based on FIG. 15 by taking, as an example, the pixel designation number obtained for the x-direction defining line x whose position in the Y-axis direction is 4. Note that this number represents the actual position of the pixel on the pixel screen 52. First, two number pairs (3,
The coordinate 7 of the bit, which is larger than the smaller number among 5) and forms a 1-byte delimiter, and the larger pixel designation number 5 are compared. Since the pixel designation number is smaller, the character configuration line represented by this number pair is included in one byte, and the dot data respectively corresponding to the pixel designation numbers 3 and 5 are collectively set to 1. In FIG. 15, a hatched circle represents dot data set to 1. If the larger one of the two pixel designation numbers is larger than the one-byte separating coordinate, the pixel between the separating coordinate and the smaller pixel specifying number is included in one byte. That is, they are collectively set to 1, after which the number of groups having 8 as one unit is calculated in the remaining numbers, and dot data is set for each byte.
このように本実施例のデータ変換装置においては、キ
ャラクタ構成線が印字されるときの実際の幅と予定され
た幅である輪郭線間の幅との比較により表示画素数が修
正され、キャラクタ構成線が予定された幅に近い幅で表
示されるようになっているため、同じキャラクタ構成線
が印字位置によって幅が違ったり、1本のキャラクタ構
成線中で幅が部分的に異なる事態の発生がなくなり、キ
ャラクタを見映良く印字することができる。As described above, in the data conversion apparatus according to the present embodiment, the number of display pixels is corrected by comparing the actual width when the character constituent line is printed with the width between the contour lines, which is the expected width. Since the lines are displayed with a width close to the expected width, the same character component line may differ in width depending on the printing position, or the width of one character component line may differ partially Disappears, and characters can be printed with good visibility.
また、線幅の修正を行うために予め与えられる必要が
あるデータはキャラクタのアウトラインデータ,線素の
数Nおよび画素規定線の数Sであり、線幅を修正するキ
ャラクタ構成線および目標線幅のデータを予め与える場
合に比較して記憶データ量が少なくて済む。The data that needs to be given in advance to correct the line width are character outline data, the number N of line elements, and the number S of pixel defining lines. The amount of stored data can be reduced as compared with the case where the data is given in advance.
以上の説明から明らかなように、本実施例において
は、プログラムROM16のS13およびS14を記憶する部分お
よびデータ設定部40がドットデータ設定手段を構成し、
プログラムROM16のS2〜S9を記憶する部分およびCPU12の
線幅修正部38が目標線幅・表示線幅比較手段を構成し、
プログラムROM16のS10を記憶する部分およびCPU12の線
幅修正部38が線幅修正手段を構成しているのである。As is apparent from the above description, in the present embodiment, the portion of the program ROM 16 that stores S13 and S14 and the data setting unit 40 constitute dot data setting means,
The portion of the program ROM 16 that stores S2 to S9 and the line width correction unit 38 of the CPU 12 constitute a target line width / display line width comparison unit,
The portion that stores S10 of the program ROM 16 and the line width correction unit 38 of the CPU 12 constitute a line width correction unit.
なお、上記実施例では表示線幅の修正を行う否かを判
定するための第一設定値と第二設定値とが同じ値とされ
ていたが、異なる値としてもよい。In the above embodiment, the first set value and the second set value for determining whether to correct the display line width are set to the same value, but may be set to different values.
また、上記実施例では表示線幅が目標線幅より設定値
以上大きい場合と、目標線幅が表示線幅より設定値以上
大きい場合との両方の場合に線幅が修正されるようにし
たが、いずれか一方の場合のみに線幅を調整するように
してもよい。Further, in the above embodiment, the line width is corrected both in the case where the display line width is larger than the target line width by the set value or more, and in the case where the target line width is larger than the display line width by the set value or more. Alternatively, the line width may be adjusted only in one of the cases.
さらに、線幅の修正は印字サイズが12ポイント以下の
場合のみに行うようにしてもよい。Further, the line width may be corrected only when the print size is 12 points or less.
さらにまた、ドットデータの設定はキャラクタ構成線
を幅方向において表示する画素の両端画素の位置を求
め、ドットデータを一挙に1に設定するのに限らず、輪
郭線内に画素中心点あるいは一定面積以上含まれるな
ど、一定基準を満たす画素に対応するドットデータを1
つずつ存在データに設定するようにしてもよく、この場
合には、ドットデータの設定後に線幅を修正することと
なる。Further, the setting of the dot data is not limited to finding the positions of the pixels at both ends of the pixel displaying the character constituent line in the width direction, and setting the dot data to one at a time. Dot data corresponding to a pixel satisfying a certain criterion such as
The presence data may be set one by one. In this case, the line width is corrected after setting the dot data.
さらに、上記実施例においては画素スクリーン52のX
軸方向が幅方向とされ、キャラクタ構成線の線幅が修正
されるようになっていたが、Y軸方向を幅方向とし、キ
ャラクタ構成線の線幅を修正してもよく、この修正はX
軸方向の幅の修正と合わせて行ってもよい。Further, in the above embodiment, X of the pixel screen 52
The axis direction is set to the width direction, and the line width of the character component line is corrected. However, the Y axis direction may be set to the width direction, and the line width of the character component line may be corrected.
It may be performed together with the correction of the axial width.
さらに、表示座標を修正した結果、なお目標線幅と表
示線幅との差が設定値以上であるときには、更に表示座
標の修正を行うようにしてもよい。なお、上記の場合で
あっても、必ずしも目標線幅と表示線幅との差が設定値
より小さくするのに必要なすべての修正を行う必要はな
い。一度でも修正すれば、全く修正しない場合より目標
線幅に近い表示線幅を得ることができ、表示品質を向上
させることができるのである。Further, when the difference between the target line width and the display line width is still equal to or greater than the set value as a result of correcting the display coordinates, the display coordinates may be further corrected. Note that even in the above case, it is not always necessary to make all the corrections necessary to make the difference between the target line width and the display line width smaller than the set value. Once correction is made, a display line width closer to the target line width can be obtained than when no correction is made at all, and display quality can be improved.
さらにまた、アウトラインデータは、座標のみで表す
など、他の手段により構成してもよい。座標のみで表す
場合、複数の直線により構成されるキャラクタについて
は、その輪郭の線素毎の座標データ群によってアウトラ
インデータを構成し、曲線を含むキャラクタについて
は、その曲線を画定するのに必要な複数の点の座標デー
タ群を含むようにアウトラインデータを構成する。Furthermore, the outline data may be configured by other means, such as by expressing only the coordinates. When represented only by coordinates, for a character composed of a plurality of straight lines, outline data is composed of a group of coordinate data for each line element of the contour, and for a character including a curve, the outline data is necessary to define the curve. The outline data is configured to include a coordinate data group of a plurality of points.
さらに、レーザプリンタ以外のプリンタにも本発明を
適用し得ることは勿論、プリンタ以外にも文字,記号等
のキャラクタのアウトラインデータをドットデータに変
換する必要のある装置に一般的に本発明を適用すること
ができる。Further, the present invention can be applied not only to a printer other than a laser printer but also to an apparatus which needs to convert outline data of characters such as characters and symbols into dot data in addition to the printer. can do.
その他、いちいち例示することはしないが、当業者の
知識に基づいて種々の変形,改良を施した態様で本発明
を実施することができる。Although not specifically exemplified, the present invention can be implemented in various modified and improved embodiments based on the knowledge of those skilled in the art.
第1図は本発明に係るデータ変換装置の構成を概念的に
示すブロック図である。第2図は本発明の一実施例であ
るデータ変換装置を備えたレーザプリンタの制御回路を
示すブロック図である。第3図は上記制御回路を構成す
るCPUを概念的に示す図である。第4図は上記制御回路
のプログラムROMに記憶されたプログラムのうち、デー
タ変換用プログラムを示すフローチャートである。第5
図はアルファベットの“U"の輪郭を示す図である。第6
図は上記データ変換装置により変換される曲線を画素ス
クリーンに重ねて示す図である。第7図は上記アルファ
ベットの“U"を画素スクリーンに重ねて示す図である。
第8図は第6図の曲線について求められた目標座標をx
方向規定線x毎に表して示す図である。第9図は上記曲
線について求められた表示座標をx方向規定線x毎に表
にして示す図である。第10図は上記曲線について求めら
れた表示画素の指定番号をx方向規定線x毎に表にして
示す図である。第11図は表示線幅を短くする修正を説明
する図である。第12図,第13図および第14図はキャラク
タ構成線の目標座標,表示座標および表示画素の指定番
号の算出を説明する図である。第15図は上記表示画素の
指定番号に基づいて行われるドットデータの設定を説明
する図である。 1:マイクロコンピュータ 44:キャラクタ構成線、46:輪郭線 52:画素スクリーン、54:曲線 56,58,60,62:キャラクタ構成線 x:x方向規定線、y:y方向規定線 p:画素区画線FIG. 1 is a block diagram conceptually showing the configuration of a data conversion device according to the present invention. FIG. 2 is a block diagram showing a control circuit of a laser printer having a data converter according to one embodiment of the present invention. FIG. 3 is a diagram conceptually showing a CPU constituting the control circuit. FIG. 4 is a flowchart showing a data conversion program among the programs stored in the program ROM of the control circuit. Fifth
The figure shows the outline of the letter "U". Sixth
The figure is a diagram showing a curve converted by the data conversion device overlaid on a pixel screen. FIG. 7 is a diagram showing the letter "U" overlaid on the pixel screen.
FIG. 8 shows the target coordinates obtained for the curve of FIG.
It is a figure showing and showing for every direction regulation line x. FIG. 9 is a table showing the display coordinates obtained for the above-mentioned curve for each of the x-direction defining lines x. FIG. 10 is a table showing the designation numbers of the display pixels obtained for the above-mentioned curves in a table for each x-direction defining line x. FIG. 11 is a diagram for explaining the correction for shortening the display line width. FIG. 12, FIG. 13 and FIG. 14 are diagrams for explaining the calculation of the target coordinates, the display coordinates, and the designated numbers of the display pixels of the character constituent lines. FIG. 15 is a diagram for explaining setting of dot data performed based on the designated number of the display pixel. 1: Microcomputer 44: Character composition line, 46: Contour line 52: Pixel screen, 54: Curve 56, 58, 60, 62: Character composition line x: x direction regulation line, y: y direction regulation line p: pixel section line
───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G09G 5/24 - 5/28 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int.Cl. 6 , DB name) G09G 5/24-5/28
Claims (1)
ラクタの輪郭を、互に直交するX軸方向とY軸方向とに
それぞれ平行な複数ずつのX方向規定線およびY方向規
定線により画素を規定する画素スクリーンに重ね合せた
と想定した場合に、キャラクタを構成するキャラクタ構
成線に対応する画素のドットデータをドットの存在を表
す存在データに設定するドットデータ設定手段を備え、
アウトラインデータをドットデータに変換するデータ変
換装置において、 前記キャラクタ構成線を画定する2本の輪郭線の前記X
方向規定線と前記Y方向規定線とのうちの一方の規定線
に平行な方向における間隔である目標線幅と、そのキャ
ラクタ構成線が前記存在データに基づいて形成されるド
ットにより表示される表示線幅とを、複数である前記一
方の規定線の各々について比較する目標線幅・表示線幅
比較手段と、 その目標線幅・表示線幅比較手段による比較の結果、前
記一方の規定線の各々について、目標線幅が表示線幅よ
り第一設定値以上大きい場合に前記存在データ数を増加
させる存在データ増加と、表示線幅が目標線幅より第二
設定値以上大きい場合に存在データ数を減少させる存在
データ減少との少なくとも一方を行って、目標線幅と表
示線幅との差を小さくする線幅修正手段と を設けたことを特徴とするデータ変換装置。1. A pixel defining a contour of a character represented by outline data by a plurality of X-direction defining lines and a plurality of Y-direction defining lines parallel to each other in an X-axis direction and a Y-axis direction orthogonal to each other. Provided is a dot data setting unit that sets dot data of a pixel corresponding to a character configuration line configuring a character to presence data representing the presence of a dot, assuming that the character is superimposed on the screen,
In a data conversion device for converting outline data into dot data, the X of two contour lines that define the character constituent line
A target line width which is an interval in a direction parallel to one of the direction defining line and the Y direction defining line, and a display in which the character constituent line is displayed by dots formed based on the existence data. A target line width / display line width comparing means for comparing the line width with each of the plurality of one specified lines; and a result of the comparison by the target line width / display line width comparing means. For each, the presence data increase to increase the number of existing data when the target line width is larger than the display line width by the first set value, and the presence data increase when the display line width is larger than the target line width by the second set value or more. A line width correcting means for performing at least one of the existing data reduction to reduce the difference between the target line width and the display line width.
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1054577A JP2903531B2 (en) | 1989-03-07 | 1989-03-07 | Data converter |
| US07/486,225 US5050228A (en) | 1989-03-04 | 1990-02-28 | Apparatus for converting image outline data into dot data representative of image dots |
| EP90302262A EP0389131B1 (en) | 1989-03-04 | 1990-03-02 | Apparatus for converting image outline data into dot data representative of image dots |
| DE69013378T DE69013378T2 (en) | 1989-03-04 | 1990-03-02 | Arrangement for converting image outline data into point data representing image points. |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1054577A JP2903531B2 (en) | 1989-03-07 | 1989-03-07 | Data converter |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH02234195A JPH02234195A (en) | 1990-09-17 |
| JP2903531B2 true JP2903531B2 (en) | 1999-06-07 |
Family
ID=12974554
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1054577A Expired - Fee Related JP2903531B2 (en) | 1989-03-04 | 1989-03-07 | Data converter |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2903531B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2666552B2 (en) * | 1990-10-01 | 1997-10-22 | 富士通株式会社 | Line width control method for outline characters |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS62272295A (en) * | 1986-05-20 | 1987-11-26 | 富士通株式会社 | Expansion/reduction system of character pattern with line width control function |
-
1989
- 1989-03-07 JP JP1054577A patent/JP2903531B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH02234195A (en) | 1990-09-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH03140060A (en) | Method of scaling picture | |
| US5018217A (en) | Data converting apparatus having means for changing ornamental stroke end data of character outline | |
| JPH04121788A (en) | Data conversion device | |
| JP2903531B2 (en) | Data converter | |
| JPH02232690A (en) | Data converting device | |
| GB2224913A (en) | Converting image outline data into image representative dots | |
| JP2816181B2 (en) | Document processing device | |
| JP3169013B2 (en) | Data output device | |
| JP3038840B2 (en) | Data converter | |
| JP2956705B2 (en) | Data converter | |
| JP2757411B2 (en) | Data converter | |
| JP3077180B2 (en) | Data converter | |
| JP3057811B2 (en) | Data converter | |
| JP3132507B2 (en) | Data output method | |
| JP3092172B2 (en) | Data converter | |
| JPH02231166A (en) | data conversion device | |
| JP3082228B2 (en) | Data converter | |
| JP2861127B2 (en) | Data converter | |
| JPH0747339B2 (en) | Data converter | |
| JP2881924B2 (en) | Data storage device | |
| JP2754579B2 (en) | Data converter | |
| JPH05341763A (en) | Device for generating character | |
| JP2881863B2 (en) | Data converter | |
| JPH0743584B2 (en) | Data converter | |
| JP2559697B2 (en) | Character processor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |