JP2007003801A - Device and method for outline font output, and computer program - Google Patents
Device and method for outline font output, and computer program Download PDFInfo
- Publication number
- JP2007003801A JP2007003801A JP2005183469A JP2005183469A JP2007003801A JP 2007003801 A JP2007003801 A JP 2007003801A JP 2005183469 A JP2005183469 A JP 2005183469A JP 2005183469 A JP2005183469 A JP 2005183469A JP 2007003801 A JP2007003801 A JP 2007003801A
- Authority
- JP
- Japan
- Prior art keywords
- unit pixel
- area
- font
- outline
- polygonal 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
Links
Images
Abstract
Description
本発明は、アウトラインフォントの角部を含む輪郭部分のグレイ濃度を、計算機資源の消費を抑制しつつ特定し、滑らかなフォントで表示出力することができるアウトラインフォント出力装置、アウトラインフォント出力方法及びコンピュータプログラムに関する。 The present invention relates to an outline font output device, an outline font output method, and a computer that can specify a gray density of a contour portion including a corner portion of an outline font and display and output the same with a smooth font while suppressing consumption of computer resources. Regarding the program.
近年のDTP技術の急速な進展に伴い、ワードプロセッサ、パーソナルコンピュータ等で利用されるフォントは、より鮮明に、より滑らかに表示又は印字することが要求される。ワードプロセッサ、パーソナルコンピュータ等で利用されるフォントは、ビットマップフォント、及びアウトラインフォントに大別することができる。 With the rapid development of DTP technology in recent years, fonts used in word processors, personal computers, and the like are required to be displayed or printed more clearly and smoothly. Fonts used in word processors, personal computers, and the like can be broadly classified into bitmap fonts and outline fonts.
アウトラインフォントは、輪郭線を形成し、該輪郭線で囲まれた領域を塗りつぶすことによって描画する。したがって、文字の大きさを変えた場合、回転させた場合であっても、ジャギーの少ない高品質な文字を表示又は印字することができる。 The outline font is drawn by forming an outline and painting a region surrounded by the outline. Therefore, even when the character size is changed or rotated, high-quality characters with less jaggy can be displayed or printed.
アウトラインフォントを表すデータは、ハードディスク、ROM等に記憶してあるアウトラインフォント辞書に記憶する。そして、一つの文字を描画する場合、該文字に対応するアウトラインフォントデータがアウトラインフォント辞書から読み出され、所定の処理がなされてから表示装置又は印字装置により描画される。 Data representing the outline font is stored in an outline font dictionary stored in a hard disk, ROM, or the like. When a single character is drawn, outline font data corresponding to the character is read from the outline font dictionary, subjected to a predetermined process, and then drawn by a display device or a printing device.
従来のアウトラインフォントは、例えば輪郭線を右回りに、3次ベジェ曲線関数、Bスプライン関数等を用いて曲線近似して閉領域を生成する。そして、閉領域を形成する輪郭線が通過するピクセルごとに、該ピクセルに含まれている閉領域の面積比を、ピクセルに含まれるドット数等の比率を用いて算出し、算出した面積比に応じてグレイ濃度を変化させている。これにより、輪郭線で生じやすいギザギザ部分を改善することができ、フォントの輪郭線の形状を容易に変更することができる(特許文献1、2参照)。
しかし、上述した従来のアウトラインフォントの表示方法では、輪郭線を短い直線で近似することにより多くの折れ線を生成し、輪郭線を折れ線近似することにより演算処理負荷を軽減することがなされているが、文字の輪郭線の角部分を表示する場合、折れ線に囲まれている領域の面積を求める演算の処理負荷は軽減することができず、アウトラインフォントを表示又は印字するまでに相当の時間を要するおそれがあるという問題点があった。 However, in the conventional outline font display method described above, many broken lines are generated by approximating the outline with short straight lines, and the calculation processing load is reduced by approximating the outline with the broken line. When displaying the corner portion of the outline of a character, the processing load for calculating the area of the area surrounded by the broken line cannot be reduced, and it takes a considerable time to display or print the outline font. There was a problem of fear.
本発明は斯かる事情に鑑みてなされたものであり、輪郭線を折れ線近似するとともに、文字の輪郭線の角部分の面積算出における演算処理負荷を軽減することによりアウトラインフォントを表示又は印字するまでの時間を短縮することができるアウトラインフォント出力装置、アウトラインフォント出力方法及びコンピュータプログラムを提供することを目的とする。 The present invention has been made in view of such circumstances, and performs contour approximation of a contour line and reduces the calculation processing load in calculating the area of the corner portion of the contour line of a character to display or print an outline font. It is an object of the present invention to provide an outline font output device, an outline font output method, and a computer program that can reduce the time required for the above.
上記目的を達成するために第1発明に係るアウトラインフォント出力装置は、アウトラインフォントの輪郭を示す閉曲線を折れ線近似し、近似した折れ線の角部分が存在するピクセルのグレイ濃度を特定してアウトラインフォントを出力するアウトラインフォント出力装置において、前記ピクセルは、矩形状の単位ピクセルであり、単位ピクセル内の近似した折れ線の角部分と対向する一又は複数の辺で囲繞されたフォント領域の面積を算出する面積算出手段と、算出した面積に応じて単位ピクセルのグレイ濃度を特定する濃度特定手段とを備えることを特徴とする。 In order to achieve the above object, an outline font output device according to a first aspect of the present invention approximates a closed curve indicating the outline of an outline font by a polygonal line, specifies a gray density of a pixel in which the approximate corner of the polygonal line exists, and generates an outline font. In the output outline font output device, the pixel is a rectangular unit pixel, and an area for calculating an area of a font region surrounded by one or a plurality of sides facing a corner portion of an approximate polygonal line in the unit pixel It is characterized by comprising calculation means and density specifying means for specifying the gray density of a unit pixel according to the calculated area.
また、第2発明に係るアウトラインフォント出力装置は、第1発明において、前記面積算出手段は、近似した折れ線と交差する前記単位ピクセルの一辺が、前記単位ピクセルの長辺か短辺かを判断し、長辺又は短辺を基準とした相対位置に基づいて前記フォント領域の面積を算出するようにしてあることを特徴とする。 In the outline font output device according to the second invention, in the first invention, the area calculating means determines whether one side of the unit pixel intersecting the approximate polygonal line is a long side or a short side of the unit pixel. The area of the font region is calculated based on a relative position with respect to the long side or the short side.
また、第3発明に係るアウトラインフォント出力装置は、第1発明において、前記単位ピクセルは正方形であり、前記面積算出手段は、近似した折れ線と交差する前記単位ピクセルの一辺を基準とした相対位置に基づいて前記フォント領域の面積を算出するようにしてあることを特徴とする。 In the outline font output device according to a third aspect of the present invention, in the first aspect, the unit pixel is a square, and the area calculating means has a relative position based on one side of the unit pixel that intersects the approximate polygonal line. The area of the font region is calculated based on the above.
また、第4発明に係るアウトラインフォント出力方法は、アウトラインフォントの輪郭を示す閉曲線を折れ線近似し、近似した折れ線の角部分が存在するピクセルのグレイ濃度を特定してアウトラインフォントを出力するアウトラインフォント出力方法において、前記ピクセルは、矩形状の単位ピクセルであり、単位ピクセル内の近似した折れ線の角部分と対向する一又は複数の辺で囲繞されたフォント領域の面積を算出し、算出した面積に応じて単位ピクセルのグレイ濃度を特定することを特徴とする。 An outline font output method according to a fourth aspect of the present invention is an outline font output for approximating a closed curve indicating the outline of a outline font by a polygonal line, specifying a gray density of a pixel having a corner portion of the approximated polygonal line, and outputting the outline font In the method, the pixel is a rectangular unit pixel, and calculates an area of a font region surrounded by one or a plurality of sides facing a corner portion of an approximate polygonal line in the unit pixel, and according to the calculated area The gray density of the unit pixel is specified.
また、第5発明に係るアウトラインフォント出力方法は、第4発明において、近似した折れ線と交差する前記単位ピクセルの一辺が、前記単位ピクセルの長辺か短辺かを判断し、長辺又は短辺を基準とした相対位置に基づいて前記フォント領域の面積を算出することを特徴とする。 The outline font output method according to a fifth aspect of the present invention is the fourth aspect of the invention, wherein the one side of the unit pixel that intersects with the approximate polygonal line is determined whether the long side or the short side of the unit pixel. The area of the font region is calculated on the basis of the relative position with reference to.
また、第6発明に係るアウトラインフォント出力方法は、第4発明において、前記単位ピクセルは正方形であり、近似した折れ線と交差する前記単位ピクセルの一辺を基準とした相対位置に基づいて前記フォント領域の面積を算出することを特徴とする。 An outline font output method according to a sixth aspect of the present invention is the outline font output method according to the fourth aspect, wherein the unit pixel is a square, and the font region is based on a relative position based on one side of the unit pixel intersecting the approximate polygonal line. The area is calculated.
また、第7発明に係るコンピュータプログラムは、矩形状の単位ピクセルを通過するアウトラインフォントの輪郭を示す閉曲線を折れ線近似し、近似した折れ線の角部分が存在するピクセルのグレイ濃度を特定してアウトラインフォントを出力するコンピュータで実行することが可能なコンピュータプログラムにおいて、前記コンピュータを、単位ピクセル内の近似した折れ線の角部分と対向する一又は複数の辺で囲繞されたフォント領域の面積を算出する面積算出手段、及び算出した面積に応じて単位ピクセルのグレイ濃度を特定する濃度特定手段として機能させることを特徴とする。 Further, the computer program according to the seventh invention approximates the closed curve indicating the outline of the outline font that passes through the rectangular unit pixel by a polygonal line, specifies the gray density of the pixel in which the approximate corner of the polygonal line exists, and specifies the outline font An area calculation for calculating an area of a font region surrounded by one or a plurality of sides facing a corner portion of an approximate polygonal line in a unit pixel And a density specifying means for specifying a gray density of a unit pixel according to the calculated area.
また、第8発明に係るコンピュータプログラムは、第7発明において、前記コンピュータを、近似した折れ線と交差する前記単位ピクセルの一辺が、前記単位ピクセルの長辺か短辺かを判断する手段、及び該手段の判断結果を基準とした相対位置に基づいて前記フォント領域の面積を算出する手段として機能させることを特徴とする。 The computer program according to an eighth aspect of the present invention is the computer program product according to the seventh aspect, wherein the computer determines whether one side of the unit pixel intersecting the approximate polygonal line is a long side or a short side of the unit pixel; It is made to function as a means to calculate the area of the said font area based on the relative position on the basis of the judgment result of the means.
また、第9発明に係るコンピュータプログラムは、第7発明において、前記単位ピクセルは正方形であり、前記コンピュータを、近似した折れ線と交差する前記単位ピクセルの一辺を基準とした相対位置に基づいて前記フォント領域の面積を算出する手段として機能させることを特徴とする。 The computer program according to a ninth aspect is the computer program according to the seventh aspect, wherein the unit pixel is a square, and the font is determined based on a relative position based on one side of the unit pixel intersecting the approximate polygonal line. It functions as a means for calculating the area of the region.
第1発明、第4発明及び第7発明では、アウトラインフォントの輪郭を示す閉曲線を折れ線近似し、近似した折れ線の角部分が存在する矩形状の単位ピクセル内の角部分と対向する一又は複数の辺で囲繞されたフォント領域の面積を算出し、算出した面積に応じて単位ピクセルのグレイ濃度を特定する。これにより、演算処理負荷を軽減することができ、単位ピクセル内に存在する折れ線近似した線分の角部分を囲繞するフォント領域の面積を算出することから、単位ピクセルのグレイ濃度を特定するための面積算出に係る演算処理負荷を軽減することができ、フォントを表示又は印字するまでの時間を短縮することが可能となる。 In the first invention, the fourth invention, and the seventh invention, the closed curve indicating the outline of the outline font is approximated by a polygonal line, and one or a plurality of opposing corner parts in a rectangular unit pixel in which the corner part of the approximate polygonal line exists The area of the font region surrounded by the side is calculated, and the gray density of the unit pixel is specified according to the calculated area. As a result, the calculation processing load can be reduced, and the area of the font area surrounding the corner portion of the approximated polygonal line existing in the unit pixel is calculated, so that the gray density of the unit pixel can be specified. The calculation processing load related to area calculation can be reduced, and the time until the font is displayed or printed can be shortened.
第2発明、第5発明及び第8発明では、近似した折れ線と交差する単位ピクセルの一辺が、単位ピクセルの長辺か短辺かを判断し、長辺又は短辺を基準とした相対位置に基づいてフォント領域の面積を算出する。これにより、縦横のいずれの辺と交差するかに応じた相対座標で面積を算出することができ、単位ピクセルのグレイ濃度を特定するための面積算出に係る演算処理負荷を軽減することができ、フォントを表示又は印字するまでの時間を短縮することが可能となる。 In the second invention, the fifth invention, and the eighth invention, it is determined whether one side of the unit pixel that intersects with the approximate polygonal line is the long side or the short side of the unit pixel, and the relative position is based on the long side or the short side. Based on this, the area of the font area is calculated. Thereby, the area can be calculated with relative coordinates depending on which side of the vertical and horizontal crosses, the processing load related to area calculation for specifying the gray density of the unit pixel can be reduced, It is possible to shorten the time until the font is displayed or printed.
第3発明、第6発明及び第9発明では、単位ピクセルは正方形であり、近似した折れ線と交差する単位ピクセルの一辺を基準とした相対位置に基づいて、近似した折れ線の角部分と対向する一又は複数の辺で囲繞されたフォント領域の面積を算出する。これにより、ピクセルの一辺を基準とした相対座標で面積を算出することができ、単位ピクセルのグレイ濃度を特定するための面積算出に係る演算処理負荷を軽減することができ、フォントを表示又は印字するまでの時間を短縮することが可能となる。 In the third invention, the sixth invention, and the ninth invention, the unit pixel is a square, and the unit pixel is opposed to the corner portion of the approximate polygonal line based on the relative position based on one side of the unit pixel that intersects the approximate polygonal line. Alternatively, the area of the font area surrounded by a plurality of sides is calculated. As a result, the area can be calculated with relative coordinates based on one side of the pixel, the processing load related to area calculation for specifying the gray density of the unit pixel can be reduced, and the font can be displayed or printed. It is possible to shorten the time to do.
本発明によれば、アウトラインフォントの輪郭線の角部分を表示するための演算処理負荷を軽減することができる。また、ピクセルの一辺を基準として交差する辺からの相対座標により面積を算出することから、単位ピクセルのグレイ濃度を特定するための面積算出に係る演算処理負荷を軽減することができ、フォントを表示又は印字するまでの時間を短縮することが可能となる。 According to the present invention, it is possible to reduce the processing load for displaying the corner portion of the outline of the outline font. In addition, since the area is calculated based on the relative coordinates from the intersecting side with respect to one side of the pixel, the processing load related to area calculation for specifying the gray density of the unit pixel can be reduced, and the font is displayed. Alternatively, the time until printing can be shortened.
(実施の形態1)
以下、本発明の実施の形態1に係るアウトラインフォント出力装置について図面に基づいて具体的に説明する。図1は、本発明の実施の形態1に係るアウトラインフォント出力装置10の構成を示すブロック図である。図1に示すように、アウトラインフォント出力装置10は、少なくとも、CPU(中央演算装置)11、記憶手段12、ROM13、RAM14、DVD、CD等の可搬型記憶媒体2を用いる補助記憶手段15、入力手段16、表示データを出力する表示手段17、及び印字データを印字する印刷手段18で構成される。
(Embodiment 1)
Hereinafter, an outline font output apparatus according to
CPU11は、内部バス19を介してアウトラインフォント出力装置10の上述したようなハードウェア各部と接続されており、上述したハードウェア各部を制御するとともに、記憶手段12に記憶されている処理プログラム、例えばワードプロセッサとして機能させるプログラム、アウトラインフォントのラスタライズ処理プログラム等に従って、種々のソフトウェア的機能を実行する。
The
記憶手段12は、内蔵される固定型記憶装置(ハードディスク)であり、DVD、CD−ROM等の可搬型記録媒体2から取得した、アウトラインフォント出力装置10として機能させるために必要な処理プログラム、例えばワードプロセッサとして機能させるソフトウェアモジュールを記憶している。記憶手段12は、処理プログラムだけではなく、例えばアウトラインフォントのフォントデータをフォントデータ記憶部121に、単位ピクセルごとのグレイ濃度をグレイ濃度記憶部122に、それぞれ記憶してある。
The storage means 12 is a built-in fixed-type storage device (hard disk), and is a processing program necessary for functioning as the outline
ROM13は、フラッシュメモリ、SRAM等で構成され、例えばアウトラインフォントのフォントデータを記憶している。また、文字コード等を記憶しておいても良い。RAM14は、DRAM等で構成され、ソフトウェアの実行時に発生する一時的なデータを記憶する。
The
補助記憶手段15は、CD、DVD等の可搬型記録媒体2を用い、記憶手段12へ、CPU11が処理するプログラム、データ等をダウンロードする。また、CPU11が処理したデータをバックアップすべく書き込むことも可能である。
The
入力手段16は、画面上に表示されたカーソルを移動させるマウス等のポインティングデバイス、又は画面上でテキストデータを打鍵により入力するキーボード等である。 The input means 16 is a pointing device such as a mouse that moves a cursor displayed on the screen, or a keyboard that inputs text data by keystroke on the screen.
表示手段17は、記憶手段12のフォント表示データ記憶部121、又はROM13に記憶してあるアウトラインフォントのフォントデータに基づいて生成された表示データを表示する液晶表示装置(LCD)、表示ディスプレイ(CRT)等の外部の諧調表現が可能な表示装置である。印刷手段18は、記憶手段12のフォントデータ記憶部121、又はROM13に記憶してあるアウトラインフォントのフォントデータに基づいて生成された印字データを印字出力するレーザプリンタ、インクジェットプリンタ等の印刷装置である。
The
図2は、本発明の実施の形態1に係るアウトラインフォント出力装置10のCPU11の処理手順を示すフローチャートである。アウトラインフォント出力装置10のCPU11は、記憶手段12のフォントデータ記憶部121又はROM13に記憶してあるフォントデータを読出し(ステップS201)、表示又は印字する文字の文字コードをROM13から抽出して、フォントの輪郭を構成するアウトラインデータを算出する(ステップS202)。
FIG. 2 is a flowchart showing a processing procedure of the
CPU11は、算出したアウトラインデータを短い線分の集合として折れ線近似し(ステップS203)、アウトラインフォントの角部分を構成するピクセルの座標を特定する(ステップS204)。輪郭を構成するピクセルは、短辺8ビット(256ドット)、長辺16ビット(512ドット)の長方形で構成する単位ピクセルであり、短辺を単位長、例えば‘1’として以下の演算を実行する。なお、単位ピクセルの縦横比は、上述した1:2に限定されるものではなく、1:α(αは任意の実数)であれば良い。
The
図3は、アウトラインデータを折れ線近似する処理の例示図である。本実施の形態1では、256(ドット)×512(ドット)である短辺8ビット、長辺16ビットの長方形で構成された単位ピクセルを用いて輪郭のピクセル座標を特定する。そして、単位ピクセルの短辺の長さを単位長‘1’として以下の演算を実行する。図3のように、特定の単位ピクセルを始点‘0’とし、輪郭を含む単位ピクセルを時計回りに順次特定し、輪郭を示す閉曲線の終点‘m’(mは自然数)まで単位ピクセルの座標を特定する。 FIG. 3 is an exemplary diagram of processing for approximating outline data to a polygonal line. In the first embodiment, the pixel coordinates of the contour are specified using unit pixels composed of a rectangle of 256 (dots) × 512 (dots) having a short side of 8 bits and a long side of 16 bits. Then, the following calculation is executed with the length of the short side of the unit pixel as the unit length ‘1’. As shown in FIG. 3, a specific unit pixel is set as a start point “0”, unit pixels including an outline are sequentially specified clockwise, and the coordinates of the unit pixel are set up to an end point “m” (m is a natural number) of a closed curve indicating the outline. Identify.
CPU11は、フォント表示部分の角部分が含まれている単位ピクセルについて、フォント表示部分の面積を算出する(ステップS205)。図4は、フォント表示部分の面積を算出する対象となる単位ピクセルの例示図である。単位ピクセルの左下の頂点を原点(0、0)とし、短辺の長さを1.0、α=2.0とする。図4に示すように、単位ピクセル内に角部分を含む場合、単位ピクセル内の点(xk、yk)と、該単位ピクセルを通過する前後の点(xp、yp)、(xq、yq)とにより、単位ピクセル内のフォント表示部分の面積を求めることができる。 CPU11 calculates the area of a font display part about the unit pixel in which the corner | angular part of a font display part is contained (step S205). FIG. 4 is an exemplary diagram of unit pixels that are targets for calculating the area of the font display portion. The lower left vertex of the unit pixel is the origin (0, 0), the length of the short side is 1.0, and α = 2.0. As shown in FIG. 4, when a corner portion is included in a unit pixel, a point (xk, yk) in the unit pixel and points (xp, yp), (xq, yq) before and after passing through the unit pixel Thus, the area of the font display portion in the unit pixel can be obtained.
CPU11は、まず各折れ線近似した線分と単位ピクセルの辺とが交差する点の座標を求める。図5(a)乃至(d)は、単位ピクセルの長辺が横である場合の単位ピクセル内の点(xk、yk)から外部の点(xq、yq)に向かって出射する場合の折れ線近似した線分と単位ピクセルの辺とが交差する点の座標を示す図である。図5では、折れ線近似した線分が単位ピクセルのどの辺で交差しているのかに基づき、リージョン1乃至4に分類する。図5(a)はリージョン1の場合の例示図であり、アウトラインフォントの交差する点は、(α、yf)となる。
The
図5(b)はリージョン2の場合の例示図であり、交差する点は、(α−xf、1)となる。なお、xfは交差する点のx座標のαによる剰余部分である。図5(c)はリージョン3の場合の例示図であり、交差する点は、(0、1−yf)となる。図5(d)はリージョン4の場合の例示図であり、交差する点は、(xf、0)となる。なお、図5は、単位ピクセル内の角部分を構成する頂点(xk、yk)から外部の点(xq、yq)に向かって出射する場合の折れ線近似した線分と単位ピクセルの辺とが交差する点の座標につき説明しているが、外部の点(xp、yp)から単位ピクセル内の角部分を構成する頂点(xk、yk)に向かって入射する場合の折れ線近似した線分と単位ピクセルの辺とが交差する点の座標についても同様にリージョン分類を行うことができる。
FIG. 5B is an exemplary diagram in the case of the
図6(a)乃至(d)は、単位ピクセルの長辺が縦である場合の単位ピクセル内の点(xk、yk)から外部の点(xq、yq)に向かって出射する場合の折れ線近似した線分と単位ピクセルの辺とが交差する点の座標を示す図である。図6では、折れ線近似した線分が単位ピクセルのどの辺で交差しているのかに基づき、リージョン1乃至4に分類する。図6(a)はリージョン1の場合の例示図であり、アウトラインフォントの交差する点は、(α、yf)となる。
6A to 6D show broken line approximations when light is emitted from a point (xk, yk) in a unit pixel toward an external point (xq, yq) when the long side of the unit pixel is vertical. It is a figure which shows the coordinate of the point which the line segment and the side of a unit pixel crossed. In FIG. 6,
図6(b)はリージョン2の場合の例示図であり、交差する点は、(1−xf、α)となる。なお、xfは交差する点のx座標の1.0による剰余部分である。図6(c)はリージョン3の場合の例示図であり、交差する点は、(0、1.0−yf)となる。図6(d)はリージョン4の場合の例示図であり、交差する点は、(xf、0)となる。なお、図5は、単位ピクセル内の角部分を構成する頂点(xk、yk)から外部の点(xq、yq)に向かって出射する場合の折れ線近似した線分と単位ピクセルの辺とが交差する点の座標につき説明しているが、外部の点(xp、yp)から単位ピクセル内の角部分を構成する頂点(xk、yk)に向かって入射する場合の折れ線近似した線分と単位ピクセルの辺とが交差する点の座標についても同様にリージョン分類を行うことができる。
FIG. 6B is an exemplary diagram in the case of the
リージョン分類を行った後、CPU11は、単位ピクセル内で角部分を構成する頂点(xk、yk)に対向する一又は複数の辺で囲繞された部分の面積を算出し(ステップS205)、算出した面積に基づいて単位ピクセルごとの面積比を算出して(ステップS206)、単位ピクセルごとのグレイ濃度を算出する(ステップS207)。
After performing the region classification, the
具体的には、図7又は図8に示す処理を実行することにより、単位ピクセル内の角部分を構成する頂点(xk、yk)に対向する一又は複数の辺で囲繞された部分の面積を算出する。CPU11は、単位ピクセルへ折れ線近似した線分が入射するリージョンと、単位ピクセルから折れ線近似した線分が出射するリージョンとの差を算出し、角部分を構成する頂点(xk、yk)を挟む2つの線分が、単位ピクセルのどの辺を通過するのか特定する。図7(a)乃至(e)は、単位ピクセルへ折れ線近似した線分が入射するリージョンが、長方形の長辺側である場合の、入射するリージョンと単位ピクセルから折れ線近似した線分が出射するリージョンとの差分値ΔRに応じて、フォント表示部分の面積を求める方法を示す図である。なお、差分値ΔRは、単位ピクセルから折れ線近似した線分が出射するリージョンから、単位ピクセルへ折れ線近似した線分が入射するリージョンを減算することにより算出し、算出結果が負の値となった場合、ΔR=‘−3’の場合はΔR=‘1’に、ΔR=‘−2’の場合はΔR=‘2’に、ΔR=‘−1’の場合はΔR=‘3’に、それぞれ変換する。
Specifically, by executing the processing shown in FIG. 7 or FIG. 8, the area of the part surrounded by one or more sides facing the vertex (xk, yk) constituting the corner part in the unit pixel is determined. calculate. The
図7(a)は、差分値ΔRが‘0’である場合であって、単位ピクセルへ折れ線近似した線分が入射する点のx座標x1より、単位ピクセルから折れ線近似した線分が出射する点のx座標x2の方が大きいときのフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数1)により算出する。 FIG. 7A shows a case where the difference value ΔR is “0”, and a line segment approximating the polygonal line is emitted from the unit pixel from the x coordinate x1 of the point where the line segment approximating the polygonal line enters the unit pixel. It is a figure which shows the method of calculating | requiring the area of the font display part when the x coordinate x2 of a point is larger. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 1).
(数1)
A=D2×(x2−x1)/2
(Equation 1)
A = D2 × (x2−x1) / 2
図7(b)は、差分値ΔRが‘0’である場合であって、単位ピクセルへ折れ線近似した線分が入射する点のx座標x2より、単位ピクセルから折れ線近似した線分が出射する点のx座標x1の方が小さいときのフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数2)により算出する。 FIG. 7B shows a case where the difference value ΔR is “0”, and a line segment approximating a polygonal line is emitted from the unit pixel from the x coordinate x2 of the point where the line segment approximating the polygonal line enters the unit pixel. It is a figure which shows the method of calculating | requiring the area of the font display part when the x coordinate x1 of a point is smaller. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 2).
(数2)
A=α−D2×(x2−x1)/2
(Equation 2)
A = α−D2 × (x2−x1) / 2
図7(c)は、差分値ΔRが‘1’である場合のフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数3)により算出する。 FIG. 7C is a diagram showing a method for obtaining the area of the font display portion when the difference value ΔR is “1”. Since the right side of the moving direction of the broken line is displayed in gray, the area A of the font display portion (hatched portion) is calculated by (Equation 3).
(数3)
A=(D2×(α−x1)+D1×y1)/2
(Equation 3)
A = (D2 × (α−x1) + D1 × y1) / 2
図7(d)は、差分値ΔRが‘2’である場合のフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数4)により算出する。なおx3は、単位ピクセルから折れ線近似した線分が出射する点のx座標x2をαから減じた値である。 FIG. 7D is a diagram showing a method for obtaining the area of the font display portion when the difference value ΔR is “2”. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 4). Note that x3 is a value obtained by subtracting from x the x coordinate x2 of a point where a line segment approximated by a broken line is emitted from a unit pixel.
(数4)
A=((D2×(α−x1)+D1+(1.0−D2)×x3))/2
(Equation 4)
A = ((D2 × (α−x1) + D1 + (1.0−D2) × x3)) / 2
図7(e)は、差分値ΔRが‘3’である場合のフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数5)により算出する。なおy3は、単位ピクセルから折れ線近似した線分が出射する点のy座標y1を1.0から減じた値である。 FIG. 7E is a diagram showing a method for obtaining the area of the font display portion when the difference value ΔR is “3”. Since the right side of the moving direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 5). Note that y3 is a value obtained by subtracting from 1.0 the y-coordinate y1 of the point where a line segment approximated by a broken line is emitted from the unit pixel.
(数5)
A=α−(D2×x1+(α−D1)×(1.0−y3))/2
(Equation 5)
A = α− (D2 × x1 + (α−D1) × (1.0−y3)) / 2
図8(a)乃至(e)は、単位ピクセルへ折れ線近似した線分が入射するリージョンが、長方形の短辺側である場合の、入射するリージョンと単位ピクセルから折れ線近似した線分が出射するリージョンとの差分値ΔRに応じて、フォント表示部分の面積を求める方法を示す図である。 In FIGS. 8A to 8E, when a region where a line segment approximated to a unit pixel is incident on a polygonal line is on the short side of the rectangle, a line segment approximated to a polygonal line is emitted from the incident region and the unit pixel. It is a figure which shows the method of calculating | requiring the area of a font display part according to difference value (DELTA) R with a region.
図8(a)は、差分値ΔRが‘0’である場合であって、単位ピクセルへ折れ線近似した線分が入射する点のx座標x1より、単位ピクセルから折れ線近似した線分が出射する点のx座標x2の方が大きいときのフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数6)により算出する。 FIG. 8A shows a case where the difference value ΔR is “0”, and a line segment approximating a polygonal line is emitted from the unit pixel from the x coordinate x1 of the point where the line segment approximating the polygonal line enters the unit pixel. It is a figure which shows the method of calculating | requiring the area of the font display part when the x coordinate x2 of a point is larger. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (hatched portion) is calculated by (Equation 6).
(数6)
A=D2×(x2−x1)/2
(Equation 6)
A = D2 × (x2−x1) / 2
図8(b)は、差分値ΔRが‘0’である場合であって、単位ピクセルへ折れ線近似した線分が入射する点のx座標x2より、単位ピクセルから折れ線近似した線分が出射する点のx座標x1の方が小さいときのフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数7)により算出する。 FIG. 8B shows a case where the difference value ΔR is “0”, and a line segment approximating the polygonal line is emitted from the unit pixel from the x coordinate x2 of the point where the line segment approximating the polygonal line enters the unit pixel. It is a figure which shows the method of calculating | requiring the area of the font display part when the x coordinate x1 of a point is smaller. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 7).
(数7)
A=α−D2×(x2−x1)/2
(Equation 7)
A = α−D2 × (x2−x1) / 2
図8(c)は、差分値ΔRが‘1’である場合のフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数8)により算出する。 FIG. 8C is a diagram showing a method for obtaining the area of the font display portion when the difference value ΔR is “1”. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 8).
(数8)
A=(D2×(1.0−x1)+D1×y1)/2
(Equation 8)
A = (D2 × (1.0−x1) + D1 × y1) / 2
図8(d)は、差分値ΔRが‘2’である場合のフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数9)により算出する。なおx3は、単位ピクセルから折れ線近似した線分が出射する点のx座標x2を1.0から減じた値である。 FIG. 8D is a diagram showing a method for obtaining the area of the font display portion when the difference value ΔR is “2”. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 9). Note that x3 is a value obtained by subtracting x coordinate x2 of a point where a line segment approximated by a broken line from a unit pixel is emitted from 1.0.
(数9)
A=((D2×(1.0−x1)+α×D1+(α−D2)×x3))/2
(Equation 9)
A = ((D2 × (1.0−x1) + α × D1 + (α−D2) × x3)) / 2
図8(e)は、差分値ΔRが‘3’である場合のフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数10)により算出する。なおy3は、単位ピクセルから折れ線近似した線分が出射する点のy座標y1をαから減じた値である。 FIG. 8E is a diagram showing a method for obtaining the area of the font display portion when the difference value ΔR is “3”. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (hatched portion) is calculated by (Equation 10). Note that y3 is a value obtained by subtracting the y coordinate y1 of the point where a line segment approximated by a broken line from the unit pixel is emitted from α.
(数10)
A=α−(D2×x1+(1.0−D1)×(α−y3))/2
(Equation 10)
A = α− (D2 × x1 + (1.0−D1) × (α−y3)) / 2
このように、単位ピクセルの4辺のうち一長辺又は一短辺を基準として角部分で囲繞されたフォント領域の面積を算出することにより、算出した面積をαで除した面積比に基づいて、単位ピクセル内のグレイ濃度を定めることができる。したがって、単位ピクセル内のフォント表示部分の占める面積が算出された場合、CPU11は、角部分を構成する単位ピクセルを、算出された面積の面積比と同値であるグレイ濃度でピクセルに対する塗りつぶし処理を実行し(ステップS208)、生成した文字画像を表示手段17へ表示出力、又は印刷手段18へ印字出力する(ステップS209)。
In this way, by calculating the area of the font area surrounded by the corner portion with respect to one long side or one short side of the four sides of the unit pixel, the calculated area is divided based on the area ratio by α. The gray density within the unit pixel can be determined. Therefore, when the area occupied by the font display portion in the unit pixel is calculated, the
CPU11は、m個の単位ピクセルにつき、所定位置を原点としたx座標値及びy座標値を求め、角部分を含む単位ピクセル夫々についてグレイ濃度を算出する。CPU11は、フォント表示部分の面積比を該単位ピクセルのグレイ濃度として、他にピクセルの位置を示す座標位置とともに、記憶手段12のグレイ濃度記憶部122に記憶する。図9は、グレイ濃度記憶部122に記憶するデータ構成の例示図である。
The
1つのフォントにつき、輪郭に相当する部分の単位ピクセル数nGray を0〜m(mは自然数)とし、各単位ピクセルごとにx座標xGray(0)乃至xGray(m)、y座標yGray(0)乃至yGray(m)、グレイ濃度shadeGray(0) 乃至shadeGray(m)を記憶する。所定の単位ピクセルにつき、上述した方法で該単位ピクセルのグレイ濃度を算出し、記憶手段12に記憶した後、次の単位ピクセルへ移動し、上述した方法で該単位ピクセルのグレイ濃度を算出し、記憶手段12に記憶する。斯かる処理を単位ピクセル数nGray =‘m’となるまで繰り返し実行し、輪郭を構成するすべての単位ピクセルについてグレイ濃度を算出する。
For each font, the number of unit pixels nGray corresponding to the outline is set to 0 to m (m is a natural number), and x coordinates xGray (0) to xGray (m), y coordinates yGray (0) to yGray (m) and gray density shadeGray (0) to shadeGray (m) are stored. For a predetermined unit pixel, the gray density of the unit pixel is calculated by the above-described method, stored in the
上述したように、リージョンの差分値ΔRに応じて、角部分を含むフォント表示部分の面積を算出し、算出した面積をそのまま記憶手段12にグレイ濃度として記憶することにより、アウトラインフォントの角部分のグレイ濃度を複雑な演算処理を行うことなく定めることができる。CPU11は、角部分を含む単位ピクセルを、記憶手段12に記憶してあるグレイ濃度で塗りつぶし処理することにより、滑らかな表示出力又は印字出力を行うことができる。
As described above, the area of the font display portion including the corner portion is calculated in accordance with the region difference value ΔR, and the calculated area is stored as the gray density in the
以上のように本実施の形態1によれば、単位ピクセル内に折れ線近似した線分で構成された角部分が存在する場合、縦横のいずれの辺と交差するかに応じた相対座標で面積を算出することができ、単位ピクセルのグレイ濃度を特定するための面積算出に係る演算処理負荷を軽減することができ、フォントを表示又は印字するまでの時間を短縮することが可能となる。 As described above, according to the first embodiment, when a corner portion composed of a line segment approximated by a polygonal line exists in a unit pixel, the area is determined by relative coordinates according to which side intersects the vertical and horizontal sides. It is possible to reduce the calculation processing load related to area calculation for specifying the gray density of the unit pixel, and it is possible to shorten the time until the font is displayed or printed.
(実施の形態2)
以下、本発明の実施の形態2に係るアウトラインフォント出力装置について図面に基づいて具体的に説明する。実施の形態2に係るアウトラインフォント出力装置10の構成は実施の形態1と同様であることから、同一の符号を付することで詳細な説明を省略する。
(Embodiment 2)
Hereinafter, an outline font output apparatus according to
図10は、本発明の実施の形態2に係るアウトラインフォント出力装置10のCPU11の処理手順を示すフローチャートである。アウトラインフォント出力装置10のCPU11は、記憶手段12のフォントデータ記憶部121又はROM13に記憶してあるフォントデータを読出し(ステップS1001)、表示又は印字する文字の文字コードをROM13から抽出して、フォントの輪郭を構成するアウトラインデータを算出する(ステップS1002)。
FIG. 10 is a flowchart showing a processing procedure of the
CPU11は、算出したアウトラインデータを短い線分の集合として折れ線近似し(ステップS1003)、アウトラインフォントの角部分を構成するピクセルの座標を特定する(ステップS1004)。角部分を構成するピクセルは、1辺8ビット(256ドット×256ドット)の正方形で構成する単位ピクセルであり、1辺を単位長、例えば‘1’として以下の演算を実行する。
The
図11は、アウトラインデータを折れ線近似する処理の例示図である。本実施の形態2では、256(ドット)×256(ドット)である1辺8ビットの正方形で構成された単位ピクセルを用いて輪郭のピクセル座標を特定する。そして、単位ピクセルの1辺の長さを単位長‘1’として以下の演算を実行する。図11のように、特定の単位ピクセルを始点‘0’とし、輪郭を含む単位ピクセルを時計回りに順次特定し、輪郭を示す閉曲線の終点‘m’(mは自然数)まで単位ピクセルの座標を特定する。 FIG. 11 is a diagram illustrating a process for approximating outline data to a polygonal line. In the second embodiment, the pixel coordinates of the contour are specified by using unit pixels formed by a square of 256 bits (dots) × 256 (dots) and 8 bits per side. Then, the following calculation is executed with the length of one side of the unit pixel as the unit length ‘1’. As shown in FIG. 11, a specific unit pixel is set as a starting point “0”, unit pixels including an outline are sequentially specified clockwise, and the coordinates of the unit pixel are set up to an end point “m” (m is a natural number) of a closed curve indicating the outline. Identify.
CPU11は、フォント表示部分の角部分が含まれている単位ピクセルについて、フォント表示部分の面積を算出する。図12は、フォント表示部分の面積を算出する対象となる単位ピクセルの例示図である。単位ピクセルの左下の頂点を原点(0、0)とし、一辺の長さを1.0とする。図12に示すように、単位ピクセル内に角部分を含む場合、単位ピクセル内の点(xk、yk)と、該単位ピクセルを通過する前後の点(xp、yp)、(xq、yq)とにより、単位ピクセル内のフォント表示部分の面積を求めることができる。 CPU11 calculates the area of a font display part about the unit pixel in which the corner | angular part of a font display part is contained. FIG. 12 is an exemplary diagram of a unit pixel that is a target for calculating the area of the font display portion. The vertex at the lower left of the unit pixel is the origin (0, 0), and the length of one side is 1.0. As shown in FIG. 12, when a corner portion is included in a unit pixel, a point (xk, yk) in the unit pixel and points before and after passing through the unit pixel (xp, yp), (xq, yq) Thus, the area of the font display portion in the unit pixel can be obtained.
CPU11は、まず各折れ線近似した線分と単位ピクセルの辺とが交差する点の座標を求める。図13(a)乃至(d)は、単位ピクセル内の点(xk、yk)から外部の点(xq、yq)に向かって出射する場合の折れ線近似した線分と単位ピクセルの辺とが交差する点の座標を示す図である。図13では、折れ線近似した線分が単位ピクセルのどの辺で交差しているのかに基づき、リージョン1乃至4に分類する。図13(a)はリージョン1の場合の例示図であり、アウトラインフォントの交差する点は、(1、yf)となる。
The
図13(b)はリージョン2の場合の例示図であり、交差する点は、(1−xf、1)となる。なお、xfは交差する点のx座標の小数部分である。図13(c)はリージョン3の場合の例示図であり、交差する点は、(0、1−yf)となる。図13(d)はリージョン4の場合の例示図であり、交差する点は、(xf、0)となる。なお、図13は、単位ピクセル内の角部分を構成する頂点(xk、yk)から外部の点(xq、yq)に向かって出射する場合の折れ線近似した線分と単位ピクセルの辺とが交差する点の座標につき説明しているが、外部の点(xp、yp)から単位ピクセル内の角部分を構成する頂点(xk、yk)に向かって入射する場合の折れ線近似した線分と単位ピクセルの辺とが交差する点の座標についても同様にリージョン分類を行うことができる。
FIG. 13B is an exemplary diagram in the case of the
リージョン分類を行った後、CPU11は、単位ピクセル内で角部分を構成する頂点(xk、yk)に対向する一又は複数の辺で囲繞された部分の面積を算出し(ステップS1005)、単位ピクセルごとのグレイ濃度を算出する(ステップS1006)。
After performing the region classification, the
具体的には、図14に示す処理を実行することにより、単位ピクセル内の角部分を構成する頂点(xk、yk)に対向する一又は複数の辺で囲繞された部分の面積を算出する。CPU11は、単位ピクセルへ折れ線近似した線分が入射するリージョンと、単位ピクセルから折れ線近似した線分が出射するリージョンとの差を算出し、角部分を構成する頂点(xk、yk)を挟む2つの線分が、単位ピクセルのどの辺を通過するのか特定する。図14(a)乃至(e)は、単位ピクセルへ折れ線近似した線分が入射するリージョンと、単位ピクセルから折れ線近似した線分が出射するリージョンとの差分値ΔRに応じて、フォント表示部分の面積を求める方法を示す図である。
Specifically, by executing the processing shown in FIG. 14, the area of the part surrounded by one or more sides facing the vertex (xk, yk) constituting the corner part in the unit pixel is calculated. The
図14(a)は、差分値ΔRが‘0’である場合であって、単位ピクセルへ折れ線近似した線分が入射する点のx座標x1より、単位ピクセルから折れ線近似した線分が出射する点のx座標x2の方が大きいときのフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数11)により算出する。 FIG. 14A shows a case where the difference value ΔR is “0”, and a line segment approximating the polygonal line is emitted from the unit pixel from the x coordinate x1 of the point where the line segment approximating the polygonal line enters the unit pixel. It is a figure which shows the method of calculating | requiring the area of the font display part when the x coordinate x2 of a point is larger. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (hatched portion) is calculated by (Equation 11).
(数11)
A=D2×(x2−x1)/2
(Equation 11)
A = D2 × (x2−x1) / 2
図14(b)は、差分値ΔRが‘0’である場合であって、単位ピクセルへ折れ線近似した線分が入射する点のx座標x1より、単位ピクセルから折れ線近似した線分が出射する点のx座標x2の方が小さいときのフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数12)により算出する。 FIG. 14B shows a case where the difference value ΔR is “0”, and a line segment approximating the polygonal line is emitted from the unit pixel from the x coordinate x1 of the point where the line segment approximating the polygonal line enters the unit pixel. It is a figure which shows the method of calculating | requiring the area of the font display part when the x coordinate x2 of a point is smaller. Since the right side of the traveling direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 12).
(数12)
A=1.0−D2×(x2−x1)/2
(Equation 12)
A = 1.0−D2 × (x2−x1) / 2
図14(c)は、差分値ΔRが‘1’である場合のフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数13)により算出する。 FIG. 14C is a diagram showing a method for obtaining the area of the font display portion when the difference value ΔR is “1”. Since the right side in the traveling direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 13).
(数13)
A=(D2×(1.0−x1)+D1×y1)/2
(Equation 13)
A = (D2 × (1.0−x1) + D1 × y1) / 2
図14(d)は、差分値ΔRが‘2’である場合のフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数14)により算出する。なおx3は、単位ピクセルから折れ線近似した線分が出射する点のx座標x2を1.0から減じた値である。 FIG. 14D is a diagram showing a method for obtaining the area of the font display portion when the difference value ΔR is “2”. Since the right side in the traveling direction of the broken line is displayed in gray, the area A of the font display portion (hatched portion) is calculated by (Equation 14). Note that x3 is a value obtained by subtracting x coordinate x2 of a point where a line segment approximated by a broken line from a unit pixel is emitted from 1.0.
(数14)
A=((D2×(1.0−x1)+D1+(1.0−D2)×x3))/2
(Equation 14)
A = ((D2 × (1.0−x1) + D1 + (1.0−D2) × x3)) / 2
図14(e)は、差分値ΔRが‘3’である場合のフォント表示部分の面積を求める方法を示す図である。折れ線の進行方向の右側をグレーに表示することから、フォント表示部分(斜線部)の面積Aは(数15)により算出する。なおy3は、単位ピクセルから折れ線近似した線分が出射する点のy座標y1を1.0から減じた値である。 FIG. 14E is a diagram showing a method for obtaining the area of the font display portion when the difference value ΔR is “3”. Since the right side in the traveling direction of the broken line is displayed in gray, the area A of the font display portion (shaded portion) is calculated by (Equation 15). Note that y3 is a value obtained by subtracting from 1.0 the y coordinate y1 of the point where a line segment approximating a polygonal line from the unit pixel is emitted.
(数15)
A=1.0−(D2×x1+(1.0−D1)×(1.0−y3))/2
(Equation 15)
A = 1.0− (D2 × x1 + (1.0−D1) × (1.0−y3)) / 2
このように、単位ピクセルの4辺のうち一辺を基準として角部分で囲繞されたフォント領域の面積を算出することにより、算出した面積から直接的に単位ピクセル内のグレイ濃度を定めることができる。したがって、単位ピクセル内のフォント表示部分の占める面積が算出された場合、CPU11は、角部分を構成する単位ピクセルを、算出された面積と同値であるグレイ濃度でピクセルに対する塗りつぶし処理を実行し(ステップS1007)、生成した文字画像を表示手段17へ表示出力、又は印刷手段18へ印字出力する(ステップS1008)。
As described above, by calculating the area of the font region surrounded by the corner portion with respect to one of the four sides of the unit pixel, the gray density in the unit pixel can be determined directly from the calculated area. Therefore, when the area occupied by the font display portion in the unit pixel is calculated, the
上述したように、リージョンの差分値ΔRに応じて、角部分を含むフォント表示部分の面積を算出し、算出した面積をそのまま記憶手段12にグレイ濃度として記憶することにより、アウトラインフォントの角部分のグレイ濃度を複雑な演算処理を行うことなく定めることができる。CPU11は、角部分を含む単位ピクセルを、記憶手段12に記憶してあるグレイ濃度で塗りつぶし処理することにより、滑らかな表示出力又は印字出力を行うことができる。
As described above, the area of the font display portion including the corner portion is calculated in accordance with the region difference value ΔR, and the calculated area is stored as the gray density in the
以上のように本実施の形態2によれば、単位ピクセル内に折れ線近似した線分で構成される角部分が存在する場合、単位ピクセルの一辺に基づいた相対座標で面積を算出することができ、単位ピクセルのグレイ濃度を特定するための面積算出に係る演算処理負荷を軽減することができ、フォントを表示又は印字するまでの時間を短縮することが可能となる。 As described above, according to the second embodiment, when a corner portion constituted by a line segment approximated by a polygonal line exists in a unit pixel, the area can be calculated with relative coordinates based on one side of the unit pixel. Thus, it is possible to reduce the processing load related to area calculation for specifying the gray density of the unit pixel, and it is possible to shorten the time until the font is displayed or printed.
10 アウトラインフォント出力装置
11 CPU
12 記録手段
13 ROM
14 RAM
15 補助記憶手段
16 入力手段
17 表示手段
18 印刷手段
121 フォントデータ記憶部
122 グレイ濃度記憶部
10 Outline
12 recording means 13 ROM
14 RAM
15 Auxiliary storage means 16 Input means 17 Display means 18 Printing means 121 Font
Claims (9)
前記ピクセルは、矩形状の単位ピクセルであり、
単位ピクセル内の近似した折れ線の角部分と対向する一又は複数の辺で囲繞されたフォント領域の面積を算出する面積算出手段と、
算出した面積に応じて単位ピクセルのグレイ濃度を特定する濃度特定手段と
を備えることを特徴とするアウトラインフォント出力装置。 In an outline font output device for approximating a closed curve indicating the outline of an outline font by a polygonal line, specifying a gray density of a pixel in which the corner portion of the approximated line is present, and outputting an outline font,
The pixel is a rectangular unit pixel,
An area calculating means for calculating an area of a font region surrounded by one or a plurality of sides facing a corner portion of an approximate broken line in a unit pixel;
An outline font output device comprising: density specifying means for specifying a gray density of a unit pixel according to the calculated area.
近似した折れ線と交差する前記単位ピクセルの一辺が、前記単位ピクセルの長辺か短辺かを判断し、
長辺又は短辺を基準とした相対位置に基づいて前記フォント領域の面積を算出するようにしてあることを特徴とする請求項1記載のアウトラインフォント出力装置。 The area calculating means includes
Determining whether one side of the unit pixel intersecting the approximate polygonal line is a long side or a short side of the unit pixel;
2. The outline font output device according to claim 1, wherein the area of the font region is calculated based on a relative position with respect to the long side or the short side.
前記面積算出手段は、
近似した折れ線と交差する前記単位ピクセルの一辺を基準とした相対位置に基づいて前記フォント領域の面積を算出するようにしてあることを特徴とする請求項1記載のアウトラインフォント出力装置。 The unit pixel is a square;
The area calculating means includes
2. The outline font output device according to claim 1, wherein an area of the font area is calculated based on a relative position based on one side of the unit pixel intersecting with the approximate polygonal line.
前記ピクセルは、矩形状の単位ピクセルであり、
単位ピクセル内の近似した折れ線の角部分と対向する一又は複数の辺で囲繞されたフォント領域の面積を算出し、
算出した面積に応じて単位ピクセルのグレイ濃度を特定することを特徴とするアウトラインフォント出力方法。 In the outline font output method for outputting the outline font by approximating the closed curve indicating the outline of the outline font by a polygonal line, specifying the gray density of the pixel in which the corner portion of the approximated line is present,
The pixel is a rectangular unit pixel,
Calculate the area of the font area surrounded by one or more sides facing the corner of the approximate polygonal line in the unit pixel,
An outline font output method characterized by specifying a gray density of a unit pixel according to a calculated area.
長辺又は短辺を基準とした相対位置に基づいて前記フォント領域の面積を算出することを特徴とする請求項4記載のアウトラインフォント出力方法。 Determining whether one side of the unit pixel intersecting the approximate polygonal line is a long side or a short side of the unit pixel;
5. The outline font output method according to claim 4, wherein the area of the font area is calculated based on a relative position with respect to the long side or the short side.
近似した折れ線と交差する前記単位ピクセルの一辺を基準とした相対位置に基づいて前記フォント領域の面積を算出することを特徴とする請求項4記載のアウトラインフォント出力方法。 The unit pixel is a square;
5. The outline font output method according to claim 4, wherein the area of the font region is calculated based on a relative position based on one side of the unit pixel that intersects with the approximate polygonal line.
前記コンピュータを、
単位ピクセル内の近似した折れ線の角部分と対向する一又は複数の辺で囲繞されたフォント領域の面積を算出する面積算出手段、及び
算出した面積に応じて単位ピクセルのグレイ濃度を特定する濃度特定手段
として機能させることを特徴とするコンピュータプログラム。 It is possible to execute on a computer that outputs a contour font by approximating a closed curve indicating the outline of an outline font that passes through a rectangular unit pixel, and specifying the gray density of the pixel where the corner portion of the approximate polygonal line exists. In a computer program,
The computer,
Area calculation means for calculating the area of the font area surrounded by one or more sides facing the approximate corner of the polygonal line in the unit pixel, and density specification for specifying the gray density of the unit pixel according to the calculated area A computer program that functions as means.
近似した折れ線と交差する前記単位ピクセルの一辺が、前記単位ピクセルの長辺か短辺かを判断する手段、及び
該手段の判断結果を基準とした相対位置に基づいて前記フォント領域の面積を算出する手段
として機能させることを特徴とする請求項7記載のコンピュータプログラム。 The computer,
Means for determining whether one side of the unit pixel intersecting the approximate polygonal line is a long side or a short side of the unit pixel, and calculating the area of the font region based on a relative position based on a determination result of the unit pixel The computer program according to claim 7, wherein the computer program is made to function as a means for
前記コンピュータを、
近似した折れ線と交差する前記単位ピクセルの一辺を基準とした相対位置に基づいて前記フォント領域の面積を算出する手段として機能させることを特徴とする請求項7記載のコンピュータプログラム。 The unit pixel is a square;
The computer,
8. The computer program according to claim 7, wherein the computer program functions as means for calculating an area of the font region based on a relative position based on one side of the unit pixel intersecting with the approximate polygonal line.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005183469A JP4594809B2 (en) | 2005-06-23 | 2005-06-23 | Outline font output device, outline font output method, and computer program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005183469A JP4594809B2 (en) | 2005-06-23 | 2005-06-23 | Outline font output device, outline font output method, and computer program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007003801A true JP2007003801A (en) | 2007-01-11 |
JP4594809B2 JP4594809B2 (en) | 2010-12-08 |
Family
ID=37689502
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005183469A Expired - Fee Related JP4594809B2 (en) | 2005-06-23 | 2005-06-23 | Outline font output device, outline font output method, and computer program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4594809B2 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0540463A (en) * | 1991-08-08 | 1993-02-19 | Hitachi Ltd | Multi-level character generator |
JPH05290177A (en) * | 1992-04-08 | 1993-11-05 | Fujitsu Ltd | Polygonal anti-aliasing system |
JPH07273985A (en) * | 1994-03-28 | 1995-10-20 | Toppan Printing Co Ltd | Processing method and output device for image data |
JPH09245181A (en) * | 1996-03-06 | 1997-09-19 | Matsushita Electric Ind Co Ltd | Anti-aliasing |
JP2774653B2 (en) * | 1990-03-14 | 1998-07-09 | キヤノン株式会社 | Character processor |
JP2002035141A (en) * | 2000-07-31 | 2002-02-05 | Yasutake Hichi | Bio-electrode, method for manufacturing the same, clothing with bio-electrode, electrocardiograph, low frequency therapeutic instrument and high frequency therapeutic instrument |
JP2002351451A (en) * | 2001-03-23 | 2002-12-06 | Rise Corp | Method for character processing based upon outline font information and computer software program product making computer implement the method |
-
2005
- 2005-06-23 JP JP2005183469A patent/JP4594809B2/en not_active Expired - Fee Related
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2774653B2 (en) * | 1990-03-14 | 1998-07-09 | キヤノン株式会社 | Character processor |
JPH0540463A (en) * | 1991-08-08 | 1993-02-19 | Hitachi Ltd | Multi-level character generator |
JPH05290177A (en) * | 1992-04-08 | 1993-11-05 | Fujitsu Ltd | Polygonal anti-aliasing system |
JPH07273985A (en) * | 1994-03-28 | 1995-10-20 | Toppan Printing Co Ltd | Processing method and output device for image data |
JPH09245181A (en) * | 1996-03-06 | 1997-09-19 | Matsushita Electric Ind Co Ltd | Anti-aliasing |
JP2002035141A (en) * | 2000-07-31 | 2002-02-05 | Yasutake Hichi | Bio-electrode, method for manufacturing the same, clothing with bio-electrode, electrocardiograph, low frequency therapeutic instrument and high frequency therapeutic instrument |
JP2002351451A (en) * | 2001-03-23 | 2002-12-06 | Rise Corp | Method for character processing based upon outline font information and computer software program product making computer implement the method |
Also Published As
Publication number | Publication date |
---|---|
JP4594809B2 (en) | 2010-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3180773B1 (en) | Bandwidth reduction using texture lookup by adaptive shading | |
US7257776B2 (en) | Systems and methods for scaling a graphical user interface according to display dimensions and using a tiered sizing schema to define display objects | |
JP4598030B2 (en) | Tile-based precision rasterization in graphics pipelines | |
JP4157569B2 (en) | Drawing apparatus, drawing method, and drawing program | |
JPH0863144A (en) | Font processing device and font processing method | |
US9710869B2 (en) | Method, system and apparatus for rendering a graphical object | |
JPH11338452A (en) | Character font generating method and device, and computor-readable storage medium for storing character font generating program | |
KR101159320B1 (en) | Iteratively solving constraints in a font-hinting language | |
US8711184B2 (en) | Scalable pixel coverage function-map | |
JP2009092759A (en) | Drawing device, image output device, and program | |
JP3791259B2 (en) | Outline smoothing processing method | |
JP4625269B2 (en) | CHARACTER IMAGE GENERATION DEVICE, CHARACTER IMAGE GENERATION METHOD, DISPLAY CONTROL DEVICE, CHARACTER IMAGE GENERATION PROGRAM, AND DISPLAY CONTROL PROGRAM | |
JP2006139727A (en) | Three-dimensional figure drawing processor, image display device, three-dimensional figure drawing processing method, control program for executing the method by computer, and computer readable recording medium recorded with the program | |
JP4594809B2 (en) | Outline font output device, outline font output method, and computer program | |
JP3009525B2 (en) | Vector image drawing equipment | |
US20220366621A1 (en) | Systems for Generating Anti-Aliased Vector Objects | |
JP2010134654A (en) | Image rendering processing apparatus | |
JP2007240848A (en) | Display program, data structure and display device | |
JP2005346605A (en) | Antialias drawing method and drawing apparatus using the same | |
JP4325812B2 (en) | Vector image drawing circuit and vector image drawing method | |
JPH06274303A (en) | Multiwindow display method | |
KR100719480B1 (en) | Fast anti-aliasing method | |
JP2018019212A (en) | Information processing apparatus, drawing processing method, and computer program | |
JPH06118935A (en) | Character data generating device | |
JP3072756B2 (en) | Drawing equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090902 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20091110 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100106 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100316 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20100511 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20100914 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20100917 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130924 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |