JPH0194385A - Reduction of vector font - Google Patents
Reduction of vector fontInfo
- Publication number
- JPH0194385A JPH0194385A JP62252969A JP25296987A JPH0194385A JP H0194385 A JPH0194385 A JP H0194385A JP 62252969 A JP62252969 A JP 62252969A JP 25296987 A JP25296987 A JP 25296987A JP H0194385 A JPH0194385 A JP H0194385A
- Authority
- JP
- Japan
- Prior art keywords
- point
- coordinate data
- coordinate
- memory
- points
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 claims description 53
- 238000006073 displacement reaction Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 10
- 238000011946 reduction process Methods 0.000 description 6
- 102100037204 Sal-like protein 1 Human genes 0.000 description 3
- 101000740205 Homo sapiens Sal-like protein 1 Proteins 0.000 description 2
- 230000001154 acute effect Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 235000016496 Panda oleosa Nutrition 0.000 description 1
- 240000000220 Panda oleosa Species 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
Description
【発明の詳細な説明】
「産業上の利用分野」
この発明は、電子出版、ワードプロセッサ等の分野にお
いて用いられるベクトルフォントの縮小方法に関する。DETAILED DESCRIPTION OF THE INVENTION "Field of Industrial Application" The present invention relates to a vector font reduction method used in fields such as electronic publishing and word processing.
「従来の技術」
例えば、ワードプロセッサにおいて毛筆文字を印字させ
ようとする場合、予め毛筆文字をスキャナやカメラ等に
よって読み取り、例えば256×256ドツトの2値デ
ータに変換する。次に、この2値データから文字のアウ
トラインを抽出し、輪郭線捕間データを生成し、辞書メ
モリ内に記憶させておく。そして、印字を行う場合は、
まず、辞書メモリから輪郭線補間データを読み出し、次
いで、この読み出したデータから、256x256ドツ
トの主要アウトラインポイントの座標を示す座標データ
を得る。次に、この座標データの縮小処理を行う。すな
わち、例えば印字を“48×48ドツト/1文1字°で
行う場合は、各座標データに48/256を乗算し、次
いで、この乗算結果の少数点以下を四捨五入によってま
るめる。次に、上述した縮小処理によって得られた座標
データをアウトラインパターンに変換する。これにより
、文字のアウトライン上のドツトが“l”、それ以外の
ドツトが“0”のパターンが得られる。第10図にこの
アウトラインパターンの一例を示す。この図において、
数字“l”以外の部分が“0”となる。``Prior Art'' For example, when printing calligraphy characters in a word processor, the calligraphy characters are read in advance with a scanner, camera, etc., and converted into binary data of, for example, 256×256 dots. Next, the outline of the character is extracted from this binary data to generate outline capture data and stored in the dictionary memory. And when printing,
First, contour interpolation data is read from the dictionary memory, and then coordinate data indicating the coordinates of the main outline points of 256x256 dots is obtained from the read data. Next, this coordinate data is reduced. That is, for example, when printing is performed at 48 x 48 dots/1 character degree, each coordinate data is multiplied by 48/256, and then the decimal part of this multiplication result is rounded off.Next, as described above, The coordinate data obtained by the reduction process is converted into an outline pattern.This results in a pattern in which the dots on the outline of the character are "l" and the other dots are "0".Figure 10 shows this outline. An example of a pattern is shown. In this figure,
The parts other than the number "l" are "0".
次に、上記アウトラインパターンにおける字の内部を“
l”で塗り潰す。このようにして毛筆文字のドツトパタ
ーン(48X48ドツト)が得られる。Next, change the inside of the character in the above outline pattern to “
1". In this way, a dot pattern (48 x 48 dots) of calligraphy characters is obtained.
「発明が解決しようとする問題点」
ところで、上述した従来の縮小処理においては、256
X256のパターン(1倍の再生時)では斜めに走って
いた複数のポイントが、第10図に符号Pを付して示す
ように、縮小およびまるめ処理の結果横−直線に並んで
しまう場合がある。このような場合、文字線の側部から
飛び出しが発生し、文字線の滑らかさが失われる問題が
あった。"Problem to be solved by the invention" By the way, in the conventional reduction processing described above, 256
In the X256 pattern (when played back at 1x), multiple points running diagonally may line up horizontally in a straight line as a result of the reduction and rounding process, as shown with the symbol P in Figure 10. be. In such a case, there is a problem in that the character lines protrude from the sides, causing the character lines to lose their smoothness.
この発明は、上述した文字線の側部の飛び出しを防止し
て、滑らかで品質のよい印字を可能とするベクトルフォ
ントの縮小方法を提供することを目的としている。An object of the present invention is to provide a vector font reduction method that prevents the above-mentioned protrusion of the sides of character lines and enables smooth, high-quality printing.
「問題点を解決するための手段」
この発明は、まるめ処理の結果、まるめ処理の前に斜め
に並んでいた複数のポイントが横方向に並んだ場合に、
文字線の太さがより細くなるように前記横方向に並んだ
ポイントの内の1つを選択し、他のポイントを消去する
ことを特徴としている。"Means for Solving the Problem" This invention solves the problem when, as a result of the rounding process, a plurality of points that were lined up diagonally before the rounding process are lined up horizontally.
The method is characterized in that one of the points arranged in the horizontal direction is selected and the other points are erased so that the thickness of the character line becomes thinner.
「作用」
この発明によれば、まるめ処理の結果横方向に並んだポ
イントを上記のように選択・消去するので、まるめ処理
に起因する文字線側部の飛び出しを防止することができ
る。"Operation" According to the present invention, points arranged in the horizontal direction as a result of the rounding process are selected and deleted as described above, so that it is possible to prevent the side parts of character lines from protruding due to the rounding process.
「実施例」
以下、図面を参照してこの発明の一実施例について説明
する。第1図はこの発明の一実施例によるベクトルフォ
ントの縮小方法を示すフローチャートである。"Embodiment" Hereinafter, an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a flowchart showing a vector font reduction method according to an embodiment of the present invention.
まず、ステップSalでは、辞書メモリから印字すべき
文字の関数フォントデータを読み出す。First, in step Sal, function font data of a character to be printed is read from the dictionary memory.
次いで、ステップSa2では、この読み出した関数フォ
ントデータから、256X256ドツトによるアウトラ
インパターン(すなわち、圧縮時の1倍に再生されたパ
ターン)の主要アウトラインポイントの座標データを算
出し、記憶手段に格納する。第2図(イ)は、同図(ロ
)に示すようにアウトラインが2個のループで構成され
たかな文字「い」の座標データが、メモリM1に格納さ
れている状態を示す。このメモリMlには、アウトライ
ン上の主要ポイントの座標データが、各ループ毎にルー
プスタートポイントから時計廻りの順で格納され、最後
にループエンドマークが付加されている。なお、上記座
標データの基準となる座標軸は、第2図(ロ)に示す通
りである。Next, in step Sa2, the coordinate data of the main outline points of the 256x256 dot outline pattern (that is, the pattern reproduced at 1 times the compression) is calculated from the read function font data and stored in the storage means. FIG. 2(a) shows a state in which the coordinate data of the kana character "i" whose outline is composed of two loops as shown in FIG. 2(b) is stored in the memory M1. In this memory Ml, coordinate data of main points on the outline are stored in clockwise order from the loop start point for each loop, and a loop end mark is added at the end. The coordinate axes on which the above coordinate data is based are as shown in FIG. 2 (b).
また、上記ステップSa2では、第3図に示すように、
メモリM2内に設定されているデータカウンタDC内に
、メモリMl内の座標データの総数が書き込まれる。さ
らに、このステップSa2において、メモリM2内に設
定されているスタートポイントスタックSP内に、各ル
ープのスタートポイントの座標データが書き込まれたメ
モリMlのアドレス(第2図(イ)におけるADa、A
Db。Furthermore, in step Sa2, as shown in FIG.
The total number of coordinate data in the memory M1 is written into the data counter DC set in the memory M2. Furthermore, in this step Sa2, the addresses of the memory Ml (ADa, A in FIG. 2(a)
Db.
ADc)が書き込まれる。なお、この例の場合、ループ
の総数は2個であるが、ループスタートポイント用スタ
ックには3個のアドレスが格納される。ADc) is written. In this example, the total number of loops is two, but three addresses are stored in the loop start point stack.
1番目と2番目のアドレスはそれぞれ1番目と2番目の
ループスタートポイントのアドレスであるが、3番目の
アドレスは2番目のループのループエンドマークの次の
アドレスが格納される。The first and second addresses are the addresses of the first and second loop start points, respectively, while the third address stores the address next to the loop end mark of the second loop.
次に、第1図のステップSa3へ進むと、ループスター
トフラグLSF(第3図)が“t”にセットされ、次い
でステップSa4において、ループカウンタLC(第3
図)にrlJがセットされる。この初期設定が終わると
ステップSa5に進む。ステップSa5では、データカ
ウンタDC内のデータが「0」か否かが判断される。そ
して、この判断結果が「NOJの場合は、ステップSa
6へ進む。ステップSa6では、メモリM1から最初の
座標データ(Xl。Next, in step Sa3 of FIG. 1, the loop start flag LSF (FIG. 3) is set to "t", and then in step Sa4, the loop counter LC (third
rlJ is set in (Figure). When this initial setting is completed, the process advances to step Sa5. In step Sa5, it is determined whether the data in the data counter DC is "0". Then, if the judgment result is "NOJ," step Sa
Proceed to step 6. In step Sa6, the first coordinate data (Xl.
Yl)が読み出される。次にステップSa7へ進むと、
データカウンタDCがデクリメントされる。Yl) is read out. Next, proceeding to step Sa7,
Data counter DC is decremented.
次に、ステップSa8では、ループスタートフラグLS
Fが“l”であるか否かが判断され、この判断結果がr
Y E S Jであれば、ステップSa9へ進む。Next, in step Sa8, the loop start flag LS
It is judged whether F is “l” or not, and this judgment result is r
If YES, the process advances to step Sa9.
ステップSa9では、メモリM2内のスタートポイント
スタックSP内に記憶されている次のループのスタート
アドレス(この場合、アドレスADb)に基づいて、現
在処理中のループのエンドポイントの1つ前のポイント
の座標データ(この場合、X 78. Y ta)が読
み出される。なお、ループのエンドポイントの座標デー
タ(X to、 Y 78)はループのスタートポイン
トの座標データ(X、、Yυと同一になる。また、以下
、上述したエンドポイントの1つ前のポイントの座標デ
ータを最終座標データという。次に、ステップ5alO
へ進むと、スタートポイントの方向属性がスタートポイ
ントの座標データおよび上述した最終座標データに基づ
いて検出され、次いで、ステップSat 1へ進むと、
スタートポイントの座標データの縮小演算が行なわれ、
次いでステップ5a12へ進むと、ステップSal 1
の演算結果のまるめ処理が行なわれる。なお、これらス
テップ5alO〜5a12の処理については後に詳述す
る。次に、ステップ5a13へ進むと、上記ステップS
al O,Sal 1の処理によって得られた縮小座標
データ(XI’、Ylo)がメモリM3(第2図(ハ)
)に書き込まれ、次いで、ステップ5a14へ進むと、
ループスタートフラグLSFがクリアされる。そして、
ステップSa5へ戻る。In step Sa9, based on the start address of the next loop (in this case, address ADb) stored in the start point stack SP in memory M2, the point immediately before the end point of the loop currently being processed is Coordinate data (in this case, X 78. Y ta) is read out. Note that the coordinate data of the end point of the loop (X to, Y 78) is the same as the coordinate data of the start point of the loop (X,, Yυ). The data is called final coordinate data.Next, step 5alO
Proceeding to step Sat 1, the direction attribute of the start point is detected based on the coordinate data of the start point and the final coordinate data described above, and then proceeding to step Sat 1,
A reduction calculation is performed on the coordinate data of the start point,
Next, proceeding to step 5a12, step Sal 1
Rounding of the calculation results is performed. Note that the processing in steps 5alO to 5a12 will be described in detail later. Next, when proceeding to step 5a13, the step S
The reduced coordinate data (XI', Ylo) obtained by the processing of al O, Sal 1 is stored in the memory M3 (Fig. 2 (c)
), and then proceeding to step 5a14,
Loop start flag LSF is cleared. and,
Return to step Sa5.
ステップSa5では、再びデータカウンタCDのデータ
が「0」か否かが判断され、次いでステップSa6へ進
むと、第2番目の座標データ(Xm、Yt)がメモリM
2から読み出される。次いでステップSa7へ進むと、
データカウンタCD内のデータがデクリメントされ、そ
して、ステップSa8へ進む。この場合、ステップSa
8の判断結果が「NO」となり(ステップ5a14参照
)、ステップ5a15へ進む。ステップ5a15では、
ステップSa6で読み出したデータがループエンドマー
クであるか否かが判断され、この判断結果が「NO」の
場合はステップSal 6へ進む。ステップ5a16で
は、処理済フラグS ZF(第3図)がI”であるか否
かが判断される。この処理済フラグSZFは初期状態に
おいてクリアされており、したがって、この時点ではス
テップ5a16の判断結果が「NO」となり、ステップ
5a17へ進む。ステップ5a17では、現在処理中の
ポイントの方向属性が検出され、次いでステップ5a1
8では、次に処理すべきポイントの方向属性が検出され
る。以下、この方向属性の検出について詳述する。In step Sa5, it is determined again whether the data in the data counter CD is "0" or not, and then in step Sa6, the second coordinate data (Xm, Yt) is stored in the memory M.
2. Next, proceeding to step Sa7,
The data in the data counter CD is decremented, and the process advances to step Sa8. In this case, step Sa
The result of the determination in step 8 is "NO" (see step 5a14), and the process proceeds to step 5a15. In step 5a15,
In step Sa6, it is determined whether or not the read data is a loop end mark. If the result of this determination is "NO", the process advances to step Sal6. In step 5a16, it is determined whether the processed flag SZF (FIG. 3) is I''. This processed flag SZF is cleared in the initial state, and therefore, at this point, the judgment in step 5a16 is The result is "NO" and the process advances to step 5a17. In step 5a17, the direction attribute of the point currently being processed is detected, and then in step 5a1
8, the direction attribute of the next point to be processed is detected. The detection of this direction attribute will be described in detail below.
まず、方向属性とは、前回処理したポイントから見た現
在処理中のポイントの方向であり、この実施例において
は、第4図に示す<1>〜く8〉の方向が決められてい
る。この方向属性の検出は次のようにして行なわれる。First, the direction attribute is the direction of the point currently being processed as seen from the previously processed point, and in this embodiment, the directions <1> to 8> shown in FIG. 4 are determined. Detection of this direction attribute is performed as follows.
すなわち、前回処理したポイントの座標に対する現在処
理中のポイントのX方向変位量(Xm Xm−t)と
Y方向変位量(Ym Yn+−1)を求め、その結果
、X方向変位量が正でY方向変位量が0の場合は方向属
性が<1>、X方向変位量が負でY方向変位量が0の場
合は方向属性がく2〉、X方向変位量が0でY方向変位
量が負の場合は方向属性が〈3〉、X方向変位量がOで
Y方向変位量が正の場合は方向属性〈4〉、X方向変位
量が正でY方向変位量が負の場合は方向属性が<5>、
X方向変位量が負でY方向変位量が正の場合は方向属性
が〈6〉、X方向変位量が負でY方向変位量が負の場合
は方向属性が〈7〉、X方向変位量が正でY方向変位量
が正の場合は方向属性が〈8〉となる。That is, the amount of displacement in the X direction (Xm If the amount of displacement in the direction is 0, the direction attribute is <1>; if the amount of displacement in the X direction is negative and the amount of displacement in the Y direction is 0, the direction attribute is <2>; if the amount of displacement in the If the displacement in the X direction is O and the displacement in the Y direction is positive, the attribute is <4>. If the displacement in the X direction is positive and the displacement in the Y direction is negative, the direction attribute is <3>. is <5>,
If the amount of displacement in the X direction is negative and the amount of displacement in the Y direction is positive, the direction attribute is <6>, and if the amount of displacement in the X direction is negative and the amount of Y direction displacement is negative, the direction attribute is <7>, the amount of X direction displacement. is positive and the amount of displacement in the Y direction is positive, the direction attribute becomes <8>.
以上のようにして、現在処理中のポイントおよび次に処
理すべきポイントの方向属性が求められると、ステップ
5a19に進む、。ステップ5a19では、現在処理中
のポイントが鋭角部または鈍角部であるか否かが、上述
したステップ5a17,5a18において検出された方
向属性に基づいて判断される。すなわち、第5図(イ)
〜(ニ)に示すように、現ポイントの方向属性1次ポイ
ントの方向属性が各々、<5 >、<6 >、<7 >
、<8 >、<6 >、<5 >、<8 >、<7 >
の場合は、1つ前のポイント、現ポイント、次ポイント
が鋭角をなし、一方、第5図(ホ)〜(チ)に示すよう
に、現ポイントの方向属性1次ポイントの方向属性が各
々、<5 >、<8 >、<6 >、<7〉、<7 >
、<5 >、< 8 > 、、’、6 >の場合は、1
つ前のポイント、現ポイント、次ポイントが鈍角をなす
。そこで、現ポイント、次ポイントの方向属性が第5図
のいずれかの場合は、ステップ5a19の判断結果がr
Y E S Jとなり、第5図のいずれでもない場合は
、判断結果がrNOJとなる。Once the direction attributes of the point currently being processed and the point to be processed next are determined as described above, the process proceeds to step 5a19. In step 5a19, it is determined whether the point currently being processed is an acute angle portion or an obtuse angle portion based on the directional attributes detected in steps 5a17 and 5a18 described above. In other words, Figure 5 (a)
As shown in ~(d), the direction attribute of the current point and the direction attribute of the primary point are <5>, <6>, and <7>, respectively.
, <8>, <6>, <5>, <8>, <7>
In the case of , the previous point, current point, and next point form an acute angle, and on the other hand, as shown in Figure 5 (E) to (H), the direction attribute of the current point and the direction attribute of the primary point each , <5>, <8>, <6>, <7>, <7>
, <5>, <8>, ,',6>, then 1
The previous point, current point, and next point form an obtuse angle. Therefore, if the direction attributes of the current point and the next point are any of those shown in FIG.
Y E S J, and if it is neither of the cases shown in FIG. 5, the judgment result will be rNOJ.
ステップSal 9の判断結果がrNOJの場合は、ス
テップ5a20へ進む。ステップ5a20では、現ポイ
ントの座標縮小演算が行なわれる。すなわち、例えば印
字を“48X48ドツト/1文字”で行う場合は、現在
処理中のポイントの座標データに48/256を乗算す
る。次にステップ5a21へ進むと、ステップ5a20
の演算結果の小数点以下をまるめる第1のまるめ処理が
行なわれる。If the determination result in step Sal 9 is rNOJ, the process advances to step 5a20. In step 5a20, a coordinate reduction calculation of the current point is performed. That is, for example, when printing is performed using "48x48 dots/character", the coordinate data of the point currently being processed is multiplied by 48/256. Next, proceeding to step 5a21, step 5a20
A first rounding process is performed to round off the calculation result below the decimal point.
このまるめ処理は、上述したステップ5a17において
検出された方向属性および第6図に示すテーブルに基づ
いて行なわれる。すなわち、現在処理中のポイントの方
向属性が例えば<1>の場合は縮小後のX座標の小数点
以下第1位が8捨9人され、また、縮小後のY座標の小
数点以下第1位が1捨2人される。同様に、方向属性が
例えば〈7〉の場合は、縮小後のX座標が1捨2人、Y
座標が1捨2人される。なお、第6図のテーブルには、
実際上は切り上げ/切り捨ての境界値が設定されている
。また、前述したステップSal 1,5a12の処理
も上述したステップSa20 、Si21の処理と同様
である。また、上記第1のまるめ処理に代えて、四捨五
入を行ってもよい。This rounding process is performed based on the direction attribute detected in step 5a17 described above and the table shown in FIG. In other words, if the direction attribute of the point currently being processed is, for example, <1>, the first decimal place of the reduced X coordinate will be 8 to 9, and the first decimal place of the reduced Y coordinate will be One person is thrown away, two people are thrown away. Similarly, if the direction attribute is <7>, for example, the X coordinate after reduction is 1 to 2 people, Y
Coordinates are given by 1 and 2 people. Furthermore, in the table of Figure 6,
In reality, a boundary value for rounding up/down is set. Further, the processing in steps Sal 1 and 5a12 described above is also similar to the processing in steps Sa20 and Si21 described above. Further, instead of the first rounding process described above, rounding may be performed.
次に、ステップ5a22へ進むと、前回縮小処理したポ
イントのY座標と現在縮小処理が終了したのポイントの
Y座標とが同一か否かが判断される。そして、この判断
結果がrNOJの場合、すなわち、前回処理済の縮小後
のポイントと現在処理が終了した縮小後のポイントが横
−直線上にない場合はステップ5a23へ進む。ステッ
プ5a23では、上記ステップSa20 、Si21の
処理によって得られた縮小座標データ(Xs’、Yt’
)がメモリM3(第2図(ハ))に書き込まれ、そして
、ステップSa5へ戻る。一方、ステップ5a22の判
断結果がrY E S Jの場合、すなわち、前回処理
済のポイントと現在処理が終了したポイントとが横−直
線上にある場合は、ステップ5a24へ進む。ステップ
5a24では、前回処理済のポイントの座標データと現
在縮小処理が終了したポイントの座標データの内の一方
を有効座標として選択する。Next, in step 5a22, it is determined whether the Y coordinate of the point previously reduced is the same as the Y coordinate of the point currently reduced. If the result of this judgment is rNOJ, that is, if the previously processed point after reduction and the point after current processing is not on the horizontal straight line, the process advances to step 5a23. In step 5a23, the reduced coordinate data (Xs', Yt'
) is written in the memory M3 (FIG. 2(c)), and the process returns to step Sa5. On the other hand, if the determination result in step 5a22 is rY E S J, that is, if the previously processed point and the point currently processed are on a horizontal straight line, the process advances to step 5a24. In step 5a24, one of the coordinate data of the previously processed point and the coordinate data of the point for which the current reduction process has been completed is selected as the valid coordinate.
この選択は第7図に示すテーブルに基づいて行なわれる
。以下、このテーブルについて説明する。This selection is made based on the table shown in FIG. This table will be explained below.
このテーブルにおいては、前回処理済のポイントの座標
をa(ax、by)、現在処理が終了したポイントの座
標をb(bx、by)としている。また、ax=bx+
1は、前ポイントのX座標が現ポイントのX座標より1
ポイント右方にある場合であり、ax=bx−1は前ポ
イントのX座標が現ポイントのX座標より1ポイント左
方にある場合であり、上記以外とは、2ポイント以上ず
れている場合である。また最上側の数値は現ポイントの
方向属性を示している。In this table, the coordinates of the previously processed point are a(ax, by), and the coordinates of the point currently processed are b(bx, by). Also, ax=bx+
1 means that the X coordinate of the previous point is 1 from the X coordinate of the current point.
This is the case where the point is to the right, and ax=bx-1 is the case where the X coordinate of the previous point is one point to the left of the X coordinate of the current point. be. The numerical value at the top indicates the direction attribute of the current point.
しかして、このテーブルから明らかなように、現ポイン
トの方向属性が<1 >、<2 >の場合は、もともと
(縮小前も)横にならんでいたポイントであり、したが
って、a(前ポイントの座標データ)、b(現記以外」
の場合もa、b共に有効となる。また、「ax=bx+
IJまたはrax=bx−1コの場合であって、現ポイ
ントの方向属性が〈3〉〜〈8〉の場合は、テーブルに
示す一方が選択される。As is clear from this table, if the direction attribute of the current point is <1 > or <2 >, it is a point that was originally lined up horizontally (even before reduction), and therefore a (of the previous point) coordinate data), b (other than current information)
In the case of , both a and b are valid. Also, “ax=bx+
In the case of IJ or rax=bx-1 and the direction attribute of the current point is <3> to <8>, one of the directions shown in the table is selected.
上述した選択が終了すると、ステップ5a25へ進む。When the above-mentioned selection is completed, the process proceeds to step 5a25.
このステップ5a25では、ステップ5a24において
選択された有効座標データがメモリM3に格納される。In this step 5a25, the effective coordinate data selected in step 5a24 is stored in the memory M3.
すなわち、まず、a、bとも有効の場合は、この時点で
座標データaが既にメモリM3に格納されていることか
ら、座標データbがメモリM3に格納される。また、座
標データaが選択された場合は、同座標データaがすで
に格納済であるので、なんの処理も行なわれない。また
、座標データbが選択された場合は、メモリM3にすで
に書き込まれている座標データaが消去され、代わりに
座標データbが書き込まれる。そして、ステップSa5
へ戻る。That is, first, if both a and b are valid, coordinate data b is stored in memory M3 since coordinate data a is already stored in memory M3 at this point. Further, if coordinate data a is selected, no processing is performed because the coordinate data a has already been stored. Further, when coordinate data b is selected, coordinate data a already written in the memory M3 is erased, and coordinate data b is written in its place. And step Sa5
Return to
他方、ステップ5a19の判断結果がrY E S J
の場合はステップ5a26へ進む。ステップSa2夕の
縮小演算が行なわれる。次にステップ5a27へ進むと
、ステップ5a26の演算結果に対して第2のまるめ処
理が行なわれる。この第2のまるめ処理は、ステップS
al 7.Sal 8において検出された方向属性およ
び第8図のテーブルに基づいて行なわれる。すなわち、
例えば、現ポイントの方向属性がく5〉、次ポイントの
方向属性が〈6〉の場合は、現ポイントのX座標を四捨
五入、Y座標を七拾八人によってまるめ、また、次ポイ
ントのX座標を七拾八人、Y座標を一拾二人によってま
るめる。また、例えば現ポイントの方向属性がく7〉、
次ポイントの方向属性が〈5〉であった場合は、現ポイ
ントのX座標を四捨五入、Y座標を二拾三人によってま
るめ、また、次ポイントのX座標を二拾三人、Y座標を
六拾七人によってまるめる。次にステップ5a28へ進
むと、現ポイントのまるめ処理の結果がメモリM3に書
き込まれ、また、次ポイントのまるめ処理の結果がメモ
リM2内に一時記憶される。次にステップ5a29へ進
むと、処理済フラグSZFに“1”が書き込まれる。こ
のフラグSZF“!”は、次ポイントの座標データの縮
小処理が既に終わっていることを示している。そして、
ステップSa5へ戻る。なお、第8図のテーブルには、
実際は切り上げ/切り捨ての境界値が設定されている。On the other hand, the determination result of step 5a19 is rY E S J
In this case, the process advances to step 5a26. The reduction calculation in step Sa2 is performed. Next, when the process proceeds to step 5a27, a second rounding process is performed on the calculation result of step 5a26. This second rounding process is performed in step S
al 7. This is done based on the direction attribute detected in Sal 8 and the table in FIG. That is,
For example, if the direction attribute of the current point is 5〉 and the direction attribute of the next point is 〈6〉, round the X coordinate of the current point, round the Y coordinate to the nearest whole number, and round off the X coordinate of the next point. 718 people, round the Y coordinate by 112 people. Also, for example, the direction attribute of the current point 7〉,
If the direction attribute of the next point is <5>, round the X coordinate of the current point, round the Y coordinate by 213 people, and round the X coordinate of the next point to 213 people, and the Y coordinate of the next point by 6 Rounded up by seven people. Next, when the process proceeds to step 5a28, the result of the rounding process for the current point is written to the memory M3, and the result of the rounding process for the next point is temporarily stored in the memory M2. Next, when the process advances to step 5a29, "1" is written in the processed flag SZF. This flag SZF "!" indicates that the reduction processing of the coordinate data of the next point has already been completed. and,
Return to step Sa5. In addition, the table in Figure 8 has the following information:
In reality, a boundary value for rounding up/down is set.
次にステップSa5 、Sa6 、Sa? 、Sa8.
5a15が逐次実行されて、ステップ5a16へ進む。Next steps Sa5, Sa6, Sa? , Sa8.
5a15 is executed sequentially, and the process advances to step 5a16.
そして、このステップSal 6の判断結果がrYES
」の場合は、ステップ5a30へ進む。ステップ5a3
0では、メモリM2内に一時記憶されている縮小および
第2のまるめ処理が終了した座標データがメモリM3内
に格納される。そして、ステップSa5へ戻る。Then, the judgment result of this step Sal 6 is rYES.
”, the process advances to step 5a30. Step 5a3
At 0, the coordinate data temporarily stored in the memory M2 and subjected to the reduction and second rounding processing is stored in the memory M3. Then, the process returns to step Sa5.
以下、同様にして、第1ループの各座標データが順次読
み出され、縮小処理される。そして、第1ループのルー
プエンドマークがメモリMlから読み出されると、ステ
ップSal 5の判断結果が「YES」となり、ステッ
プ5a31へ進む。ステップ5a31では、縮小処理後
のエンドポイントの座標データ(X 7s’ 、 Y
7+1” )が縮小処理後のスタートポイントの座標デ
ータ(xl”、y+’)に書き変えられる。なお、この
処理は、エンドポイントの座標データが常にスタートポ
イントの座標データと一致している必要があるため行う
処理である。次に、ステップ5a32へ進むと、ループ
スタートフラグLSFが′l”にセットされる。次いで
ステップ5a33へ進むと、ループカウンタLC内のデ
ータかインクリメントされ、「2」となる。そして、ス
テップSa5へ戻り、以後第2番目のループについて上
記と同様の縮小処理が行なわれる。Thereafter, each coordinate data of the first loop is sequentially read out and reduced in the same manner. Then, when the loop end mark of the first loop is read out from the memory Ml, the determination result in step Sal 5 becomes "YES" and the process proceeds to step 5a31. In step 5a31, the end point coordinate data (X 7s', Y
7+1'') is rewritten as the coordinate data (xl'', y+') of the start point after the reduction process. Note that this process is performed because the coordinate data of the end point must always match the coordinate data of the start point. Next, when the process proceeds to step 5a32, the loop start flag LSF is set to 'l''.The process then proceeds to step 5a33, where the data in the loop counter LC is incremented to ``2''. Then, the process returns to step Sa5, and thereafter, the same reduction process as above is performed for the second loop.
次に、メモリMl内の総ての座標データについて縮小処
理が終了すると、ステップSa5の判断結果がrY E
S Jとなり、ステップ5a34へ進む。Next, when the reduction process is completed for all the coordinate data in the memory Ml, the determination result in step Sa5 is rY E
The result is SJ, and the process proceeds to step 5a34.
ステップ5a34では、メモリM3内の座標データがア
ウトラインパターンに変換され、次いでそのアウトライ
ンの内部の塗り潰し処理が行なわれる。このようにして
、文字の内部が“l”、外部が“0”の縮小パターンが
得られる。In step 5a34, the coordinate data in the memory M3 is converted into an outline pattern, and then the inside of the outline is filled in. In this way, a reduced pattern in which the inside of the character is "l" and the outside is "0" is obtained.
以上がこの発明の一実施例によるベクトルフォントの縮
小方法である。次に、この発明のポイントである有効座
標決定処理(ステップ5a24;第7図参照)の効果を
説明する。いま、第9図における実線りを文字のアウト
ラインとし、点PI。The above is a vector font reduction method according to an embodiment of the present invention. Next, the effect of the effective coordinate determination process (step 5a24; see FIG. 7), which is the key point of this invention, will be explained. Now, let the solid line in Figure 9 be the outline of the character, and point PI.
P2を、縮小処理後であって、第2のまるめ処理前のポ
イントであるとし、点Plc、P2cを各々、点P 1
、P 2のまるめ処理後のポイントであるとする。こ
こで点Pie、P2cは横−直線上に並んでいる。この
場合、前ポイントP1のX座標aXと現ポイントP2の
X座標bxとは、ax=bx+1の関係にあり、また、
現ポイントP2の方向属性は〈6〉である。したがって
、第7図のテーブルに基づいて現ポイントの座標データ
bが選択される。すなわち、第9図のポイントP2cが
選択され、ポイントPieが消去される。この結果、文
字線から飛び出すポイントPLaが消去されることにな
る。Let P2 be the point after the reduction process and before the second rounding process, and the points Plc and P2c are each the point P1
, P 2 after rounding processing. Here, points Pie and P2c are lined up on a horizontal straight line. In this case, the X coordinate aX of the previous point P1 and the X coordinate bx of the current point P2 have a relationship of ax=bx+1, and
The direction attribute of the current point P2 is <6>. Therefore, the coordinate data b of the current point is selected based on the table shown in FIG. That is, point P2c in FIG. 9 is selected and point Pie is deleted. As a result, the point PLa that protrudes from the character line is erased.
「発明の効果」
以上説明したように、この発明によれば、縮小処理に基
づく文字線からの飛び出しを防止することができ、この
結果、滑らかで品質のよいベクトルフォントを再生し、
印字等に活用することができる。"Effects of the Invention" As explained above, according to the present invention, it is possible to prevent character lines from jumping out due to reduction processing, and as a result, smooth and high-quality vector fonts can be reproduced.
It can be used for printing, etc.
第1図はこの発明の一実施例によるベクトルフォント縮
小方法の処理過程を示すフローチャート、第2図(イ)
は縮小前の座標データが記憶されるメモリM1を示す図
、第2図(ロ)は文字の主要アウトラインポイントの一
例を示す図、第2図(ハ)は縮小後の座標データが記憶
されるメモリM3を示す図、第3図は一時記憶メモリM
2を示す図、第4図は方向属性を説明するための図、第
5図は方向属性の組み合わせを示す図、第6図は第1の
まるめ処理の境界値が設定されたテーブルを示す図、第
7図は有効座標決定処理において使用されるテーブルを
示す図、第8図は第2のまるめ処理の境界値が設定され
たテーブルを示す図、第9図はこの発明の詳細な説明す
るための図、第1θ図は文字のアウトラインパターンの
一例を示す図である。
Ml〜M3・・・・・・メモリ。FIG. 1 is a flowchart showing the process of a vector font reduction method according to an embodiment of the present invention, and FIG.
2 is a diagram showing the memory M1 in which the coordinate data before reduction is stored, FIG. 2 (b) is a diagram showing an example of the main outline points of characters, and FIG. A diagram showing the memory M3, FIG. 3 is a temporary storage memory M
2, FIG. 4 is a diagram for explaining direction attributes, FIG. 5 is a diagram showing combinations of direction attributes, and FIG. 6 is a diagram showing a table in which boundary values for the first rounding process are set. , FIG. 7 is a diagram showing a table used in the effective coordinate determination process, FIG. 8 is a diagram showing a table in which boundary values for the second rounding process are set, and FIG. 9 is a diagram showing a detailed explanation of the present invention. Figure 1.theta. is a diagram showing an example of a character outline pattern. Ml~M3...Memory.
Claims (1)
)を、指定された縮小率で縮小し、この縮小演算におい
て発生する少数点以下の数値をまるめ処理して縮小後の
座標を求めるベクトルフォントの縮小方法において、上
記まるめ処理の結果、まるめ処理前に斜めに並んでいた
複数のポイントが横方向に並んだ場合に、文字線の太さ
がより細くなるように前記横方向に並んだポイントの内
の1つを選択し、他のポイントを消去することを特徴と
するベクトルフォントの縮小方法。In a vector font reduction method that reduces the vector points (coordinates) that make up the outline of a character at a specified reduction rate, and rounds off the numbers below the decimal point that occur in this reduction operation to obtain the reduced coordinates. , as a result of the rounding process, when multiple points that were lined up diagonally before the rounding process are lined up horizontally, one of the points lined up horizontally so that the thickness of the character line becomes thinner. A vector font reduction method characterized by selecting one point and erasing the other points.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62252969A JP2506127B2 (en) | 1987-10-07 | 1987-10-07 | Vector font reduction method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP62252969A JP2506127B2 (en) | 1987-10-07 | 1987-10-07 | Vector font reduction method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH0194385A true JPH0194385A (en) | 1989-04-13 |
| JP2506127B2 JP2506127B2 (en) | 1996-06-12 |
Family
ID=17244674
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP62252969A Expired - Fee Related JP2506127B2 (en) | 1987-10-07 | 1987-10-07 | Vector font reduction method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2506127B2 (en) |
-
1987
- 1987-10-07 JP JP62252969A patent/JP2506127B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2506127B2 (en) | 1996-06-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPS58149579A (en) | Setting system of information input area | |
| JPH0336668A (en) | Shape generating system for cad system | |
| US5519412A (en) | Pattern processing method | |
| JPH0194386A (en) | Reduction of vector font | |
| JPH0351894A (en) | Information processing device equipped with a character pattern generation function using vector fonts | |
| JP2506127B2 (en) | Vector font reduction method | |
| JP3194779B2 (en) | Filling device | |
| JP2773127B2 (en) | Image editing method | |
| JPH05181848A (en) | Ruled line generating method | |
| JP2606176B2 (en) | Graphic processing unit | |
| JP2916534B2 (en) | Table output device | |
| JP2802646B2 (en) | A scaling method for character patterns using vector fonts | |
| JP2856604B2 (en) | Character processor | |
| JP2578748B2 (en) | Handwritten information processing method | |
| JP2545530B2 (en) | Document processing device | |
| JPH06131107A (en) | Pen input operation method and information processing apparatus | |
| JPS6175428A (en) | How to draw figures | |
| JPS58155474A (en) | Drawing method of parallel curve | |
| JPH01166205A (en) | Correction method for contour program | |
| JPH0298788A (en) | Similar conversion system for pattern | |
| JP2907425B2 (en) | Character processor | |
| JPH07262390A (en) | Character information processing method and device | |
| JPH0332111B2 (en) | ||
| JPS59202868A (en) | Printing control apparatus | |
| JPH0325576A (en) | Graphic processing system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| LAPS | Cancellation because of no payment of annual fees |