JPH0683313A - Contour correcting mehtod - Google Patents

Contour correcting mehtod

Info

Publication number
JPH0683313A
JPH0683313A JP4238629A JP23862992A JPH0683313A JP H0683313 A JPH0683313 A JP H0683313A JP 4238629 A JP4238629 A JP 4238629A JP 23862992 A JP23862992 A JP 23862992A JP H0683313 A JPH0683313 A JP H0683313A
Authority
JP
Japan
Prior art keywords
point
contour
line width
distance
line
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
Application number
JP4238629A
Other languages
Japanese (ja)
Other versions
JP3243293B2 (en
Inventor
Minoru Sakai
稔 境井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP23862992A priority Critical patent/JP3243293B2/en
Publication of JPH0683313A publication Critical patent/JPH0683313A/en
Application granted granted Critical
Publication of JP3243293B2 publication Critical patent/JP3243293B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Abstract

PURPOSE:To effectively correct variance in the line width of a stem due to a magnification varying process and a rounding. CONSTITUTION:The attributes of dots of outline data are checked (step 104); and an (x)-axial and a (y) axial rounding process are performed (step 105) for dots having an attribute 0, an (x)-axial adapting process (one example of line width corrections) and a (y)-axial rounding process is performed (step 106) for dots having an attribute 1. For dots having an attribute 2, an (x)-axial rounding process and a (y)-axial adapting process are carried out (step 107). For dots having an attribute 3, an (x)-axial and a (y)-axial adapting process are carried out (step 108).

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、アウトラインフォント
のヒンティングにおける輪郭線補正方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a contour line correction method in hinting an outline font.

【0002】[0002]

【従来の技術】図8は、アウトラインフォントの処理構
成図である。フォントファイル1から読み込まれたアウ
トラインデータは、展開部2において輪郭線として展開
され、次いで変倍処理部3で求める大きさに変倍され、
ヒンティング処理部4では、変倍されたアウトラインデ
ータに対して線幅補正などのヒンティングを施し、ラス
タライザ5で塗りつぶし処理が行われて輪郭内をドット
データ6に展開する。
2. Description of the Related Art FIG. 8 is a processing configuration diagram of an outline font. The outline data read from the font file 1 is expanded as a contour line in the expansion unit 2, and then scaled to a size obtained by the scaling unit 3,
In the hinting processing unit 4, hinting such as line width correction is performed on the scaled outline data, and a rasterizer 5 performs a filling process to develop the inside of the contour into dot data 6.

【0003】なお、上記した技術については、NIKK
EI BYTE/JUNE1992pp158−165
(文献1),同FEBRUARY 1992 pp11
2−123(文献2)において詳細に説明されている。
Regarding the above-mentioned technology, NIKK
EI BYTE / JUNE 1992pp158-165
(Reference 1), same FEBRRUARY 1992 pp11
2-123 (reference 2).

【0004】[0004]

【発明が解決しようとする課題】以下の説明において
は、ピクセルは格子点を左下隅とする単位正方形である
ものとし、従って、ピクセルの中心は、 (m+0.5 ,n+0.5) ただし、m,nは整数 にある。もちろん格子点をピクセル中心と仮定してもよ
い。
In the following description, it is assumed that the pixel is a unit square with the grid point at the lower left corner, and therefore the center of the pixel is (m + 0.5, n + 0.5) where m , N is an integer. Of course, the grid point may be assumed to be the pixel center.

【0005】256×256ピクセルの空間でデザイン
された文字“H”を、16×16ピクセルに縮小する例
を用いて、従来技術の問題点を説明する。フォントファ
イル1から読み込まれたアウトラインデータは、図9に
示すように輪郭線として展開される。このアウトライン
データを16×16ピクセルに縮小すると、図10のデ
ータが得られる。
The problem of the prior art will be described using an example in which a character "H" designed in a space of 256 × 256 pixels is reduced to 16 × 16 pixels. The outline data read from the font file 1 is developed as a contour line as shown in FIG. When the outline data is reduced to 16 × 16 pixels, the data shown in FIG. 10 is obtained.

【0006】ここで、塗りつぶし処理のために、例えば
輪郭線の上または内部にピクセル中心のあるピクセルが
反転するという、塗りつぶし規則を採用すると、左側の
縦ステムは2ピクセルになり、右側の縦ステムは1ピク
セルになってしまう。
Here, if a filling rule is adopted for the filling processing, that is, a pixel having a pixel center on or inside a contour line is inverted, the left vertical stem becomes 2 pixels and the right vertical stem. Becomes 1 pixel.

【0007】また、各点のx,y座標を四捨五入する
と、図11が得られ、この場合でも縦ステムの太さが違
ってしまう。一方、四捨五入ではなく、切り上げや切り
捨てを用いると、右側のステムが太くなり、左側のステ
ムが細くなってしまう。このような線幅がバラついたり
する問題点については、前掲した文献1の163ページ
においても指摘されている。これを解決する手法がヒン
ティングと呼ばれる技術である。
Further, when the x and y coordinates of each point are rounded off, FIG. 11 is obtained, and in this case as well, the thickness of the vertical stem is different. On the other hand, when rounding up or down is used instead of rounding, the stem on the right side becomes thicker and the stem on the left side becomes thinner. Such a problem that the line width varies is also pointed out on page 163 of the above-mentioned document 1. A technique for solving this is a technique called hinting.

【0008】本発明の目的は、変倍処理や丸めによって
生じるステムの線幅のバラツキを効果的に修正するアウ
トラインフォントの輪郭線補正方法を提供することにあ
る。
An object of the present invention is to provide a contour line contour correction method for an outline font, which effectively corrects variations in stem line width caused by scaling processing and rounding.

【0009】[0009]

【課題を解決するための手段】前記目的を達成するため
に、請求項1記載の発明では、アウトラインフォントの
輪郭線補正方法において、デザイン時におけるアウトラ
インを構成する第1の輪郭点に対応する輪郭線上の線分
までの距離が予め設定され、変倍処理後のアウトライン
を構成する第1の輪郭点を求め、前記デザイン時の距離
を現サイズに変倍した距離を求め、前記変倍後の第1の
輪郭点を前記変倍した距離だけ移動し、該移動した第2
の点において施されるヒンティングを、前記変倍後の第
1の輪郭点に施し、予め設定されている線幅だけ元の位
置に戻し、変倍前後の線幅の同一性を保持することを特
徴としている。
In order to achieve the above object, according to the invention of claim 1, in an outline font outline correction method, an outline corresponding to a first outline point forming an outline at design time. The distance to the line segment on the line is set in advance, the first contour point forming the outline after the scaling processing is obtained, the distance obtained by scaling the design distance to the current size is obtained, and the The first contour point is moved by the scaled distance, and the second
The hinting applied at the point is applied to the first contour point after the scaling and returned to the original position by the preset line width to maintain the line width identity before and after the scaling. Is characterized by.

【0010】請求項2記載の発明では、アウトラインフ
ォントの輪郭線補正方法において、デザイン時における
アウトラインを構成する第1の輪郭点に対応する輪郭線
上の線分までの距離が予め設定され、変倍処理後のアウ
トラインを構成する第1の輪郭点の第1の座標値を求
め、前記デザイン時の距離を現サイズに変倍した距離を
求め、前記変倍後の第1の輪郭点の第1の座標値に前記
変倍した距離を加算し、該加算された第2の座標値であ
る第2の点において施されるヒンティングを、前記変倍
後の第1の輪郭点に施し、該ヒンティングが施された第
1の輪郭点の第3の座標値から予め設定されている線幅
だけ減じた第4の座標値を求め、該求められた第4の座
標値に、前記ヒンティングが施された第1の輪郭点を移
動し、変倍前後の線幅の同一性を保持することを特徴と
している。
According to the second aspect of the present invention, in the outline font outline correction method, the distance to the line segment on the outline corresponding to the first outline point forming the outline at the time of design is set in advance and the scaling is performed. The first coordinate value of the first contour point forming the outline after processing is determined, the distance obtained by scaling the design distance to the current size is determined, and the first contour point is first scaled. The scaled distance is added to the coordinate value of the, and the hinting applied at the second point, which is the added second coordinate value, is applied to the scaled first contour point, A fourth coordinate value obtained by subtracting a preset line width from the third coordinate value of the hinted first contour point is obtained, and the hinting is applied to the obtained fourth coordinate value. Move the 1st contour point with It is characterized in that the retaining identity.

【0011】請求項3記載の発明では、アウトラインフ
ォントの輪郭線補正方法において、第1の輪郭点と第2
の輪郭点との中点である第3の点が存在し、デザイン時
における前記第1の輪郭点に対応する輪郭線上の線分ま
での距離と、ステムの持つべき線幅が予め設定され、該
デザイン時の距離と線幅を現サイズに変倍した距離と線
幅の値を、1/2にした第2の距離と第2の線幅を求
め、該第2の距離と第2の線幅を用いて、前記第1の輪
郭点と第2の輪郭点に対してヒンティングを施すことを
特徴としている。
According to a third aspect of the present invention, in the outline font outline correction method, the first outline point and the second outline point are used.
There is a third point that is a midpoint between the contour point and the contour point, and the distance to the line segment on the contour line corresponding to the first contour point at the time of design and the line width that the stem should have are set in advance, The second distance and the second line width obtained by halving the value of the distance and the line width obtained by scaling the distance and the line width at the time of designing are obtained, and the second distance and the second line width are calculated. The line width is used to perform hinting on the first contour point and the second contour point.

【0012】請求項4記載の発明では、前記線幅が奇数
の値をとるとき、前記中点に対するヒンティングはピク
セル中心への移動とし、前記線幅が偶数の値をとると
き、前記中点に対するヒンティングはピクセル境界への
移動とすることを特徴としている。
In the invention according to claim 4, when the line width takes an odd value, the hinting for the midpoint is to move to the pixel center, and when the line width takes an even value, the midpoint. Hinting for is characterized by a move to a pixel boundary.

【0013】[0013]

【作用】アウトラインデータの点の属性を調べ、属性0
の点についてはx軸方向、y軸方向に丸め処理を行い、
属性1の点については、x軸方向には適合処理を行い、
y軸方向には丸め処理を行う。属性2の点については、
x軸方向には丸め処理を行い、y軸方向には適合処理を
行い、属性3の点については、x軸方向、y軸方向に適
合処理を行う。これにより、ステムの線幅を揃えること
が可能となる。また、ステムの中心(第1の輪郭点と第
2の輪郭点の中点)をピクセル境界またはピクセル中心
へ移動させることによって、文字の上下左右の対称性を
保持することが可能となる。
[Operation] The attribute of the point of the outline data is checked, and the attribute 0
Rounding is performed in the x-axis direction and the y-axis direction for points
For the attribute 1 point, the matching process is performed in the x-axis direction,
Rounding is performed in the y-axis direction. Regarding the point of attribute 2,
Rounding processing is performed in the x-axis direction, matching processing is performed in the y-axis direction, and for points of attribute 3, matching processing is performed in the x-axis direction and the y-axis direction. As a result, the line widths of the stems can be made uniform. Further, by moving the center of the stem (the midpoint between the first contour point and the second contour point) to the pixel boundary or the pixel center, it is possible to maintain the vertical and horizontal symmetry of the character.

【0014】[0014]

【実施例】以下、本発明の一実施例を図面を用いて具体
的に説明する。 〈実施例1〉図1は、本発明の輪郭線補正処理のフロー
チャートであり、例えば、前述したように256×25
6ピクセルの空間でデザインされた文字“H”を16×
16ピクセルに縮小変倍処理したときに補正処理のヒン
ティング処理を行うものである。また、この処理は、図
8に示すヒンティング処理部4によって実行されるもの
である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be specifically described below with reference to the drawings. <Embodiment 1> FIG. 1 is a flowchart of the contour line correction processing of the present invention. For example, as described above, 256 × 25.
16x character "H" designed in 6 pixel space
Hinting processing of correction processing is performed when the reduction / magnification processing is performed to 16 pixels. This processing is executed by the hinting processing unit 4 shown in FIG.

【0015】図9に示すアウトラインデータにおいて、
点2、3、6、7、11に対して属性0が付与され、点
0、1、4、5、8には属性1が付与され、点10には
属性2が付与され、点9には属性3が付与されているも
のとする。そして、図2に示すように、デザイン時の各
点の属性について、対応する輪郭線上の線分までの距離
と、そのステムの持つべき線幅とを格納した線幅テーブ
ルを設ける。
In the outline data shown in FIG. 9,
Attribute 0 is given to points 2, 3, 6, 7, and 11, attribute 1 is given to points 0, 1, 4, 5, and 8, attribute 2 is given to point 10, and point 9 is given. Attribute 3 is given. Then, as shown in FIG. 2, for the attributes of each point at the time of designing, a line width table storing the distance to the line segment on the corresponding contour line and the line width that the stem should have is provided.

【0016】例えば、該テーブル中の点属性が1である
点1についてみると、距離24が読みだされ、この距離
は点1から対応する点2と点3で作られる輪郭線までの
距離が24ドットであることを意味し、またその線幅が
24ドットであることを意味する。
For example, regarding a point 1 having a point attribute of 1 in the table, a distance 24 is read, and this distance is the distance from the point 1 to the contour line formed by the corresponding points 2 and 3. It means that it is 24 dots, and that its line width is 24 dots.

【0017】変倍処理が行われると、同時に上記した距
離は変倍処理された値になり、また、上記した線幅は、
変倍処理された距離を丸めた値になる。なお、この丸め
には必然性はない。つまり、同じ属性の点に対して同じ
線幅を提供するものであれば丸めでなくてもよく、全く
別のテーブルで構成することも可能である。
When the scaling process is performed, the above-mentioned distance becomes a value after the scaling process, and the line width described above is
It is a value obtained by rounding the distance that has undergone scaling processing. There is no necessity for this rounding. In other words, as long as it provides the same line width for points having the same attribute, it is not necessary to round it, and it is also possible to use a completely different table.

【0018】本実施例の動作について説明すると、アウ
トラインデータの点数をnumpointに設定し(ス
テップ101)、nを0として(ステップ102)、n
がnumpointを越えない限り(ステップ10
3)、アウトラインデータの点の属性を調べ(ステップ
104)、属性0を持つ点についてはx軸方向、y軸方
向に丸め処理を行う(ステップ105)。例えば、点2
は属性0であるので、点2の変倍後のx座標位置は2.
75(=44/16)となり、丸める(四捨五入)と
3.0になる。
The operation of this embodiment will be described. The number of outline data is set to numpoint (step 101), n is set to 0 (step 102), and n is set.
As long as does not exceed numpoint (step 10
3) The attributes of the points of the outline data are checked (step 104), and the points having the attribute 0 are rounded in the x-axis direction and the y-axis direction (step 105). For example, point 2
Has the attribute 0, the x-coordinate position of the point 2 after scaling is 2.
It becomes 75 (= 44/16) and becomes 3.0 when rounded.

【0019】属性1を持つ点については、x軸方向には
後述するような適合処理を行い、y軸方向には丸め処理
を行う(ステップ106)。属性2を持つ点について
は、x軸方向には丸め処理を行い、y軸方向には適合処
理を行う(ステップ107)。属性3を持つ点について
は、x軸方向、y軸方向に適合処理を行う(ステップ1
08)。それ以外の点については、他の方法によってヒ
ンティングが行われる(ステップ109)。nを次の点
にして(ステップ110)、以上の処理を繰返し、アウ
トラインデータの全ての点について処理する。
With respect to the point having the attribute 1, a fitting process as described later is performed in the x-axis direction and a rounding process is performed in the y-axis direction (step 106). For points having the attribute 2, rounding processing is performed in the x-axis direction, and matching processing is performed in the y-axis direction (step 107). For the points having the attribute 3, the matching processing is performed in the x-axis direction and the y-axis direction (step 1
08). For other points, hinting is performed by another method (step 109). With n as the next point (step 110), the above processing is repeated to process all points of the outline data.

【0020】ここで、丸め処理とは、四捨五入、切り上
げ、切り捨てといった、小数を整数にするための変換を
指す。以下の説明では、四捨五入を用いる。なお、丸め
処理、適合処理は、ヒンティング処理の一例である。
Here, the rounding processing refers to conversion such as rounding, rounding up, and rounding down to make a decimal number an integer. In the following description, rounding is used. The rounding process and the matching process are examples of hinting processes.

【0021】上記した適合処理、例えば点1に対するx
軸方向の適合処理(線幅補正の一例)を例にして説明す
る。256×256ピクセルの空間でデザインされた文
字“H”が16×16ピクセルに縮小処理されるので、
点1の属性1に対応する線幅テーブル(図2)から読み
だされる距離24は、1.5(=24/16)になり、
また線幅は、距離1.5を四捨五入した2を得る。
The fitting process described above, eg x for point 1.
A description will be given by taking an adaptation process in the axial direction (an example of line width correction) as an example. Since the character “H” designed in the space of 256 × 256 pixels is reduced to 16 × 16 pixels,
The distance 24 read from the line width table (FIG. 2) corresponding to the attribute 1 of the point 1 is 1.5 (= 24/16),
In addition, the line width is obtained by rounding off the distance of 1.5.

【0022】x座標が1.25(=20/16)である
点1を、距離1.5だけ右に移動する。この点はちょう
ど点2のある位置(2.75)である。
Point 1 having an x coordinate of 1.25 (= 20/16) is moved to the right by a distance of 1.5. This point is exactly where point 2 is (2.75).

【0023】従って、距離1.5だけ右に移動され、x
座標が2.75である点1に対して、点2に施される丸
め処理(ステップ105)を施す。つまり、x座標が
2.75である点1を最も近いピクセル境界である3.
0に移動する。
Therefore, the distance is moved to the right by 1.5, and x
The rounding process (step 105) performed on the point 2 is performed on the point 1 whose coordinates are 2.75. That is, the point 1 having an x coordinate of 2.75 is the closest pixel boundary 3.
Move to 0.

【0024】x座標が3.0である点1を左に線幅2だ
け移動し、点1のx座標が1.0、点2のx座標が3.
0、線幅が2である、ヒンティング処理(線幅補正)さ
れたステムが得られる。
Point 1 having an x coordinate of 3.0 is moved leftward by a line width of 2, and the x coordinate of point 1 is 1.0 and the x coordinate of point 2 is 3.
A stem subjected to hinting processing (line width correction) having 0 and a line width of 2 is obtained.

【0025】〈実施例2〉上記した実施例では、点の移
動処理を3回(右2回、左1回)行っているが、本実施
例2では、点の移動回数を少なくしたものである。すな
わち、 (1)点1の属性1に対応する距離1.5と線幅2を得
る。 (2)点1のx座標1.25を得て、これに距離1.5
を加算する。これはちょうど点2のx座標である。 (3)得られたx座標2.75を四捨五入して3.0を
得る。 (4)得られたx座標3.0から線幅2を引く。 (5)得られたx座標1.0の位置に点1を移動する。
<Embodiment 2> In the above-mentioned embodiment, the point movement processing is performed three times (twice right and left one time), but in the second embodiment, the number of times of movement of the point is reduced. is there. That is, (1) The distance 1.5 and the line width 2 corresponding to the attribute 1 of the point 1 are obtained. (2) Obtain the x-coordinate of 1.25 for point 1 and add 1.5 to it.
Is added. This is exactly the x coordinate of point 2. (3) The obtained x coordinate 2.75 is rounded to obtain 3.0. (4) Subtract a line width of 2 from the obtained x coordinate of 3.0. (5) Move point 1 to the obtained position of x coordinate 1.0.

【0026】この実施例では、点1の移動処理が左に一
回移動するだけで、処理が簡単になる。図3は、実施例
1、2によってヒンティングされたアウトラインデータ
を示す。
In this embodiment, the process of moving the point 1 only needs to be moved once to the left, so that the process is simplified. FIG. 3 shows outline data hinted by Examples 1 and 2.

【0027】〈実施例3〉上記した実施例1、2の処理
によって、同一の線幅にデザインされたステムの線幅を
変倍後も同一に保つことが可能になる。しかし、上記し
た方法では、縦ステムの位置を、その輪郭線の右端を基
準に決定しているので、小サイズにおいては全体のバラ
ンスが崩れてしまう可能性がある。実施例3は、文字の
対称性を保持し、きれいでバランスのよい文字を生成す
るものである。
<Embodiment 3> By the processing of Embodiments 1 and 2 described above, it becomes possible to keep the line width of stems designed to have the same line width the same even after scaling. However, in the above-described method, the position of the vertical stem is determined with the right end of the contour line as a reference, so that the overall balance may be lost in a small size. The third embodiment retains the character symmetry and produces a clean and well-balanced character.

【0028】図4は、実施例3の輪郭線補正処理のフロ
ーチャートであり、前述した実施例と同様に256×2
56ピクセルの空間でデザインされた文字“H”を16
×16ピクセルに縮小変倍処理したときに補正処理であ
るヒンティングを行うものである。
FIG. 4 is a flow chart of the contour line correcting process of the third embodiment, which is 256 × 2 as in the above-mentioned embodiment.
16 letters "H" designed in a 56-pixel space
Hinting, which is a correction process, is performed when the reduction / magnification process is performed to × 16 pixels.

【0029】また、図9に示すアウトラインデータにお
いて、点0、1、5、8に対して属性10が付与され、
点4には属性11が付与され、点9には属性12が付与
され、点2、6、7、11には属性20が付与され、点
3には属性21が付与され、点10には属性22が付与
されているものとする。この2桁からなる属性のうち、
上位の桁はx軸方向の属性を表し、下位の桁はy軸方向
の属性を表している。
Further, in the outline data shown in FIG. 9, an attribute 10 is given to points 0, 1, 5, and 8,
Attribute 11 is given to point 4, attribute 12 is given to point 9, attribute 20 is given to points 2, 6, 7, and 11, attribute 21 is given to point 3, and point 10 is given. It is assumed that the attribute 22 is given. Of these 2-digit attributes,
The upper digit represents the attribute in the x-axis direction, and the lower digit represents the attribute in the y-axis direction.

【0030】そして、図5に示すように、デザイン時の
各点の属性について、対応する輪郭線上の線分までの距
離と、そのステムの持つべき線幅とを格納した線幅テー
ブルを設ける。変倍処理が行われると、同時に上記した
距離と線幅は変倍処理された値になる。
Then, as shown in FIG. 5, with respect to the attributes of each point at the time of designing, a line width table storing the distance to the line segment on the corresponding contour line and the line width that the stem should have is provided. When the scaling process is performed, the distance and the line width described above are at the same time as the scaled values.

【0031】本実施例の動作について説明すると、アウ
トラインデータの点数をnumpointに設定し(ス
テップ201)、nを0として(ステップ202)、n
がnumpointを越えない限り(ステップ20
3)、アウトラインデータの点の属性を調べ(ステップ
204)、x軸方向の属性が0ならばx軸方向に丸め処
理を行い(ステップ205、206、207)、x軸方
向の属性が1ならば左端の適合処理を行い(ステップ2
08、209、210)、x軸方向の属性が2ならば右
端の適合処理を行う(ステップ211、212、21
3)。
To explain the operation of this embodiment, the score of the outline data is set to numpoint (step 201), n is set to 0 (step 202), and n is set.
As long as does not exceed numpoint (step 20
3) Check the point attribute of the outline data (step 204), if the attribute in the x-axis direction is 0, rounding is performed in the x-axis direction (steps 205, 206, 207), and if the attribute in the x-axis direction is 1. If the left edge is adapted (step 2
08, 209, 210), and if the attribute in the x-axis direction is 2, the right end matching process is performed (steps 211, 212, 21).
3).

【0032】y軸方向の属性が0ならばy軸方向に丸め
処理を行い(ステップ205、208、211)、y軸
方向の属性が1ならば上端の適合処理を行い(ステップ
206、209、212)、y軸方向の属性が2ならば
下端の適合処理を行う(ステップ207、210、21
3)。それ以外の点については、他の方法によってヒン
ティングが行われる(ステップ214)。nを次の点に
して(ステップ215)、以上の処理を繰り返して、ア
ウトラインデータの全ての点について処理する。
If the attribute in the y-axis direction is 0, rounding processing is performed in the y-axis direction (steps 205, 208, 211), and if the attribute in the y-axis direction is 1, upper end matching processing is performed (steps 206, 209). 212), if the attribute in the y-axis direction is 2, the lower end matching process is performed (steps 207, 210, 21).
3). For other points, hinting is performed by another method (step 214). The next point is set to n (step 215), and the above processing is repeated to process all points of the outline data.

【0033】ここで、丸め処理とは、前述したと同様
に、四捨五入、切り上げ、切り捨てといった、小数を整
数にするための変換を指す。以下の説明では、四捨五入
を用いる。
Here, the rounding processing means conversion such as rounding, rounding up, and rounding down to make a decimal number an integer, as described above. In the following description, rounding is used.

【0034】上記した適合処理、例えば点1(属性1
0)に対する左端適合処理を例にして説明する。256
×256ピクセルの空間でデザインされた文字“H”が
16×16ピクセルに縮小処理されるので、点1のx軸
方向の属性1に対応する、図5の線幅テーブルから読み
だされる距離24は、1.5(=24/16)になり、
また線幅は、1.5(=24/16)になる。
The matching process described above, for example point 1 (attribute 1
The left edge matching process for 0) will be described as an example. 256
Since the character "H" designed in the space of x256 pixels is reduced to 16x16 pixels, the distance read from the line width table of Fig. 5 corresponding to the attribute 1 of the point 1 in the x-axis direction. 24 becomes 1.5 (= 24/16),
The line width is 1.5 (= 24/16).

【0035】これらを1/2にして、距離0.75と線
幅0.75を得る。x座標が1.25(=20/16)
である点1を、距離0.75だけ右に移動する。この点
はちょうど点1と点2の中点にあたる。x座標が2.0
である点1を、最も近いピクセル境界2.0に移動す
る。x座標が2.0である点1を左に線幅0.75だけ
移動する。点2に対する右端の適合処理を、上記した点
1に対する適合処理と全く対称的に行う。この結果、図
6に示すように、変倍処理されたステムの中心線をピク
セル境界にするように線幅補正され、左右対称にヒンテ
ィング処理されたステムが得られる。
By halving these, a distance of 0.75 and a line width of 0.75 are obtained. x coordinate is 1.25 (= 20/16)
The point 1 which is a point is moved to the right by a distance of 0.75. This point is exactly the midpoint between point 1 and point 2. x coordinate is 2.0
Move point 1 to be the closest pixel boundary 2.0. Point 1 whose x coordinate is 2.0 is moved to the left by a line width of 0.75. The fitting process at the right end for the point 2 is performed completely symmetrically to the fitting process for the point 1 described above. As a result, as shown in FIG. 6, a stem subjected to the hinting processing is obtained by performing line width correction so that the center line of the stem subjected to the scaling processing becomes the pixel boundary.

【0036】〈実施例4〉上記した実施例3では、点の
移動処理を3回(右2回、左1回)行っているが、本実
施例4では、点の移動回数を少なくしたものである。な
お、この実施例では図5の線幅テーブルの値が1/2に
なっているものとする。従って、線幅テーブルの値を1
/2にする演算が省略される。
<Fourth Embodiment> In the above-described third embodiment, the point movement processing is performed three times (twice right, left one time), but in the fourth embodiment, the number of point movements is reduced. Is. In this embodiment, it is assumed that the value of the line width table in FIG. 5 is 1/2. Therefore, set the value in the line width table to 1
The operation of setting to / 2 is omitted.

【0037】(1)点1のx軸方向の属性1に対応する
距離0.75と線幅0.75を得る。 (2)点1のx座標1.25を得て、これに距離0.7
5を加算する。これはちょうど点1と点2の中点のx座
標である。 (3)得られたx座標2.0を四捨五入して2.0を得
る。 (4)得られたx座標2.0から線幅0.75を引く。 (5)得られたx座標1.25の位置に点1を移動す
る。
(1) The distance 0.75 and the line width 0.75 corresponding to the attribute 1 of the point 1 in the x-axis direction are obtained. (2) Obtain the x-coordinate of 1.25 for point 1 and add 0.7 to it.
Add 5 This is just the x coordinate of the midpoint of points 1 and 2. (3) The obtained x coordinate 2.0 is rounded to obtain 2.0. (4) A line width of 0.75 is subtracted from the obtained x coordinate of 2.0. (5) Move point 1 to the obtained position of x coordinate 1.25.

【0038】この実施例4では、点1の移動処理が左に
一回移動するだけで、実施例3に比べて処理が簡単にな
る。この処理結果は、図6に示すようにヒンティング処
理されたアウトラインデータとなる。
In the fourth embodiment, the moving process of the point 1 is moved to the left only once, so that the process becomes simpler than that of the third embodiment. The result of this processing is the outline data that has been hinting processed as shown in FIG.

【0039】〈実施例5〉上記した実施例では、点1と
点2の中点に対する処理としてピクセル境界への移動
(四捨五入)を行うものであった。しかし、中点をピク
セル境界へ移動して、該中点から上下または左右対称に
移動を行うものであるから現われるピクセル数は必ず偶
数になってしまう。図6の縦ステムは2ピクセルとな
る。従って、中点をピクセル境界へ移動した場合、ピク
セル数は、2ピクセル、4ピクセル、6ピクセル...
の値をとることからステムの幅が急に太くなって、きれ
いな文字を構成できない。
<Embodiment 5> In the above-described embodiment, the process for the middle point between point 1 and point 2 is to move (round off) to the pixel boundary. However, since the middle point is moved to a pixel boundary and the middle point is moved vertically or horizontally symmetrically, the number of pixels that appears is always an even number. The vertical stem in FIG. 6 has 2 pixels. Therefore, when the midpoint is moved to the pixel boundary, the number of pixels is 2 pixels, 4 pixels, 6 pixels. . .
Since the value of is taken, the width of the stem suddenly becomes thick and it is not possible to compose beautiful characters.

【0040】中点をピクセル中心へ移動した場合でも、
ピクセル数は、1ピクセル(図6の横ステム)、3ピク
セル、5ピクセル...の如く奇数になるだけでステム
の幅が急に太くなって同様にきれいな文字を構成できな
い。
Even if the midpoint is moved to the pixel center,
The number of pixels is 1 pixel (horizontal stem in FIG. 6), 3 pixels, 5 pixels. . . Just like an odd number, the width of the stem suddenly becomes thick, and similarly beautiful characters cannot be constructed.

【0041】そこで、本実施例では、線幅テーブルに保
持されている線幅が奇数のとき、中点に対するヒンティ
ングは、ピクセル中心への移動とし、線幅が偶数のとき
にはピクセル境界への移動とするものである。すなわ
ち、 (1)点1のx軸方向の属性1に対応する線幅1.5を
得る。 (2)この線幅1.5を四捨五入して2を得る。 (3)2は偶数であるので、中点の移動はピクセル境界
への移動を用いる。奇数のときは、ピクセル中心へ移動
する。
Therefore, in the present embodiment, when the line width held in the line width table is an odd number, hinting for the middle point is moved to the pixel center, and when the line width is an even number, it is moved to the pixel boundary. It is what That is, (1) A line width of 1.5 corresponding to the attribute 1 of the point 1 in the x-axis direction is obtained. (2) The line width of 1.5 is rounded to obtain 2. (3) Since 2 is an even number, the movement of the midpoint uses the movement to the pixel boundary. If it is an odd number, move to the pixel center.

【0042】なお、四捨五入は、一例であって、小数値
を整数に変換する方法であればよい。また、上記した丸
め処理の他に、図7に示すように、線幅に対応してピク
セル境界にするか、ピクセル中心にするかを決める奇偶
テーブルを設けるようにしてもよい。
The rounding is an example, and any method of converting a decimal value into an integer may be used. In addition to the rounding process described above, as shown in FIG. 7, an odd / even table may be provided for determining whether to use the pixel boundary or the pixel center according to the line width.

【0043】[0043]

【発明の効果】以上、説明したように、請求項1、2記
載の発明によれば、特定の輪郭点に対応する予め設定さ
れた輪郭線上の線分までの距離とステムの線幅を用い
て、該特定の輪郭点に対する適合処理を行っているの
で、変倍後においてもステムの線幅を揃えることがで
き、バランスの良い、高品質な文字が出力される。
As described above, according to the invention described in claims 1 and 2, the distance to the line segment on the preset contour line corresponding to a specific contour point and the line width of the stem are used. Since the matching process for the specific contour point is performed, the line widths of the stems can be made uniform even after scaling, and a well-balanced and high-quality character is output.

【0044】請求項3記載の発明によれば、変倍処理さ
れたステムの中心線をピクセル境界あるいはピクセル中
心に移動処理しているので、ステムの左右対称性と上下
対称性を保持することができるとともに、文字の形状を
損ねることが抑止される。
According to the third aspect of the present invention, since the center line of the scaled stem is moved to the pixel boundary or the pixel center, the left-right symmetry and the vertical symmetry of the stem can be maintained. In addition to being able to, it is possible to prevent the shape of the character from being spoiled.

【0045】請求項4記載の発明によれば、ステム線幅
の奇数と偶数を考慮して処理しているので、きれいな文
字を構成することができる。
According to the fourth aspect of the present invention, since the processing is performed in consideration of the odd and even stem line widths, it is possible to form beautiful characters.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の輪郭線補正処理のフローチャートであ
る。
FIG. 1 is a flowchart of a contour line correction process of the present invention.

【図2】線幅テーブルを示す図である。FIG. 2 is a diagram showing a line width table.

【図3】本発明によってヒンティングされたアウトライ
ンデータである。
FIG. 3 is outline data hinted according to the present invention.

【図4】本発明の他の実施例の輪郭線補正処理のフロー
チャートである。
FIG. 4 is a flowchart of contour line correction processing according to another embodiment of the present invention.

【図5】他の実施例の線幅テーブルを示す図である。FIG. 5 is a diagram showing a line width table of another embodiment.

【図6】本発明によってヒンティングされたアウトライ
ンデータである。
FIG. 6 is outline data hinted according to the present invention.

【図7】奇偶テーブルを示す図である。FIG. 7 is a diagram showing an even-odd table.

【図8】アウトラインフォントの処理構成図である。FIG. 8 is a processing configuration diagram of an outline font.

【図9】展開されたアウトラインデータである。FIG. 9 is expanded outline data.

【図10】変倍されたアウトラインデータである。FIG. 10 is scaled outline data.

【図11】四捨五入されたアウトラインデータである。FIG. 11 is rounded-out outline data.

【符号の説明】[Explanation of symbols]

1 フォントファイル 2 展開部 3 変倍処理部 4 ヒンティング処理部 5 ラスタライザ 6 ドットデータ 1 Font file 2 Expansion unit 3 Magnification processing unit 4 Hinting processing unit 5 Rasterizer 6 Dot data

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 アウトラインフォントの輪郭線補正方法
において、デザイン時におけるアウトラインを構成する
第1の輪郭点に対応する輪郭線上の線分までの距離が予
め設定され、変倍処理後のアウトラインを構成する第1
の輪郭点を求め、前記デザイン時の距離を現サイズに変
倍した距離を求め、前記変倍後の第1の輪郭点を前記変
倍した距離だけ移動し、該移動した第2の点において施
されるヒンティングを、前記変倍後の第1の輪郭点に施
し、予め設定されている線幅だけ元の位置に戻し、変倍
前後の線幅の同一性を保持することを特徴とする輪郭線
補正方法。
1. An outline font contour correction method, wherein a distance to a line segment on the contour line corresponding to a first contour point forming the outline at the time of design is set in advance, and the outline after scaling processing is formed. First to do
Of the contour points, the distance at the time of the design is scaled to the current size is obtained, the first contour point after the scaling is moved by the scaled distance, and at the moved second point. The hinting to be applied is applied to the first contour point after the scaling and returned to the original position by a preset line width to maintain the same line width before and after the scaling. How to correct the contour line.
【請求項2】 アウトラインフォントの輪郭線補正方法
において、デザイン時におけるアウトラインを構成する
第1の輪郭点に対応する輪郭線上の線分までの距離が予
め設定され、変倍処理後のアウトラインを構成する第1
の輪郭点の第1の座標値を求め、前記デザイン時の距離
を現サイズに変倍した距離を求め、前記変倍後の第1の
輪郭点の第1の座標値に前記変倍した距離を加算し、該
加算された第2の座標値である第2の点において施され
るヒンティングを、前記変倍後の第1の輪郭点に施し、
該ヒンティングが施された第1の輪郭点の第3の座標値
から予め設定されている線幅だけ減じた第4の座標値を
求め、該求められた第4の座標値に、前記ヒンティング
が施された第1の輪郭点を移動し、変倍前後の線幅の同
一性を保持することを特徴とする輪郭線補正方法。
2. An outline font contour correction method, wherein a distance to a line segment on the contour line corresponding to a first contour point constituting the outline at the time of designing is preset, and the outline after scaling processing is constructed. First to do
The first coordinate value of the contour point is calculated, the distance obtained by scaling the design distance to the current size is calculated, and the scaled distance is changed to the first coordinate value of the scaled first contour point. Is added, and the hinting applied at the second point, which is the added second coordinate value, is applied to the scaled first contour point,
A fourth coordinate value obtained by subtracting a preset line width from the third coordinate value of the hinted first contour point is obtained, and the obtained fourth coordinate value is set to the hint coordinate. A contour line correction method, which comprises moving a first contoured point to maintain the same line width before and after scaling.
【請求項3】 アウトラインフォントの輪郭線補正方法
において、第1の輪郭点と第2の輪郭点との中点である
第3の点が存在し、デザイン時における前記第1の輪郭
点に対応する輪郭線上の線分までの距離と、ステムの持
つべき線幅が予め設定され、該デザイン時の距離と線幅
を現サイズに変倍した距離と線幅の値を、1/2にした
第2の距離と第2の線幅を求め、該第2の距離と第2の
線幅を用いて、前記第1の輪郭点と第2の輪郭点に対し
てヒンティングを施すことを特徴とする輪郭線補正方
法。
3. An outline font contour line correction method, wherein a third point, which is a midpoint between the first contour point and the second contour point, is present and corresponds to the first contour point at the time of designing. The distance to the line segment on the contour line and the line width that the stem should have are set in advance, and the distance and line width values obtained by scaling the distance and line width at the time of designing to the current size are halved. A second distance and a second line width are obtained, and hinting is performed on the first contour point and the second contour point using the second distance and the second line width. And the contour correction method.
【請求項4】 前記線幅が奇数の値をとるとき、前記中
点に対するヒンティングはピクセル中心への移動とし、
前記線幅が偶数の値をとるとき、前記中点に対するヒン
ティングはピクセル境界への移動とすることを特徴とす
る請求項3記載の輪郭線補正方法。
4. When the line width has an odd value, hinting for the midpoint is a movement to a pixel center,
The contour line correction method according to claim 3, wherein when the line width has an even value, the hinting for the midpoint is movement to a pixel boundary.
JP23862992A 1992-09-07 1992-09-07 Contour correction method Expired - Lifetime JP3243293B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP23862992A JP3243293B2 (en) 1992-09-07 1992-09-07 Contour correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP23862992A JP3243293B2 (en) 1992-09-07 1992-09-07 Contour correction method

Publications (2)

Publication Number Publication Date
JPH0683313A true JPH0683313A (en) 1994-03-25
JP3243293B2 JP3243293B2 (en) 2002-01-07

Family

ID=17032989

Family Applications (1)

Application Number Title Priority Date Filing Date
JP23862992A Expired - Lifetime JP3243293B2 (en) 1992-09-07 1992-09-07 Contour correction method

Country Status (1)

Country Link
JP (1) JP3243293B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009116915A (en) * 2004-05-28 2009-05-28 Microsoft Corp Appropriately rendering for graphical object, when corresponding outline lacks control points
JP2010039375A (en) * 2008-08-07 2010-02-18 Sharp Corp Character drawing device, character drawing method, character drawing program, and computer-readable recording medium
JP2010170097A (en) * 2009-01-26 2010-08-05 Mitsubishi Electric Research Laboratories Inc Method for aligning character to sampling grid of image

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009116915A (en) * 2004-05-28 2009-05-28 Microsoft Corp Appropriately rendering for graphical object, when corresponding outline lacks control points
JP2010039375A (en) * 2008-08-07 2010-02-18 Sharp Corp Character drawing device, character drawing method, character drawing program, and computer-readable recording medium
JP2010170097A (en) * 2009-01-26 2010-08-05 Mitsubishi Electric Research Laboratories Inc Method for aligning character to sampling grid of image

Also Published As

Publication number Publication date
JP3243293B2 (en) 2002-01-07

Similar Documents

Publication Publication Date Title
JPH06161419A (en) Character output device
JPH0683313A (en) Contour correcting mehtod
JP3215179B2 (en) Hinting outline fonts
JPH05323937A (en) Hinting processing method
KR20000057716A (en) Polygon drawing method and polygon drawing apparatus
JP3338484B2 (en) Outline font transformation device
JPH0425892A (en) Image processor
JPH0493992A (en) Character and graphic plotter device
JP2521756B2 (en) Pattern data generator
CN109934883B (en) Nine-mango-star fractal image generation method
JPH0573026A (en) Character and pattern generating method
JP3032417B2 (en) Character generator
JPH04162092A (en) Character generating system
JPH06274151A (en) Hinting processing method
JP3437032B2 (en) Character creator
JP3085396B2 (en) Vector font development method and device
JP3015075B2 (en) How to make a cutout mask
JPH0695645A (en) Method for processing character shadowing in full dot character
JPH0627929A (en) Outline font coordinate transforming method
JPS59195759A (en) Enlarging and contracting method of picture
JPH0823741B2 (en) How to process vector characters or graphics
JPH0398091A (en) Character generating device
JPH0424689A (en) Image processor
JPH056164A (en) Character processing device
JPH02278389A (en) Method and device for generating character and pattern

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071019

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081019

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081019

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091019

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101019

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111019

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121019

Year of fee payment: 11

EXPY Cancellation because of completion of term