JPH096311A - Outline font plotting device - Google Patents
Outline font plotting deviceInfo
- Publication number
- JPH096311A JPH096311A JP7176699A JP17669995A JPH096311A JP H096311 A JPH096311 A JP H096311A JP 7176699 A JP7176699 A JP 7176699A JP 17669995 A JP17669995 A JP 17669995A JP H096311 A JPH096311 A JP H096311A
- Authority
- JP
- Japan
- Prior art keywords
- edge data
- data
- unit
- generation unit
- outline
- 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.)
- Pending
Links
- 239000013598 vector Substances 0.000 claims abstract description 26
- 238000006243 chemical reaction Methods 0.000 claims description 27
- 230000007704 transition Effects 0.000 claims description 12
- 230000000630 rising effect Effects 0.000 claims description 5
- 239000000284 extract Substances 0.000 claims description 2
- 238000000034 method Methods 0.000 abstract description 16
- 230000008569 process Effects 0.000 abstract description 6
- 238000010422 painting Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 21
- 238000013139 quantization Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 238000005429 filling process Methods 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 238000012800 visualization Methods 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Landscapes
- Digital Computer Display Output (AREA)
- Image Generation (AREA)
- Document Processing Apparatus (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、ベクトルにより輪郭の
みを記述された文字データについて、その輪郭の内部を
塗りつぶしてビットマップイメージを作成するアウトラ
インフォント描画装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an outline font drawing device for creating a bitmap image by filling the inside of the outline of character data in which only the outline is described by a vector.
【0002】[0002]
【従来の技術】従来、ワードプロセッサや計算機の印刷
装置等において、アウトラインフォントの輪郭の内部を
高速かつ高品質に塗りつぶすための技術が存在する。こ
の種の技術では、一般的に、輪郭の内部に中心を含む画
素を塗りつぶしていく。そして、その過程で以下の二つ
の規則を遵守する。 (a)画素の中心が輪郭の内部にあれば、可視化対象画
素とする。 (b)もし、二つの隣接する画素の中心を結ぶライン
を、輪郭をなす二つのべクトルが交差するとき、隣接す
る二つの画素のうちの一つの画素、又は両方の画素を可
視化対象とする。2. Description of the Related Art Conventionally, in a word processor, a printing device of a computer, or the like, there is a technique for filling the inside of the outline of an outline font with high speed and high quality. In this type of technique, generally, a pixel including the center is filled inside the contour. And, in the process, the following two rules are observed. (A) If the center of the pixel is inside the contour, the pixel is set as the visualization target pixel. (B) If two vectors forming an outline intersect a line connecting the centers of two adjacent pixels, one of the two adjacent pixels or both of the pixels are set as a visualization target. .
【0003】また、この種の技術では、輪郭データ生成
部により出力されるベクトルデータから、水平方向のス
キャン変換に対応するエッジデータを作成する。この
時、エッジデータの量子化を行い、整数値で記憶領域に
格納する。そして、これにより作成されたエッジデータ
が対応している方向(水平方向)へのスキャン変換を行
う。これにより、塗りつぶすべき画素の連続部分(以
降、この連続部分をランと称する。)を出力する。そし
て、出力されたランを記憶領域に書き込む(文献:Supe
r ASCII Vol.2 \#8 August 1991「DTPの基礎技術
(5)」大野義夫:株式会社アスキーp.138、 139参
照)。Further, in this type of technique, edge data corresponding to scan conversion in the horizontal direction is created from the vector data output by the contour data generator. At this time, the edge data is quantized and stored in the storage area as an integer value. Then, scan conversion is performed in the direction (horizontal direction) to which the edge data created thereby corresponds. As a result, a continuous portion of pixels to be filled (hereinafter, this continuous portion is referred to as a run) is output. Then, the output run is written in the storage area (reference: Supe
r ASCII Vol.2 \ # 8 August 1991 "Basic technology of DTP (5)" Yoshio Ohno: ASCII Corporation p.138, 139).
【0004】[0004]
【発明が解決しようとする課題】しかしながら、上述し
た従来の技術には、次のような課題があった。即ち、上
述したアウトラインフォントの輪郭の内部を塗りつぶす
技術では、特に、小ドットのビットマップフォントデー
タの作成時において、例えば、水平方向のスキャン変換
しか行わないため、図2に示すような輪郭の内部を塗り
つぶす場合に、図8に示すように、本来連続していなけ
ればならない部分が不連続になる(以下、この現象をド
ロップアウトと称する)ことがある。このため、高品質
なビットマップフォントデータの作成が困難であった。However, the above-mentioned prior art has the following problems. That is, in the above-described technique of filling the inside of the outline of the outline font, in particular, when only the small dot bitmap font data is created, for example, only horizontal scan conversion is performed. Therefore, the inside of the outline shown in FIG. In the case of filling in, the portion that should originally be continuous may become discontinuous (hereinafter, this phenomenon is referred to as dropout), as shown in FIG. Therefore, it is difficult to create high quality bitmap font data.
【0005】また、図11に示すように、塗りつぶすべ
き部分が細く、スキャンラインに対して傾斜が緩やかな
輪郭の内部を塗りつぶす場合には、図13に示すよう
に、本来連続していなければならない部分に、ドロップ
アウトが生じることがあった。これにより、高品質なビ
ットマップフォントデータを作成することが困難であっ
た。Further, as shown in FIG. 11, when the inside of a contour that is thin to be filled and has a gentle inclination with respect to the scan line is to be filled, it must originally be continuous as shown in FIG. Dropouts sometimes occurred in some parts. Therefore, it is difficult to create high quality bitmap font data.
【0006】[0006]
【課題を解決するための手段】本発明のアウトラインフ
ォント描画装置は、上述した課題を解決するため、以下
の点を特徴とするものである。 (1)1.文字コード、拡大率を含むアウトラインフォン
トの展開に必要な情報を入力する入力部を備える。 2.当該入力部により入力された情報とアウトラインフォ
ントデータから、始点及び終点をつないだベクトルによ
り表現される輪郭データを生成する輪郭データ生成部を
備える。The outline font drawing apparatus of the present invention is characterized by the following points in order to solve the above-mentioned problems. (1) 1. An input unit is provided for inputting information necessary for developing an outline font including a character code and enlargement ratio. 2. A contour data generation unit that generates contour data represented by a vector connecting a start point and an end point from the information input by the input unit and the outline font data is provided.
【0007】3.当該輪郭データ生成部により生成された
輪郭データと、第1の方向及びそれと垂直な第2の方向
のスキャンラインとのそれぞれの交点をエッジデータと
して検出するエッジデータ生成部を備える。 4.当該エッジデータ生成部により、検出された各エッジ
データを格納する記憶部を備える。 5.当該記憶部に格納されたエッジデータを取り出して、
補間処理を施し、その補間処理後のエッジデータを、元
の取り出した記憶領域に再度格納する補間処理部を備え
る。3. An edge data generation unit is provided which detects, as edge data, the respective intersections of the contour data generated by the contour data generation unit and the scan lines in the first direction and the second direction perpendicular thereto. . 4. The edge data generation unit includes a storage unit that stores each edge data detected. 5. Take out the edge data stored in the storage unit,
An interpolation processing unit that performs interpolation processing and stores the edge data after the interpolation processing again in the originally extracted storage area is provided.
【0008】(2)1.アウトラインデータを入力し、第
1の方向のエッジデータを生成する第1方向エッジデー
タ生成部を備える。 2.当該第1方向エッジデータ生成部により生成されたエ
ッジデータのスキャン変換を行うスキャン変換部を備え
る。 3.当該スキャン変換部によるスキャン変換の方向に垂直
な第2の方向について、エッジデータを生成する第2方
向エッジデータ生成部を備える。 4.当該第2方向エッジデータ生成部により生成されたエ
ッジデータの補間処理を行う第2方向エッジデータ補間
部を備える。(2) 1. A first direction edge data generator for inputting outline data and generating edge data in the first direction is provided. 2. A scan conversion unit that performs scan conversion of the edge data generated by the first direction edge data generation unit is provided. 3. A second-direction edge data generation unit that generates edge data in a second direction perpendicular to the scan conversion direction by the scan conversion unit is provided. 4. A second direction edge data interpolating unit that interpolates the edge data generated by the second direction edge data generating unit is provided.
【0009】(3)(2)において、第2方向エッジデ
ータ生成部は、上昇遷移、下降遷移のどちらかのアウト
ラインについてのみエッジデータを生成することを特徴
とする。(3) In (2), the second direction edge data generating section is characterized in that the edge data is generated only for the outline of either the rising transition or the falling transition.
【0010】[0010]
(1)エッジデータ生成部は、入力部及び輪郭データ生
成部から入力されたべクトルと水平方向のハーフピクセ
ルラインとの交点を順次検出し、例えば、四捨五入の丸
め処理により交点データの量子化を行う。この交点デー
タを量子化したものをエッジデータと呼ぶ。そして、求
めたエッジデータを記憶領域に格納する。エッジデータ
の格納は、実際には、エッジデータの画素位置に対応す
る記憶領域の中のビットをオンにすることにより行う。
このとき、すでにビットがオンになっている場合は、そ
のビットにおいて何も操作を行わない。水平方向エッジ
データの生成が終了すれば、同様にして、べクトルと、
垂直方向のハーフピクセルラインとの交点を順次検出
し、エッジデータを記憶領域に格納する。補間処理部
は、記憶領域に格納されたエッジデータを入力とし、水
平方向、あるいは垂直方向のどちらか一方向について、
エッジデータ間のオフになっているビットをオンにする
ことにより補間を行う。ただし、補間区間がない場合は
処理は行わない。(1) The edge data generation unit sequentially detects the intersections of the vectors input from the input unit and the contour data generation unit and the horizontal half-pixel lines, and quantizes the intersection data by rounding rounding, for example. . Quantized intersection data is called edge data. Then, the obtained edge data is stored in the storage area. The edge data is actually stored by turning on a bit in the storage area corresponding to the pixel position of the edge data.
At this time, if the bit is already turned on, no operation is performed on the bit. When the horizontal edge data generation is completed, the vector and
The intersections with the vertical half pixel lines are sequentially detected, and the edge data is stored in the storage area. The interpolation processing unit receives the edge data stored in the storage area as an input, and in one of the horizontal direction and the vertical direction,
Interpolation is performed by turning on the off bits between edge data. However, if there is no interpolation section, no processing is performed.
【0011】(2)水平方向エッジデータ生成部は、ア
ウトラインデータを入力し、水平方向エッジデータを生
成し、第1の記憶領域に格納する。これと同時に、垂直
方向エッジデータ生成部は、同じアウトラインデータを
入力し、垂直方向エッジデータを生成し、第2の記憶領
域に格納する。即ち、水平方向エッジデータ生成部は、
アウトラインと水平方向のスキャンラインとの交点を順
次検出し、例えば四捨五入の丸め処理により量子化を行
う。この場合、水平方向エッジデータでは、垂直方向に
おいて上昇遷移、下降遷移のどちらのアウトラインにつ
いてもエッジデータの生成を行う。そして、生成したエ
ッジデータを第1の記憶領域に格納する。実際には、エ
ッジデータの位置に対応する第1の記憶領域中のビット
をオンにする。一方、垂直方向エッジデータ生成部は、
アウトラインと垂直方向のスキャンラインとの交点を順
次検出し、四捨五入の丸め処理により量子化を行う。ス
キャン変換部は、水平方向エッジデータを入力し、対に
なるエッジデータ間を塗りつぶす。この時、エッジデー
タとピクセルの実際の位置との整合をとるため、対にな
るエッジデータのうち左側のエッジデータはオンにする
が、右側のエッジデータはオフにするようにしてスキャ
ン変換を行う。そして、第3の記憶領域に結果を出力す
る。(2) The horizontal edge data generator receives the outline data, generates horizontal edge data, and stores it in the first storage area. At the same time, the vertical edge data generation unit inputs the same outline data, generates vertical edge data, and stores it in the second storage area. That is, the horizontal edge data generation unit
The intersections of the outlines and the scan lines in the horizontal direction are sequentially detected, and quantization is performed by rounding processing, for example, rounding. In this case, with the horizontal edge data, edge data is generated for both outlines of rising transitions and falling transitions in the vertical direction. Then, the generated edge data is stored in the first storage area. Actually, the bit in the first storage area corresponding to the position of the edge data is turned on. On the other hand, the vertical edge data generation unit
The intersection between the outline and the scan line in the vertical direction is sequentially detected, and quantization is performed by rounding processing. The scan conversion unit inputs the horizontal edge data and fills in between the pair of edge data. At this time, in order to match the edge data with the actual position of the pixel, the left edge data of the pair of edge data is turned on, but the right edge data is turned off to perform the scan conversion. . Then, the result is output to the third storage area.
【0012】(3)(2)において、垂直方向エッジデ
ータでは、水平方向において下降遷移のアウトラインに
ついてのみエッジデータの生成を行う。この結果、補間
処理によるオーバーヘッドを軽減することができる。(3) In (2), for the edge data in the vertical direction, the edge data is generated only for the outline of the falling transition in the horizontal direction. As a result, the overhead due to the interpolation processing can be reduced.
【0013】[0013]
【実施例】以下、本発明の実施例を図面を参照して詳細
に説明する。 (第1の実施例)図1は、本発明のアウトラインフォン
ト描画装置の第1の実施例のブロック図である。図示の
装置は、入力部1、輪郭データ生成部2、エッジデータ
生成部3、記憶部4、補間処理部5を備えている。入力
部1は、文字を構成するのに必要な情報を抽出し、輪郭
データ生成部2に入力する。輪郭データ生成部2は、入
力部1から入力される表示すべき文字の情報をもとに、
適宜アウトラインフォントデータにアクセスし、文字の
輪郭の拡大、縮小、及び曲線区間の直線近似などの処理
を行う。そして、文字の輪郭を形成するベクトルデータ
を出力する。Embodiments of the present invention will now be described in detail with reference to the drawings. (First Embodiment) FIG. 1 is a block diagram of the outline font drawing apparatus according to the first embodiment of the present invention. The illustrated apparatus includes an input unit 1, a contour data generation unit 2, an edge data generation unit 3, a storage unit 4, and an interpolation processing unit 5. The input unit 1 extracts information necessary to form a character and inputs it to the contour data generation unit 2. The contour data generation unit 2 is based on the information of the characters to be displayed which is input from the input unit 1.
The outline font data is appropriately accessed to perform processing such as enlargement / reduction of the outline of the character and linear approximation of the curved section. Then, the vector data forming the contour of the character is output.
【0014】エッジデータ生成部3は、始点と終点の座
標で表されたべクトルデータを入力として、水平方向
(第1方向)におけるエッジデータを作成し、記憶部4
に格納する。そして、これと同時に、垂直方向における
エッジデータを作成し、記憶部4に格納する。補間処理
部5は、エッジデータ生成部3によって格納されたエッ
ジデータを入力とし、最終的な出力となる表示すべき文
字のビットマップフォントデータを作成し、記憶部4に
再格納する。記憶部4は、RAM等から成り、一時的に
エッジデータを格納すると同時に、最終的な出力となる
表示すべき文字のビットマッップフォントデータを格納
する。この記憶部4は、1画素1ビットに対応させた記
憶領域である。The edge data generation unit 3 receives the vector data represented by the coordinates of the start point and the end point and creates edge data in the horizontal direction (first direction), and the storage unit 4
To be stored. At the same time, edge data in the vertical direction is created and stored in the storage unit 4. The interpolation processing unit 5 receives the edge data stored by the edge data generation unit 3 as input, creates bitmap font data of a character to be displayed, which is a final output, and stores it again in the storage unit 4. The storage unit 4 is composed of a RAM or the like, and temporarily stores edge data, and at the same time, stores bit map font data of a character to be displayed which is a final output. The storage unit 4 is a storage area corresponding to 1 bit per pixel.
【0015】次に、輪郭データ生成部2から出力される
ベクトルデータを入力とし、エッジデータを作成するエ
ッジデータ生成部3の詳細を、図2、図3、図4を参照
して説明する。エッジデータ生成部3は、図2で示すv
1からv4までのベクトルを順次入力し、エッジデータ
を作成する。具体例を以下に述べる。エッジデータ生成
部3は、図2のべクトルv1と水平方向のハーフピクセ
ルラインとの交点を順次検出し、四捨五入の丸め処理に
より交点データの量子化を行う。即ち、水平方向スキャ
ンの場合、垂直方向について正の向きのベクトルについ
ては、四捨五入値をエッジデータとする。また、負の向
きのべクトルについては、四捨五入値から“1”を減算
した値をエッジデータとする。一方、垂直方向スキャン
の場合は、水平方向について正の向きのべクトルについ
ては、四捨五入値から“1”を減算した値をエッジデー
タとする。そして、負の向きのべクトルについては、四
捨五入値をエッジデータとする。Next, the details of the edge data generation unit 3 that receives the vector data output from the contour data generation unit 2 and creates edge data will be described with reference to FIGS. 2, 3, and 4. The edge data generation unit 3 uses v shown in FIG.
Edge vectors are created by sequentially inputting vectors 1 to v4. A specific example will be described below. The edge data generation unit 3 sequentially detects the intersections of the vector v1 in FIG. 2 and the horizontal half pixel lines, and quantizes the intersection data by rounding and rounding. That is, in the case of horizontal scanning, a rounded-off value is used as edge data for a vector having a positive vertical direction. Further, for a vector in the negative direction, a value obtained by subtracting "1" from the rounded value is used as edge data. On the other hand, in the case of scanning in the vertical direction, the value obtained by subtracting “1” from the rounded-off value is used as the edge data for the vector in the positive direction in the horizontal direction. Then, for the vector in the negative direction, the rounded-off value is used as the edge data.
【0016】次に、このようにして求めたエッジデータ
を記憶部4に格納する。エッジデータの格納は、実際に
は、エッジデータの画素位置に対応する記憶部4の中の
ビットをオンにすることにより行う。ここで、オンとは
“1”を示し、オフとは“0”を示すことにする。この
とき、すでにビットがオンになっている場合は、そのビ
ットにおいて何も操作を行わない。水平方向エッジデー
タの生成が終了すれば、同様にして、図2のべクトルv
1と、垂直方向のハーフピクセルラインとの交点を順次
検出し、エッジデータを記憶部4に格納する。図3にお
いて、小文字のアルファベットで示す点は、ベクトルv
1と水平方向のハーフピクセルラインとの交点であっ
て、大文字のアルファベットで示す点は、ベクトルv1
と垂直方向のハーフピクセルラインとの交点である。Next, the edge data thus obtained is stored in the storage unit 4. The edge data is actually stored by turning on the bit in the storage unit 4 corresponding to the pixel position of the edge data. Here, ON means "1" and OFF means "0". At this time, if the bit is already turned on, no operation is performed on the bit. When the generation of the horizontal edge data is completed, the vector v in FIG.
The intersections of 1 and the vertical half-pixel line are sequentially detected, and the edge data is stored in the storage unit 4. In FIG. 3, points indicated by lowercase alphabets are vector v
The point of intersection of 1 and the horizontal half-pixel line, which is indicated by a capital letter, is the vector v1.
And the vertical half-pixel line.
【0017】図4は、ベクトルv1におけるエッジデー
タを、1画素1ビットに対応する記憶部4に格納した状
態を示すものである。例えば、図4中の記憶領域[5,
2]のビットは、図3における水平方向のスキャンによ
り検出された交点bと垂直方向のスキャンにより検出さ
れた交点Fにおけるエッジデータの両方を示す。上述し
た処理をベクトルv2からv4までに対しても同様に行
う。ベクトルv1からv4までの全てのベクトルについ
てエッジデータを作成して記憶した状態を図5に示す。FIG. 4 shows a state in which the edge data in the vector v1 is stored in the storage unit 4 corresponding to 1 bit per pixel. For example, the storage area [5 in FIG.
2] indicates both the edge data at the intersection point b detected by the horizontal scanning and the edge data at the intersection point F detected by the vertical scanning in FIG. The above-described processing is similarly performed for the vectors v2 to v4. FIG. 5 shows a state in which edge data is created and stored for all the vectors v1 to v4.
【0018】補間処理部5は、図5に示す記憶部4に格
納されたエッジデータを入力とし、水平方向、あるいは
垂直方向のどちらか一方向について(本実施例では水平
方向を選択)、エッジデータ間のオフになっているビッ
トをオンにすることにより補間を行う。ただし、補間区
間がない場合は処理は行わない。本実施例の場合は補間
区間がないため、エッジデータを格納した図5に示す記
憶部4の内容が、最終出力となる表示すべき文字のビッ
トマップフォントデータとなる。このビットマップフォ
ントデータを可視化した様子を図9に示す。これに対
し、補間処理が必要となる場合の記憶部4の状態を図6
に示す。そして、その記憶部4に格納されたエッジデー
タを入力とし補間処理を行って、最終的に出力する表示
文字のビットマップフォントデータの状態を図7に示
す。The interpolation processing unit 5 receives the edge data stored in the storage unit 4 shown in FIG. 5 as an input, and in either one of the horizontal direction and the vertical direction (in this embodiment, selects the horizontal direction), the edge. Interpolation is performed by turning on bits that are off between data. However, if there is no interpolation section, no processing is performed. In the case of this embodiment, since there is no interpolation section, the contents of the storage unit 4 shown in FIG. 5 in which the edge data is stored become the bitmap font data of the character to be displayed which is the final output. FIG. 9 shows how the bitmap font data is visualized. On the other hand, the state of the storage unit 4 when the interpolation process is required is shown in FIG.
Shown in Then, FIG. 7 shows the state of the bitmap font data of the display character that is finally output by performing the interpolation process using the edge data stored in the storage unit 4 as an input.
【0019】以上のようにして、従来のように、水平方
向のスキャン変換だけでは、図8に示す通り、本来連続
していなければならない部分が、ビットマップイメージ
を作成する際に不連続となり、高品質なビットマップフ
ォントデータを得ることができなかったのが、本発明に
より、効率的に補間処理を施すことができる。即ち、本
発明によれば、エッジデータ生成部3は、水平・垂直両
方向エッジデータを生成するため、図9に示す通り、ド
ロップアウトがない高品質なビットマップフォントデー
タを得ることができる。また、エッジデータ生成部3
は、水平方向におけるエッジデータと、垂直方向におけ
るエッジデータを共通の記憶部4に格納するため、メモ
リ消費量の削減が可能となる。As described above, in the conventional horizontal scan conversion alone, as shown in FIG. 8, a portion that should originally be continuous becomes discontinuous when a bitmap image is created. Although high quality bitmap font data could not be obtained, the present invention enables efficient interpolation processing. That is, according to the present invention, since the edge data generation unit 3 generates horizontal / vertical direction edge data, it is possible to obtain high-quality bitmap font data without dropout, as shown in FIG. In addition, the edge data generation unit 3
Since the edge data in the horizontal direction and the edge data in the vertical direction are stored in the common storage unit 4, the memory consumption can be reduced.
【0020】そして、補間処理部5においては、水平、
あるいは垂直の一方向による補間処理のみ行うため、水
平・垂直両方向のスキャンによるタイムロスを削減で
き、しかも、エッジデータを格納した記憶部4に最終出
力となる表示すべき文字のビットマップフォントデータ
を再度格納するため、よりいっそうのメモリ消費量の削
減を実現できる。In the interpolation processing section 5, the horizontal,
Alternatively, since only interpolation processing in one vertical direction is performed, time loss due to scanning in both horizontal and vertical directions can be reduced, and the bitmap font data of the character to be displayed, which is the final output, is again stored in the storage unit 4 storing the edge data. Since it is stored, further reduction in memory consumption can be realized.
【0021】(第2の実施例)次に、本発明の第2の実
施例を説明する。図10は、本発明のアウトラインフォ
ント描画装置の第2の実施例のブロック図である。図示
の装置は、水平方向(第1方向)エッジデータ生成部1
1、スキャン変換部12、垂直方向(第2方向)エッジ
データ生成部13、垂直方向(第2方向)エッジデータ
補間部14等を備えている。水平方向エッジデータ生成
部11は、アウトラインデータ15を入力とし、水平方
向エッジデータを生成する。そして、生成したエッジデ
ータを第1の記憶領域16に格納する。(Second Embodiment) Next, a second embodiment of the present invention will be described. FIG. 10 is a block diagram of the outline font drawing apparatus according to the second embodiment of the present invention. The illustrated apparatus is a horizontal direction (first direction) edge data generation unit 1
1, a scan conversion unit 12, a vertical direction (second direction) edge data generation unit 13, a vertical direction (second direction) edge data interpolation unit 14, and the like. The horizontal edge data generation unit 11 receives the outline data 15 and generates horizontal edge data. Then, the generated edge data is stored in the first storage area 16.
【0022】スキャン変換部12は、第1の記憶領域1
6に格納されている水平方向エッジデータを入力とし、
スキャン変換を行う。そして、最終結果となるビットマ
ップイメージを第3の記憶領域18に出力する。垂直方
向エッジデータ生成部13は、アウトラインデータ15
を入力とし、垂直方向エッジデータを生成する。そし
て、生成したエッジデータを第2の記憶領域17に格納
する。垂直方向エッジデータ補間部14は、第2の記憶
領域17に格納されている垂直方向エッジデータを入力
とし、そのエッジデータを第3の記憶領域18に格納す
る。The scan conversion unit 12 includes the first storage area 1
Input the horizontal edge data stored in 6,
Perform scan conversion. Then, the final bitmap image is output to the third storage area 18. The vertical edge data generation unit 13 uses the outline data 15
Is input and vertical edge data is generated. Then, the generated edge data is stored in the second storage area 17. The vertical edge data interpolation unit 14 receives the vertical edge data stored in the second storage area 17, and stores the edge data in the third storage area 18.
【0023】次に、上述した装置の動作を図11の例を
用いて説明する。水平方向エッジデータ生成部11は、
図11に示すアウトラインデータを入力し、水平方向エ
ッジデータを生成する。そして、エッジデータを第1の
記憶領域16に格納する。これと同時に、垂直方向エッ
ジデータ生成部13は、図11に示すアウトラインデー
タを入力し、垂直方向エッジデータを生成する。そし
て、そのエッジデータを第2の記憶領域17に格納す
る。この過程の具体例を以下に述べる。Next, the operation of the above-mentioned device will be described using the example of FIG. The horizontal edge data generation unit 11
The outline data shown in FIG. 11 is input to generate horizontal edge data. Then, the edge data is stored in the first storage area 16. At the same time, the vertical edge data generation unit 13 inputs the outline data shown in FIG. 11 and generates vertical edge data. Then, the edge data is stored in the second storage area 17. A specific example of this process will be described below.
【0024】水平方向エッジデータ生成部11は、図1
1に示すアウトラインと水平方向のスキャンラインとの
交点を順次検出し、四捨五入の丸め処理により量子化を
行う。水平方向エッジデータでは、垂直方向において上
昇遷移、下降遷移のどちらのアウトラインについてもエ
ッジデータの生成を行う(図14参照)。そして、生成
したエッジデータを第1の記憶領域16に格納する。エ
ッジデータを格納するための手段には、線形リスト方
式、1ピクセルを1ビットで表現するビットマップ方
式、1ピクセル1バイトで表現する配列方式などさまざ
まな方式があるが、本実施例では、ビットマップ方式を
用いて説明する。実際には、エッジデータの位置に対応
する第1の記憶領域16の中のビットをオンにする。こ
こで、オンは“1”を、オフは“0”を示す。このよう
にして生成された水平方向エッジデータを、ビットマッ
プ方式を用いて第1の記憶領域16に格納した様子を図
15に示す。The horizontal edge data generator 11 is shown in FIG.
The intersections of the outline shown in 1 and the scan lines in the horizontal direction are sequentially detected, and quantization is performed by rounding processing of rounding. With horizontal edge data, edge data is generated for both outlines of rising transitions and falling transitions in the vertical direction (see FIG. 14). Then, the generated edge data is stored in the first storage area 16. As means for storing the edge data, there are various methods such as a linear list method, a bitmap method for expressing 1 pixel by 1 bit, and an array method for expressing 1 pixel by 1 byte. This will be explained using the map method. Actually, the bit in the first storage area 16 corresponding to the position of the edge data is turned on. Here, ON indicates “1” and OFF indicates “0”. FIG. 15 shows a state in which the horizontal edge data thus generated is stored in the first storage area 16 using the bitmap method.
【0025】垂直方向エッジデータ生成部13は、図1
1に示すアウトラインと垂直方向のスキャンラインとの
交点を順次検出し、四捨五入の丸め処理により量子化を
行う。垂直方向エッジデータでは、水平方向において下
降遷移のアウトラインについてのみエッジデータの生成
を行う(図17参照)。生成された垂直方向エッジデー
タを第2の記憶領域17に格納した様子を図18に示
す。スキャン変換部12は、水平方向エッジデータを入
力し、対になるエッジデータ間を塗りつぶす。この時、
エッジデータとピクセルの実際の位置との整合をとるた
め、対になるエッジデータのうち左側のエッジデータは
オンにするが、右側のエッジデータはオフにするように
してスキャン変換を行う。そして、第3の記憶領域18
に結果を出力する。全ての水平方向エッジデータについ
てスキャン変換を行った結果、生成されたビットマップ
イメージを図16に示す。The vertical edge data generator 13 is shown in FIG.
The intersection between the outline shown in 1 and the scan line in the vertical direction is sequentially detected, and quantization is performed by rounding processing. For the vertical edge data, the edge data is generated only for the outline of the falling transition in the horizontal direction (see FIG. 17). FIG. 18 shows a state in which the generated vertical edge data is stored in the second storage area 17. The scan conversion unit 12 receives horizontal edge data and fills in between the pair of edge data. This time,
In order to match the edge data with the actual position of the pixel, the left edge data of the pair of edge data is turned on, but the right edge data is turned off to perform the scan conversion. Then, the third storage area 18
Output the result to. FIG. 16 shows a bitmap image generated as a result of performing scan conversion on all horizontal edge data.
【0026】垂直方向エッジデータ補間部14は、垂直
方向エッジデータを入力し、そのエッジデータをビット
マップイメージとして第3の記憶領域18に出力する。
垂直方向エッジデータは生成時にエッジデータとピクセ
ルの実際の位置との整合をとっているため、エッジデー
タをそのままビットマップイメージとして補間すること
ができる。本実施例においては、第2の記憶領域と第3
の記憶領域についてOR演算を行うことにより垂直方向
エッジデータの補間を実現できる。垂直方向エッジデー
タの補間が完了したビットマップイメージを図19に示
す。The vertical edge data interpolating unit 14 inputs the vertical edge data and outputs the edge data to the third storage area 18 as a bit map image.
Since the edge data in the vertical direction is aligned with the actual position of the pixel at the time of generation, the edge data can be directly interpolated as a bitmap image. In this embodiment, the second storage area and the third storage area
Interpolation of the vertical edge data can be realized by performing an OR operation on the storage area. FIG. 19 shows a bitmap image in which interpolation of vertical edge data has been completed.
【0027】以上のようにして、水平方向のスキャン変
換でドロップアウトが発生する部分は、垂直方向に隣接
する2つのピクセルの中心を結ぶ線を対になる2つのア
ウトラインが横切る部分に限定できる。このため、本発
明のように垂直方向エッジデータの生成、補間をするこ
とによって、図19に示す通り、ドロップアウトがない
高品質なビットマップフォントデータを得ることができ
る。また、垂直方向エッジデータは、ドロップアウトが
発生する部分においては重複するため、本発明のよう
に、水平方向について上昇遷移、あるいは下降遷移のど
ちらかのアウトラインに対してエッジデータを生成する
だけで、高品質を保つことができる。As described above, the portion where the dropout occurs in the horizontal scan conversion can be limited to the portion where the two outlines forming a pair intersect the line connecting the centers of two vertically adjacent pixels. Therefore, by generating and interpolating vertical edge data as in the present invention, as shown in FIG. 19, high-quality bitmap font data without dropout can be obtained. Further, since the vertical edge data is overlapped at the portion where dropout occurs, it is only necessary to generate edge data for an outline of either a rising transition or a falling transition in the horizontal direction as in the present invention. , Can keep high quality.
【0028】このように、本実施例では、水平方向のス
キャン変換に対して、垂直方向エッジデータの生成、補
間の時間的オーバーヘッドを軽減し、高速に処理を行う
ことができる。また、エッジデータを格納するための手
段をビットマップ形式にした場合、ビットマップイメー
ジの生成に論理演算が使用でき、より高速に処理を行う
ことができる。更に、エッジデータの記憶領域とビット
マップイメージの記憶領域の共有化が可能となり、メモ
リ消費量の削減も可能となる。As described above, according to the present embodiment, the time overhead of the vertical edge data generation and interpolation can be reduced for the horizontal scan conversion, and the processing can be performed at high speed. Further, when the means for storing the edge data is in the bitmap format, a logical operation can be used to generate the bitmap image, and the processing can be performed at higher speed. Further, the storage area for the edge data and the storage area for the bitmap image can be shared, and the memory consumption can be reduced.
【0029】尚、本発明は上述した実施例に限定される
ものではなく、種々の変形が可能であることはもちろん
である。例えば、量子化については、四捨五入による丸
め処理以外にも、切捨て、切上げにより丸め処理を行う
こともできる。The present invention is not limited to the above-mentioned embodiments, and it goes without saying that various modifications can be made. For example, with regard to quantization, rounding processing may be performed by rounding down or rounding up, in addition to rounding processing by rounding.
【0030】また、上述した実施例では、水平方向のス
キャン変換を行い、垂直方向エッジデータを補間する場
合の説明を行ったが、水平方向と垂直方向の役割を入れ
替える場合のほか、本発明はあらゆる方向の処理につい
て有効である。つまり、ある方向にスキャン変換を行う
場合、スキャン方向に垂直な方向についてエッジデータ
の生成、補間を行うことにより本発明を実現することが
できる。更に、上述した実施例では、説明を容易にする
ために、また、水平方向のスキャン変換のみでは、不十
分であることを説明するために、非常に単純な文字の塗
りつぶし処理を例に用いた。このため、実施例において
は、垂直方向エッジデータのスキャン変換だけで、目的
のビットマップイメージを得ることが可能となってい
る。ところが、実際には、形状の複雑な、さまざまな文
字の塗りつぶし処理を行う必要があり、本発明は、その
ような形状の複雑な文字の塗りつぶしを行う際に、より
いっそうの効果を発揮することができる。また、アウト
ラインフォントに限定することなく、ページ記述言語な
どにより出力されるさまざまな図形の塗りつぶしについ
ても効果を発揮することができる。Further, in the above-described embodiment, the case where the scan conversion in the horizontal direction is performed and the edge data in the vertical direction is interpolated has been described, but the present invention is not limited to the case where the roles of the horizontal direction and the vertical direction are exchanged. Effective for processing in all directions. That is, when scan conversion is performed in a certain direction, the present invention can be realized by generating and interpolating edge data in a direction perpendicular to the scan direction. Further, in the above-described embodiment, a very simple character filling process is used as an example in order to facilitate the description and to explain that the horizontal scan conversion is not sufficient. . Therefore, in the embodiment, the target bitmap image can be obtained only by scan conversion of the vertical edge data. However, in reality, it is necessary to perform a filling process of various characters having a complicated shape, and the present invention exerts a further effect when filling a complicated character of such a shape. You can Further, the effect is not limited to the outline font, and it is also possible to exert an effect on the filling of various figures output by a page description language or the like.
【0031】[0031]
【発明の効果】以上説明したように、本発明のアウトラ
インフォント描画装置によれば、第1の方向とこれと垂
直な第2の方向についてエッジデータを生成し、いずれ
か一方向について補間処理を行うようにしたので、次の
ような効果がある。即ち、アウトラインフォントの輪郭
の内部を塗りつぶす際、特に、小ドットのビットマップ
フォントデータを作成する場合においても、ドロップア
ウトが生じることを防止することができる。このため、
高品質なビットマップフォントデータを容易に作成する
ことができる。また、塗りつぶすべき部分が細く、スキ
ャンラインに対して傾斜が緩やかな輪郭の内部を塗りつ
ぶす場合にも、本来連続していなければならない部分
に、ドロップアウトが生じることを防止することができ
る。これにより、高品質なビットマップフォントデータ
を作成することが容易となる。As described above, according to the outline font drawing apparatus of the present invention, edge data is generated in the first direction and the second direction perpendicular to the first direction, and interpolation processing is performed in either one of the directions. Since this is done, it has the following effects. That is, it is possible to prevent dropout when filling the inside of the outline of the outline font, especially when creating small dot bitmap font data. For this reason,
It is possible to easily create high quality bitmap font data. Further, even when a portion to be filled is thin and the inside of the contour having a gentle inclination with respect to the scan line is filled, it is possible to prevent dropout from occurring in a portion that should originally be continuous. This facilitates creation of high quality bitmap font data.
【図1】本発明のアウトラインフォント描画装置の第1
の実施例のブロック図である。FIG. 1 is a first outline font drawing apparatus according to the present invention.
FIG. 4 is a block diagram of an embodiment of FIG.
【図2】ベクトルデータの一例の説明図である。FIG. 2 is an explanatory diagram of an example of vector data.
【図3】水平及び垂直方向の交点データの一例の説明図
である。FIG. 3 is an explanatory diagram of an example of intersection data in horizontal and vertical directions.
【図4】記憶部の記憶内容(その1)の説明図である。FIG. 4 is an explanatory diagram of stored contents (1) in a storage unit.
【図5】記憶部の記憶内容(その2)の説明図である。FIG. 5 is an explanatory diagram of stored contents (No. 2) in the storage unit.
【図6】記憶部の記憶内容(その3)の説明図である。FIG. 6 is an explanatory diagram of stored contents (No. 3) in the storage unit.
【図7】記憶部の記憶内容(その4)の説明図である。FIG. 7 is an explanatory diagram of stored contents (No. 4) in the storage unit.
【図8】アウトラインデータの塗りつぶし結果(その
1)の説明図である。FIG. 8 is an explanatory diagram of a result of filling outline data (No. 1).
【図9】アウトラインデータの塗りつぶし結果(その
2)の説明図である。FIG. 9 is an explanatory diagram of a result (part 2) of filling outline data.
【図10】本発明のアウトラインフォント描画装置の第
2の実施例のブロック図である。FIG. 10 is a block diagram of a second embodiment of the outline font drawing apparatus of the present invention.
【図11】幅の狭いアウトラインの一例の説明図であ
る。FIG. 11 is an explanatory diagram of an example of a narrow outline.
【図12】幅の狭いアウトラインの塗りつぶし例(その
1)の説明図である。FIG. 12 is an explanatory diagram of a narrow outline filling example (No. 1).
【図13】幅の狭いアウトラインの塗りつぶし例(その
2)の説明図である。FIG. 13 is an explanatory diagram of a narrow outline filling example (No. 2).
【図14】エッジデータの生成結果(その1)の説明図
である。FIG. 14 is an explanatory diagram of a result (part 1) of generating edge data.
【図15】記憶領域内のビットの状態例(その1)の説
明図である。FIG. 15 is an explanatory diagram of a state example (1) of bits in a storage area.
【図16】記憶領域内のビットの状態例(その2)の説
明図である。FIG. 16 is an explanatory diagram of a state example (part 2) of bits in a storage area.
【図17】エッジデータの生成結果(その2)の説明図
である。FIG. 17 is an explanatory diagram of a result (2) of generation of edge data.
【図18】記憶領域内のビットの状態例(その3)の説
明図である。FIG. 18 is an explanatory diagram of an example (part 3) of states of bits in a storage area.
【図19】記憶領域内のビットの状態例(その4)の説
明図である。FIG. 19 is an explanatory diagram of a state example (4) of bits in a storage area.
1 入力部 2 輪郭データ生成部 3 エッジデータ生成部 4 記憶部 5 補間処理部 11 水平方向エッジデータ生成部 12 スキャン変換部 13 垂直方向エッジデータ生成部 14 垂直方向エッジデータ補間部 1 Input Section 2 Contour Data Generation Section 3 Edge Data Generation Section 4 Storage Section 5 Interpolation Processing Section 11 Horizontal Edge Data Generation Section 12 Scan Conversion Section 13 Vertical Edge Data Generation Section 14 Vertical Edge Data Interpolation Section
Claims (3)
フォントの展開に必要な情報を入力する入力部と、 当該入力部により入力された情報とアウトラインフォン
トデータから、始点及び終点をつないだベクトルにより
表現される輪郭データを生成する輪郭データ生成部と、 当該輪郭データ生成部により生成された輪郭データと、
第1の方向及びそれと垂直な第2の方向のスキャンライ
ンとのそれぞれの交点をエッジデータとして検出するエ
ッジデータ生成部と、 当該エッジデータ生成部により、検出された各エッジデ
ータを格納する記憶部と、 当該記憶部に格納されたエッジデータを取り出して、補
間処理を施し、その補間処理後のエッジデータを、元の
取り出した記憶領域に再度格納する補間処理部とを備え
たことを特徴とするアウトラインフォント描画装置。1. An input unit for inputting information necessary for developing an outline font including a character code and an enlargement ratio, and a vector connecting a start point and an end point from the information input by the input unit and the outline font data. A contour data generation unit that generates contour data, and contour data generated by the contour data generation unit,
An edge data generation unit that detects, as edge data, each intersection of a first direction and a scan line in a second direction perpendicular to the first direction, and a storage unit that stores each edge data detected by the edge data generation unit. And an interpolation processing unit that extracts the edge data stored in the storage unit, performs interpolation processing, and stores the edge data after the interpolation processing again in the storage region that was originally extracted. Outline font drawing device.
向のエッジデータを生成する第1方向エッジデータ生成
部と、 当該第1方向エッジデータ生成部により生成されたエッ
ジデータのスキャン変換を行うスキャン変換部と、 当該スキャン変換部によるスキャン変換の方向に垂直な
第2の方向について、エッジデータを生成する第2方向
エッジデータ生成部と、 当該第2方向エッジデータ生成部により生成されたエッ
ジデータの補間処理を行う第2方向エッジデータ補間部
とを備えたことを特徴とするアウトラインフォント描画
装置。2. A first direction edge data generation unit for inputting outline data and generating edge data in a first direction, and a scan for performing scan conversion of the edge data generated by the first direction edge data generation unit. A conversion unit, a second direction edge data generation unit that generates edge data in a second direction perpendicular to the scan conversion direction by the scan conversion unit, and edge data generated by the second direction edge data generation unit And a second-direction edge data interpolating unit that performs the interpolation processing of 1.
昇遷移、下降遷移のどちらかのアウトラインについての
みエッジデータを生成することを特徴とする請求項2記
載のアウトラインフォント描画装置。3. The outline font drawing device according to claim 2, wherein the second direction edge data generation unit generates edge data only for an outline of either a rising transition or a falling transition.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7176699A JPH096311A (en) | 1995-06-20 | 1995-06-20 | Outline font plotting device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7176699A JPH096311A (en) | 1995-06-20 | 1995-06-20 | Outline font plotting device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH096311A true JPH096311A (en) | 1997-01-10 |
Family
ID=16018204
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP7176699A Pending JPH096311A (en) | 1995-06-20 | 1995-06-20 | Outline font plotting device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH096311A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5490519A (en) * | 1987-06-05 | 1996-02-13 | Chartex International Plc | Tubular protective device for protection against transfer of infectious matter during sexual intercourse |
-
1995
- 1995-06-20 JP JP7176699A patent/JPH096311A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5490519A (en) * | 1987-06-05 | 1996-02-13 | Chartex International Plc | Tubular protective device for protection against transfer of infectious matter during sexual intercourse |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR970008546B1 (en) | How to handle text or figures | |
| US5519412A (en) | Pattern processing method | |
| JP3037854B2 (en) | Character generation method and device | |
| US5526474A (en) | Image drawing with improved process for area ratio of pixel | |
| JPH0322186A (en) | Image output method | |
| JP3034140B2 (en) | Character generation method and device | |
| JP2806679B2 (en) | Character generator | |
| JP3129717B2 (en) | Image processing apparatus and image processing method | |
| JPH0887602A (en) | Outline font plotter | |
| JP3573291B2 (en) | Character data creation method and character data creation device | |
| KR940001106B1 (en) | Line width correction method and device | |
| JP2782904B2 (en) | Polygon fill method | |
| JP3160957B2 (en) | Document creation device | |
| JPS62175794A (en) | Character generator | |
| JP3214722B2 (en) | Stroke character generator | |
| JP2619931B2 (en) | Character processing device and character processing method | |
| JP2976671B2 (en) | Data expansion method | |
| KR940007818B1 (en) | How to generate grayscale fonts | |
| JPH10143676A (en) | Picture processor and method for processing the same and recording medium | |
| JP2000259845A (en) | Polygon drawing method and polygon drawing device | |
| JPH01166094A (en) | Outline data storage system | |
| JPH0916147A (en) | Character processing apparatus and method | |
| JPH07141336A (en) | Character producing device | |
| JPH06162184A (en) | System and device for curve interpolation | |
| JPH02271422A (en) | Vector font generating device |