WO2014174569A1 - Font drawing device - Google Patents

Font drawing device Download PDF

Info

Publication number
WO2014174569A1
WO2014174569A1 PCT/JP2013/061771 JP2013061771W WO2014174569A1 WO 2014174569 A1 WO2014174569 A1 WO 2014174569A1 JP 2013061771 W JP2013061771 W JP 2013061771W WO 2014174569 A1 WO2014174569 A1 WO 2014174569A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage unit
path data
font
character
data
Prior art date
Application number
PCT/JP2013/061771
Other languages
French (fr)
Japanese (ja)
Inventor
前川 拓也
Original Assignee
三菱電機株式会社
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 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2013/061771 priority Critical patent/WO2014174569A1/en
Priority to TW102122323A priority patent/TW201441838A/en
Publication of WO2014174569A1 publication Critical patent/WO2014174569A1/en

Links

Images

Classifications

    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09GARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION
    • G09G5/00Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators
    • G09G5/22Control arrangements or circuits for visual indicators common to cathode-ray tube indicators and other visual indicators characterised by the display of characters or indicia using display control signals derived from coded signals representing the characters or indicia, e.g. with a character-code memory
    • G09G5/24Generation of individual character patterns

Definitions

  • the present invention relates to a font drawing apparatus for drawing a character of at least one of a stroke font and an outline font.
  • a drawing processing speed-up technique by caching character data has existed conventionally. For example, bitmap data obtained by expanding vector data of glyphs, or linear approximation data generated in the middle of expansion is cached, There has been a technique of drawing characters without performing the same character drawing processing after the second drawing (see, for example, Patent Document 1).
  • the memory capacity required for the cache is proportional to the square of the character size to be drawn, which causes a problem that the required memory capacity becomes enormous.
  • the linear approximation data cache there is a problem that even if the characters have the same character code, if the character width and height to be drawn are different, a cache miss occurs, and it is necessary to perform grid fitting processing that requires processing again. there were.
  • the present invention has been made to solve such a problem, and an object of the present invention is to obtain a font drawing apparatus capable of speeding up character drawing processing while reducing the memory capacity to be used.
  • the font drawing device is a font drawing device that draws characters of at least one of a stroke font and an outline font, and that temporarily holds unique path data for the character code of the font.
  • 1 storage unit the second storage unit that temporarily stores the path data that has been scaled to the size of the character to be drawn and then adjusted by grid fitting, and the character pass data when drawing the character It is determined whether there is path data to be stored in the second storage unit. If it exists, drawing is performed based on the path data in the second storage unit, and if there is no path data in the second storage unit, the first is stored.
  • a drawing processing unit that performs drawing processing including grid fitting using the path data of the storage unit.
  • the character drawing device when the character is drawn, if the pass data exists in the second storage unit, drawing is performed using the pass data, and if the pass data does not exist in the second storage unit, the first drawing is performed. Since the drawing processing including grid fitting is performed using the path data of one storage unit, the character drawing processing can be speeded up while reducing the memory capacity to be used.
  • FIG. 1 is a functional block diagram of a font drawing apparatus according to this embodiment.
  • the font drawing apparatus according to the present embodiment is a drawing apparatus that draws characters of at least one of a stroke font and an outline font, and includes a first storage unit 1, a second storage unit 2, and a drawing process. Part 3 is provided.
  • the first storage unit 1 is a storage unit that temporarily holds unique path data for a character code.
  • the second storage unit 2 is a storage unit that temporarily holds path data that has been scaled to a character size to be drawn and then subjected to position adjustment by grid fitting.
  • the drawing processing unit 3 determines whether path data matching the path data of the character exists in the second storage unit 2 when drawing a character based on the input drawing parameters.
  • a processing unit that performs drawing based on the path data in the second storage unit 2 and performs a drawing process including grid fitting using the path data in the first storage unit 1 when the data does not exist in the second storage unit 2 It is.
  • FIG. 2 is a hardware configuration diagram of the font drawing apparatus according to this embodiment.
  • the font drawing apparatus includes an arithmetic processor 101, a main memory 102, an auxiliary storage device 103, and an output device 104.
  • the arithmetic processor 101 is a processor for performing arithmetic processing represented by a CPU or the like.
  • the main memory 102 forms a work area for the arithmetic processor 101 to perform arithmetic processing, and realizes a first storage device 102a and a second storage device 102b.
  • the first storage device 102a is a cache memory corresponding to the first storage unit 1 in FIG. 1, and holds path data that depends only on the character code.
  • the second storage device 102b is a cache memory corresponding to the second storage unit 2 in FIG. 1, and holds path data that has been subjected to position adjustment by grid fitting after scaling to the character size to be drawn.
  • the auxiliary storage device 103 is a storage device including a hard disk device or a semiconductor memory for storing the application program 103a, data (not shown), and the like.
  • the output device 104 is an output device such as a display for displaying a character drawing result.
  • the arithmetic processor 101 loading the application program 103a from the auxiliary storage device 103 to the main memory 102 and executing it. That is, after the application program 103a is copied onto the main memory 102, it is executed by the arithmetic processor 101 to execute path data generation processing, instruction control, and the like.
  • the present invention is a technique for speeding up character drawing processing in an apparatus for drawing characters using a grid fitting technique that dynamically performs hinting processing.
  • Hinting processing is an optimization technique for rasterizing font outline information (path data) into a bitmap image. As shown in FIG. 3, the position of the path data is dynamically changed with respect to the display grid.
  • the method of correcting to is grid fitting.
  • attention is paid to a character drawing process using the grid fitting process.
  • the path data refers to character outline information as shown in FIG. 4, and is represented by a set of point coordinate and line type flag data connecting points.
  • FIG. 5 is a flowchart of the character drawing process performed by the font drawing apparatus according to this embodiment.
  • a character code, a character size, and a drawing parameter such as an X-axis / Y-axis magnification for scaling such as a vertical double-width or horizontal double-width character are specified.
  • the drawing processing unit 3 first searches the second storage unit 2 for characters having the same parameters in step ST1.
  • the second storage unit 2 has path data that has been enlarged to a drawing character size including scaling, and has been subjected to position adjustment by grid fitting. By hitting this cache, calculation by grid fitting is performed. Processing can be omitted. If there is no path data in which the width and height of the drawing character size match, but the width and height can be acquired from different cache data, the data is acquired and the rendering process in step ST11 is performed.
  • the presence or absence of path data with the same character code is searched from the first storage unit 1 in step ST2.
  • the path data included in the first storage unit 1 is obtained by normalizing glyph path data loaded from font data, and is unique to the character code. If the desired storage data does not exist in the first storage unit 1, a process of acquiring the path data from the font data in step ST 3 and a normalization process of the path data are performed in step ST 4, and the first storage unit Register to 1. It is assumed that the font data is held in advance by the drawing processing unit 3 or stored in an external storage device.
  • step ST5 and step ST6 it is searched whether there exists path data having the same width or height of the scaled drawing character size. If the path data does not exist, in step ST7, the normalized path data is enlarged according to the designated character size and the X-axis / Y-axis magnification. Then, after the path data is enlarged, a grid fitting process is performed in step ST8, and the path data after the position adjustment and management information relating to the grid fitting are held in step ST10.
  • the management information as shown in FIG. 6, the character code, the line type flag data, the drawing character size, and the path data storage destination address corresponding to the character size are held as a set, and the management information is referred to. Pass data after grid fitting.
  • the management information shown in FIG. 6 may be stored in the drawing processing unit 3 or stored in any device accessible by the drawing processing unit 3.
  • the grid fitting process used in the present invention employs a method capable of separately processing the horizontal line and vertical line fitting processes as described in Japanese Patent Application Laid-Open No. 2010-170097.
  • the grid fitting process is performed only for the axis for which no path data exists in the cache in step ST9.
  • characters 701 and 702 are characters having character sizes of 16 dots and 32 dots, respectively, and the characters are drawn by specifying the enlargement ratio of the X axis and the Y axis in addition to the character size.
  • a character 703 draws a character having a character size of 16 dots while designating a character having a character size of 32 dots as a character having a character size of 32 dots. It is assumed that drawing is performed with the enlargement ratio specified as 1 for both the axis and the Y axis. As a result, the widths of the drawn characters 703 and 704 are both equal to 32 dots. At this time, since the coordinate values after the grid fitting process in the X direction are equal, the grid fitting process may be applied only for the Y coordinate. Then, after obtaining the pass data after the grid fitting process, the pass data is input to the rasterizer in step ST11 to perform rendering. The flow of the rendering process is described in FIG. 8. Characters are obtained by straight line division processing (step ST 111) of curve data, intersection point calculation processing of path data and scan lines (step ST 112), and painting processing (step ST 113). Draw.
  • the above two-stage cache mechanism reduces the number of grid fitting processes and draws at high speed.
  • this method uses pass data as a cache target, and the memory capacity required to store the pass data does not depend on the size of the character to be drawn. The capacity can be reduced.
  • the font drawing apparatus that draws characters of at least one of the stroke font and the outline font is unique to the character code of the font.
  • a first storage unit that temporarily stores correct path data
  • a second storage unit that temporarily stores path data that has been scaled to the character size to be drawn and then adjusted by grid fitting
  • a character When drawing, it is determined whether there is path data matching the character path data in the second storage unit. If there is, the drawing is performed based on the path data in the second storage unit, and the second storage unit
  • a rendering processing unit that performs rendering processing including grid fitting using the path data in the first storage unit Because it was example, while reducing the memory capacity to be used, it is possible to speed up the character rendering process.
  • the drawing processing unit performs the grid fitting process of the pass data independently in the X-axis direction and the Y-axis direction, so the width and height are equal.
  • the grid fitting process can be omitted and the speed can be increased.
  • FIG. The second embodiment is an example in which the drawing processing unit 3 includes a hardware processing unit, and the hardware processing unit performs drawing using the path data in the second storage unit. Since the functional block diagram is the same as that of FIG. 1, description will be made using the configuration of FIG.
  • FIG. 9 is a hardware configuration diagram of the font rendering apparatus according to the second embodiment.
  • the illustrated font drawing apparatus uses an H / W graphics engine capable of vector graphics processing, and the graphics engine 201 refers to the video memory 202 as compared with the configuration of the first embodiment shown in FIG. The difference is that the characters are drawn.
  • a second storage device 102 b that holds path data that has been subjected to position adjustment by grid fitting is arranged in the video memory 202 and used as input data for the graphics engine 201.
  • the grid fitting process is not performed at the time of a cache hit, and the character rendering process can be immediately performed by H / W. Since other configurations are the same as those of the first embodiment shown in FIG. 2, the same reference numerals are given to corresponding portions, and description thereof will be omitted.
  • the rendering processing unit includes the hardware processing unit, and the hardware processing unit performs rendering using the path data in the second storage unit. Therefore, higher speed can be achieved.
  • the font drawing apparatus relates to a font drawing apparatus that draws characters of stroke fonts and outline fonts, and is suitable for outputting a character drawing result to a display or a printer.

Abstract

A first storage unit (1) temporarily holds pass data unique to a character code. A second storage unit (2) temporarily holds pass data which was position-adjusted by grid fitting after scaling the pass data to a character drawing size. When drawing a character, if the pass data exists in the second storage unit (2), a drawing processing unit (3) performs a drawing using the pass data, and if the pass data does not exist in the second storage unit (2), the drawing processing unit (3) performs drawing processing including the grid fitting using the pass data in the first storage unit (1).

Description

フォント描画装置Font drawing device
 本発明は、ストロークフォントおよびアウトラインフォントのうち、少なくともいずれか一方のフォントの文字を描画するフォント描画装置に関するものである。 The present invention relates to a font drawing apparatus for drawing a character of at least one of a stroke font and an outline font.
 文字データのキャッシュ化による描画処理高速化手法は従来より存在しており、例えば、グリフのベクトルデータを展開して得られるビットマップデータ、あるいは、展開の中途で生成する直線近似データをキャッシュし、2回目の描画以降同じ文字描画処理を行わずに文字を描画する手法があった(例えば、特許文献1参照)。 A drawing processing speed-up technique by caching character data has existed conventionally. For example, bitmap data obtained by expanding vector data of glyphs, or linear approximation data generated in the middle of expansion is cached, There has been a technique of drawing characters without performing the same character drawing processing after the second drawing (see, for example, Patent Document 1).
特開平7-306669号公報JP 7-306669 A
 しかしながら、ビットマップを用いた場合には、キャッシュに必要とするメモリ容量が、描画する文字サイズの2乗に比例することになるため、必要とするメモリ容量が膨大になるという問題があった。また、直線近似データキャッシュを利用する場合、同じ文字コードの文字でも、描画する文字幅や高さが異なる場合にキャッシュミスとなり、処理に負荷がかかるグリッドフィッティング処理を再度行う必要があるという問題があった。 However, when a bitmap is used, the memory capacity required for the cache is proportional to the square of the character size to be drawn, which causes a problem that the required memory capacity becomes enormous. In addition, when using the linear approximation data cache, there is a problem that even if the characters have the same character code, if the character width and height to be drawn are different, a cache miss occurs, and it is necessary to perform grid fitting processing that requires processing again. there were.
 この発明は、かかる問題を解決するためになされたもので、使用するメモリ容量を削減しつつ、文字描画処理を高速化することのできるフォント描画装置を得ることを目的とする。 The present invention has been made to solve such a problem, and an object of the present invention is to obtain a font drawing apparatus capable of speeding up character drawing processing while reducing the memory capacity to be used.
 この発明のフォント描画装置は、ストロークフォントおよびアウトラインフォントのうち、少なくともいずれか一方のフォントの文字を描画するフォント描画装置において、フォントの文字コードに対して一意なパスデータを一時的に保持する第1の記憶部と、描画する文字サイズにスケーリングした後、グリッドフィッティングによる位置調整を行ったパスデータを一時的に保持する第2の記憶部と、文字を描画する際、文字のパスデータに一致するパスデータが第2の記憶部に存在するかを判定し、存在した場合は第2の記憶部のパスデータに基づいて描画を行い、第2の記憶部に存在しなかった場合は第1の記憶部のパスデータを用いてグリッドフィッティングを含む描画処理を行う描画処理部とを備えたものである。 The font drawing device according to the present invention is a font drawing device that draws characters of at least one of a stroke font and an outline font, and that temporarily holds unique path data for the character code of the font. 1 storage unit, the second storage unit that temporarily stores the path data that has been scaled to the size of the character to be drawn and then adjusted by grid fitting, and the character pass data when drawing the character It is determined whether there is path data to be stored in the second storage unit. If it exists, drawing is performed based on the path data in the second storage unit, and if there is no path data in the second storage unit, the first is stored. And a drawing processing unit that performs drawing processing including grid fitting using the path data of the storage unit.
 この発明に係るフォント描画装置は、文字を描画する際、そのパスデータが第2の記憶部に存在した場合はこれを用いて描画を行い、第2の記憶部に存在しなかった場合は第1の記憶部のパスデータを用いてグリッドフィッティングを含む描画処理を行うようにしたので、使用するメモリ容量を削減しつつ、文字描画処理を高速化することができる。 In the font drawing device according to the present invention, when the character is drawn, if the pass data exists in the second storage unit, drawing is performed using the pass data, and if the pass data does not exist in the second storage unit, the first drawing is performed. Since the drawing processing including grid fitting is performed using the path data of one storage unit, the character drawing processing can be speeded up while reducing the memory capacity to be used.
この発明に係るフォント描画装置の機能ブロック図である。It is a functional block diagram of the font drawing apparatus which concerns on this invention. この発明の実施の形態1のフォント描画装置によるハードウェア構成図である。It is a hardware block diagram by the font drawing apparatus of Embodiment 1 of this invention. グリッドフィッティングの説明図である。It is explanatory drawing of a grid fitting. アウトラインフォントとストロークフォントの説明図である。It is explanatory drawing of an outline font and a stroke font. この発明の実施の形態1のフォント描画装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the font drawing apparatus of Embodiment 1 of this invention. この発明の実施の形態1のフォント描画装置における管理情報を示す説明図である。It is explanatory drawing which shows the management information in the font drawing apparatus of Embodiment 1 of this invention. この発明の実施の形態1のフォント描画装置におけるキャッシュにパスデータが存在しない軸についてのみグリッドフィッティング処理を実施する場合の説明図である。It is explanatory drawing at the time of implementing a grid fitting process only about the axis | shaft in which the path data does not exist in the cache in the font drawing apparatus of Embodiment 1 of this invention. この発明の実施の形態1のフォント描画装置におけるレンダリング処理を示すフローチャートである。It is a flowchart which shows the rendering process in the font drawing apparatus of Embodiment 1 of this invention. この発明の実施の形態2のフォント描画装置を示すハードウェア構成図である。It is a hardware block diagram which shows the font drawing apparatus of Embodiment 2 of this invention.
 以下、この発明をより詳細に説明するために、この発明を実施するための形態について、添付の図面に従って説明する。
実施の形態1.
 図1は、本実施の形態によるフォント描画装置の機能ブロック図である。
 本実施の形態によるフォント描画装置は、ストロークフォントおよびアウトラインフォントのうち、少なくともいずれか一方のフォントの文字を描画する描画装置であり、第1の記憶部1、第2の記憶部2、描画処理部3を備えている。
Hereinafter, in order to explain the present invention in more detail, modes for carrying out the present invention will be described with reference to the accompanying drawings.
Embodiment 1 FIG.
FIG. 1 is a functional block diagram of a font drawing apparatus according to this embodiment.
The font drawing apparatus according to the present embodiment is a drawing apparatus that draws characters of at least one of a stroke font and an outline font, and includes a first storage unit 1, a second storage unit 2, and a drawing process. Part 3 is provided.
 第1の記憶部1は、文字コードに対して一意なパスデータを一時的に保持する記憶部である。第2の記憶部2は、描画する文字サイズにスケーリングした後、グリッドフィッティングによる位置調整を行ったパスデータを一時的に保持する記憶部である。描画処理部3は、入力される描画パラメータに基づいて文字を描画する際、その文字のパスデータに一致するパスデータが第2の記憶部2に存在するかを判定し、存在した場合は第2の記憶部2のパスデータに基づいて描画を行い、第2の記憶部2に存在しなかった場合は第1の記憶部1のパスデータを用いてグリッドフィッティングを含む描画処理を行う処理部である。 The first storage unit 1 is a storage unit that temporarily holds unique path data for a character code. The second storage unit 2 is a storage unit that temporarily holds path data that has been scaled to a character size to be drawn and then subjected to position adjustment by grid fitting. The drawing processing unit 3 determines whether path data matching the path data of the character exists in the second storage unit 2 when drawing a character based on the input drawing parameters. A processing unit that performs drawing based on the path data in the second storage unit 2 and performs a drawing process including grid fitting using the path data in the first storage unit 1 when the data does not exist in the second storage unit 2 It is.
 図2は、本実施の形態によるフォント描画装置のハードウェア構成図である。図示のように、フォント描画装置は、演算プロセッサ101、主メモリ102、補助記憶装置103、出力デバイス104からなる。演算プロセッサ101は、CPUなどに代表される演算処理を行うためのプロセッサである。主メモリ102は、演算プロセッサ101が演算処理を行うための作業領域を形成すると共に、第1記憶装置102aと第2記憶装置102bを実現している。第1記憶装置102aは、図1における第1の記憶部1に相当するキャッシュメモリであり、文字コードにのみ依存するパスデータを保持する。第2記憶装置102bは、図1における第2の記憶部2に相当するキャッシュメモリであり、描画する文字サイズにスケーリング後、グリッドフィッティングによる位置調整を行ったパスデータを保持する。補助記憶装置103は、アプリケーションプログラム103aや図示しないデータ等を格納するためのハードディスク装置や半導体メモリからなる記憶装置である。出力デバイス104は、文字描画結果を表示するディスプレイといった出力装置である。 FIG. 2 is a hardware configuration diagram of the font drawing apparatus according to this embodiment. As shown in the figure, the font drawing apparatus includes an arithmetic processor 101, a main memory 102, an auxiliary storage device 103, and an output device 104. The arithmetic processor 101 is a processor for performing arithmetic processing represented by a CPU or the like. The main memory 102 forms a work area for the arithmetic processor 101 to perform arithmetic processing, and realizes a first storage device 102a and a second storage device 102b. The first storage device 102a is a cache memory corresponding to the first storage unit 1 in FIG. 1, and holds path data that depends only on the character code. The second storage device 102b is a cache memory corresponding to the second storage unit 2 in FIG. 1, and holds path data that has been subjected to position adjustment by grid fitting after scaling to the character size to be drawn. The auxiliary storage device 103 is a storage device including a hard disk device or a semiconductor memory for storing the application program 103a, data (not shown), and the like. The output device 104 is an output device such as a display for displaying a character drawing result.
 また、図1における描画処理部3は、演算プロセッサ101が補助記憶装置103からアプリケーションプログラム103aを主メモリ102にロードし、実行することで実現されている。すなわち、アプリケーションプログラム103aが主メモリ102上にコピーされた後、演算プロセッサ101によって実行され、パスデータの生成処理や命令の制御等を実施する。 1 is realized by the arithmetic processor 101 loading the application program 103a from the auxiliary storage device 103 to the main memory 102 and executing it. That is, after the application program 103a is copied onto the main memory 102, it is executed by the arithmetic processor 101 to execute path data generation processing, instruction control, and the like.
 本発明は、動的にヒンティング処理を行うグリッドフィッティング手法を用いて文字を描画する装置において、文字描画処理を高速化する手法である。ヒンティング処理とは、フォントの輪郭情報(パスデータ)からビットマップ画像へラスタライズを行う際の最適化技術のことを言い、図3に示すように、表示グリッドに対しパスデータの位置を動的に補正する手法がグリッドフィッティングである。本発明では、このグリッドフィッティング処理を用いた文字描画処理に着目する。パスデータは、図4に示すような文字の輪郭情報のことを指し、点座標および点同士を結ぶ線の種類フラグデータの集合で表現される。パスデータの形状の保有方法として2種類存在し、文字の輪郭を模ったアウトラインフォントのほか、文字の骨組みのみで形成されるストロークフォントが存在する。これらのパスデータの描画処理の際、内部のグリッドフィッティング処理にかかる計算量を減らし高速化することを目的とした、キャッシュによる描画処理について以下説明する。 The present invention is a technique for speeding up character drawing processing in an apparatus for drawing characters using a grid fitting technique that dynamically performs hinting processing. Hinting processing is an optimization technique for rasterizing font outline information (path data) into a bitmap image. As shown in FIG. 3, the position of the path data is dynamically changed with respect to the display grid. The method of correcting to is grid fitting. In the present invention, attention is paid to a character drawing process using the grid fitting process. The path data refers to character outline information as shown in FIG. 4, and is represented by a set of point coordinate and line type flag data connecting points. There are two types of methods for storing the shape of the path data, and there are stroke fonts that are formed only by the character framework, in addition to outline fonts that imitate the outline of the characters. A description will be given below of a drawing process using a cache for the purpose of reducing the amount of calculation required for the internal grid fitting process and speeding up the drawing process of the path data.
 図5は、本実施の形態のフォント描画装置による文字描画処理のフローチャートである。
 1つの文字を描画する際、本発明に関わる主な入力として、文字コード、文字サイズ、および縦倍角や横倍角文字など変倍するためのX軸・Y軸の倍率などの描画パラメータを指定する。このようなパラメータを基に、描画処理部3は、まず、ステップST1にて、パラメータが全て同じ文字を第2の記憶部2から検索する。第2の記憶部2には、変倍を含む描画文字サイズへの拡大処理、およびグリッドフィッティングによる位置調整を行ったパスデータを有しており、本キャッシュにヒットすることにより、グリッドフィッティングによる計算処理を省略することができる。また、描画文字サイズの幅および高さが共に合致するパスデータは無いが、幅や高さのそれぞれについて別のキャッシュデータから取得可能である場合、それらのデータを取得してステップST11のレンダリング処理へ移行する。
FIG. 5 is a flowchart of the character drawing process performed by the font drawing apparatus according to this embodiment.
When drawing one character, as main inputs related to the present invention, a character code, a character size, and a drawing parameter such as an X-axis / Y-axis magnification for scaling such as a vertical double-width or horizontal double-width character are specified. . Based on such parameters, the drawing processing unit 3 first searches the second storage unit 2 for characters having the same parameters in step ST1. The second storage unit 2 has path data that has been enlarged to a drawing character size including scaling, and has been subjected to position adjustment by grid fitting. By hitting this cache, calculation by grid fitting is performed. Processing can be omitted. If there is no path data in which the width and height of the drawing character size match, but the width and height can be acquired from different cache data, the data is acquired and the rendering process in step ST11 is performed. Migrate to
 一方、所望のパスデータが取得できない場合は、ステップST2にて、第1の記憶部1から文字コードが等しいパスデータの有無を検索する。第1の記憶部1に含むパスデータは、フォントデータからロードしたグリフのパスデータを正規化したものであり、文字コードに対して一意である。第1の記憶部1に所望のパスデータが存在しない場合、ステップST3にてフォントデータからパスデータを取得する処理、およびステップST4にてパスデータの正規化処理を実施し、第1の記憶部1に登録する。なお、フォントデータは描画処理部3が予め保持しているか、あるいは外部の記憶装置に記憶されているとする。 On the other hand, if desired path data cannot be acquired, the presence or absence of path data with the same character code is searched from the first storage unit 1 in step ST2. The path data included in the first storage unit 1 is obtained by normalizing glyph path data loaded from font data, and is unique to the character code. If the desired storage data does not exist in the first storage unit 1, a process of acquiring the path data from the font data in step ST 3 and a normalization process of the path data are performed in step ST 4, and the first storage unit Register to 1. It is assumed that the font data is held in advance by the drawing processing unit 3 or stored in an external storage device.
 続いて、ステップST5およびステップST6にて、スケーリング後の描画文字サイズの幅あるいは高さが等しいパスデータが存在するか否かを検索する。上記パスデータが存在しない場合、ステップST7にて、正規化したパスデータを指定された文字サイズおよびX軸・Y軸の倍率に従って拡大する。そして、パスデータを拡大後、ステップST8にてグリッドフィッティング処理を行い、ステップST10にて位置調整後のパスデータおよびグリッドフィッティングに関する管理情報を保持しておく。管理情報には、図6に示すように、文字コード、線の種類フラグデータ、描画文字サイズ、および文字サイズに対応するパスデータの格納先アドレスをセットで保持しておき、管理情報を参照してグリッドフィッティング後のパスデータを取得する。なお、図6に示した管理情報は描画処理部3内に格納するか、あるいは描画処理部3がアクセス可能ないずれかのデバイスに格納するようにしてもよい。 Subsequently, in step ST5 and step ST6, it is searched whether there exists path data having the same width or height of the scaled drawing character size. If the path data does not exist, in step ST7, the normalized path data is enlarged according to the designated character size and the X-axis / Y-axis magnification. Then, after the path data is enlarged, a grid fitting process is performed in step ST8, and the path data after the position adjustment and management information relating to the grid fitting are held in step ST10. In the management information, as shown in FIG. 6, the character code, the line type flag data, the drawing character size, and the path data storage destination address corresponding to the character size are held as a set, and the management information is referred to. Pass data after grid fitting. The management information shown in FIG. 6 may be stored in the drawing processing unit 3 or stored in any device accessible by the drawing processing unit 3.
 また、本発明で用いるグリッドフィッティング処理は、特開2010-170097公報に記載されているように、水平線や垂直線のフィッティング処理を別々に処理可能な方式を採用する。これにより、幅あるいは高さの一方のみ等しいパスデータが存在した場合、ステップST9にてキャッシュにパスデータが存在しない軸についてのみグリッドフィッティング処理を実施する。上記の例を図7に示す。図7において、文字701,702は、それぞれ文字サイズが16dot、32dotの文字であり、文字サイズに加えてX軸・Y軸の拡大率を指定して文字を描画する。文字703は、文字サイズ16dotの文字を、X軸の拡大率を2倍、Y軸の拡大率を1倍に指定して描画するのに対し、文字704は、文字サイズ32dotの文字を、X軸・Y軸共に拡大率を1倍に指定して描画するものとする。その結果、描画される文字703,704の幅は共に32ドットと等しくなる。このとき、X方向のグリッドフィッティング処理後の座標値は等しいため、Y座標に関してのみグリッドフィッティング処理を適用すれば良い。そして、グリッドフィッティング処理後のパスデータを取得した後、ステップST11にてラスタライザにパスデータを入力してレンダリングを行う。レンダリング処理の流れは、図8に記載しており、曲線データの直線分割処理(ステップST111)、パスデータとスキャンラインとの交点計算処理(ステップST112)、塗潰し処理(ステップST113)により、文字を描画する。 Also, the grid fitting process used in the present invention employs a method capable of separately processing the horizontal line and vertical line fitting processes as described in Japanese Patent Application Laid-Open No. 2010-170097. As a result, when there is path data that is equal only in one of the width and the height, the grid fitting process is performed only for the axis for which no path data exists in the cache in step ST9. The above example is shown in FIG. In FIG. 7, characters 701 and 702 are characters having character sizes of 16 dots and 32 dots, respectively, and the characters are drawn by specifying the enlargement ratio of the X axis and the Y axis in addition to the character size. A character 703 draws a character having a character size of 16 dots while designating a character having a character size of 32 dots as a character having a character size of 32 dots. It is assumed that drawing is performed with the enlargement ratio specified as 1 for both the axis and the Y axis. As a result, the widths of the drawn characters 703 and 704 are both equal to 32 dots. At this time, since the coordinate values after the grid fitting process in the X direction are equal, the grid fitting process may be applied only for the Y coordinate. Then, after obtaining the pass data after the grid fitting process, the pass data is input to the rasterizer in step ST11 to perform rendering. The flow of the rendering process is described in FIG. 8. Characters are obtained by straight line division processing (step ST 111) of curve data, intersection point calculation processing of path data and scan lines (step ST 112), and painting processing (step ST 113). Draw.
 上記の2段階のキャッシュ機構により、グリッドフィッティング処理回数を削減し、高速に描画を行う。また、本手法はパスデータをキャッシュ対象としており、パスデータを格納するために必要なメモリ容量は描画する文字サイズに依存しないため、文字描画後のビットマップ画像をキャッシュする方式と比べ、メモリ使用容量を削減可能である。 The above two-stage cache mechanism reduces the number of grid fitting processes and draws at high speed. In addition, this method uses pass data as a cache target, and the memory capacity required to store the pass data does not depend on the size of the character to be drawn. The capacity can be reduced.
 以上説明したように、実施の形態1のフォント描画装置によれば、ストロークフォントおよびアウトラインフォントのうち、少なくともいずれか一方のフォントの文字を描画するフォント描画装置において、フォントの文字コードに対して一意なパスデータを一時的に保持する第1の記憶部と、描画する文字サイズにスケーリングした後、グリッドフィッティングによる位置調整を行ったパスデータを一時的に保持する第2の記憶部と、文字を描画する際、文字のパスデータに一致するパスデータが第2の記憶部に存在するかを判定し、存在した場合は第2の記憶部のパスデータに基づいて描画を行い、第2の記憶部に存在しなかった場合は第1の記憶部のパスデータを用いてグリッドフィッティングを含む描画処理を行う描画処理部とを備えたので、使用するメモリ容量を削減しつつ、文字描画処理を高速化することができる。 As described above, according to the font drawing apparatus of the first embodiment, the font drawing apparatus that draws characters of at least one of the stroke font and the outline font is unique to the character code of the font. A first storage unit that temporarily stores correct path data, a second storage unit that temporarily stores path data that has been scaled to the character size to be drawn and then adjusted by grid fitting, and a character When drawing, it is determined whether there is path data matching the character path data in the second storage unit. If there is, the drawing is performed based on the path data in the second storage unit, and the second storage unit A rendering processing unit that performs rendering processing including grid fitting using the path data in the first storage unit Because it was example, while reducing the memory capacity to be used, it is possible to speed up the character rendering process.
 また、実施の形態1のフォント描画装置によれば、描画処理部は、パスデータのグリッドフィッティング処理をX軸方向とY軸方向とで独立して行うようにしたので、幅や高さが等しい補正後のパスデータをX軸・Y軸で各々参照することで、グリッドフィッティング処理を省略し、高速化を図ることができる。 Further, according to the font drawing apparatus of the first embodiment, the drawing processing unit performs the grid fitting process of the pass data independently in the X-axis direction and the Y-axis direction, so the width and height are equal. By referring to the corrected path data on the X-axis and Y-axis, respectively, the grid fitting process can be omitted and the speed can be increased.
実施の形態2.
 実施の形態2は、描画処理部3がハードウェア処理部を備え、このハードウェア処理部が第2の記憶部のパスデータを用いて描画を行うようにした例である。機能ブロック図については図1と同様であるため、図1の構成を用いて説明する。
Embodiment 2. FIG.
The second embodiment is an example in which the drawing processing unit 3 includes a hardware processing unit, and the hardware processing unit performs drawing using the path data in the second storage unit. Since the functional block diagram is the same as that of FIG. 1, description will be made using the configuration of FIG.
 図9は、実施の形態2のフォント描画装置のハードウェア構成図である。図示のフォント描画装置は、ベクタグラフィックス処理が可能なH/Wグラフィックスエンジンを用いており、図2に示した実施の形態1の構成と比較すると、グラフィックスエンジン201がビデオメモリ202を参照し、文字を描画する点が異なっている。また、グリッドフィッティングによる位置調整を行ったパスデータを保持する第2記憶装置102bをビデオメモリ202に配置し、グラフィックスエンジン201の入力データとする。これにより、キャッシュヒット時にグリッドフィッティング処理を実施せず、即時H/Wによる文字のレンダリング処理が可能となる。その他の構成は図2に示した実施の形態1と同様であるため、対応する部分に同一符号を付してこれらの説明は省略する。 FIG. 9 is a hardware configuration diagram of the font rendering apparatus according to the second embodiment. The illustrated font drawing apparatus uses an H / W graphics engine capable of vector graphics processing, and the graphics engine 201 refers to the video memory 202 as compared with the configuration of the first embodiment shown in FIG. The difference is that the characters are drawn. In addition, a second storage device 102 b that holds path data that has been subjected to position adjustment by grid fitting is arranged in the video memory 202 and used as input data for the graphics engine 201. As a result, the grid fitting process is not performed at the time of a cache hit, and the character rendering process can be immediately performed by H / W. Since other configurations are the same as those of the first embodiment shown in FIG. 2, the same reference numerals are given to corresponding portions, and description thereof will be omitted.
 以上説明したように、実施の形態2のフォント描画装置によれば、描画処理部はハードウェア処理部を備え、ハードウェア処理部が第2の記憶部のパスデータを用いて描画を行うようにしたので、より高速化を図ることができる。 As described above, according to the font rendering apparatus of the second embodiment, the rendering processing unit includes the hardware processing unit, and the hardware processing unit performs rendering using the path data in the second storage unit. Therefore, higher speed can be achieved.
 なお、本願発明はその発明の範囲内において、各実施の形態の自由な組み合わせ、あるいは各実施の形態の任意の構成要素の変形、もしくは各実施の形態において任意の構成要素の省略が可能である。 In the present invention, within the scope of the invention, any combination of the embodiments, or any modification of any component in each embodiment, or omission of any component in each embodiment is possible. .
 以上のように、この発明に係るフォント描画装置は、ストロークフォントおよびアウトラインフォントの文字を描画するフォント描画装置に関するものであり、ディスプレイやプリンタに対して文字描画結果を出力するのに適している。 As described above, the font drawing apparatus according to the present invention relates to a font drawing apparatus that draws characters of stroke fonts and outline fonts, and is suitable for outputting a character drawing result to a display or a printer.
 1 第1の記憶部、2 第2の記憶部、3 描画処理部、101 演算プロセッサ、102 主メモリ、102a 第1記憶装置、102b 第2記憶装置、103 補助記憶装置、103a アプリケーションプログラム、104 出力デバイス、201 グラフィックスエンジン、202 ビデオメモリ。 1. 1st storage unit, 2nd storage unit, 3 drawing processing unit, 101 arithmetic processor, 102 main memory, 102a 1st storage device, 102b 2nd storage device, 103 auxiliary storage device, 103a application program, 104 output Device, 201 graphics engine, 202 video memory.

Claims (3)

  1.  ストロークフォントおよびアウトラインフォントのうち、少なくともいずれか一方のフォントの文字を描画するフォント描画装置において、
     前記フォントの文字コードに対して一意なパスデータを一時的に保持する第1の記憶部と、
     描画する文字サイズにスケーリングした後、グリッドフィッティングによる位置調整を行ったパスデータを一時的に保持する第2の記憶部と、
     文字を描画する際、当該文字のパスデータに一致するパスデータが前記第2の記憶部に存在するかを判定し、存在した場合は当該第2の記憶部のパスデータに基づいて描画を行い、前記第2の記憶部に存在しなかった場合は前記第1の記憶部のパスデータを用いて前記グリッドフィッティングを含む描画処理を行う描画処理部とを備えたフォント描画装置。
    In a font drawing device that draws characters of at least one of a stroke font and an outline font,
    A first storage unit that temporarily stores unique path data for the character code of the font;
    A second storage unit that temporarily holds path data that has been subjected to position adjustment by grid fitting after scaling to the character size to be drawn;
    When drawing a character, it is determined whether there is path data that matches the path data of the character in the second storage unit. If there is, the drawing is performed based on the path data in the second storage unit. A font rendering apparatus comprising: a rendering processing unit that performs rendering processing including the grid fitting using path data of the first storage unit when it does not exist in the second storage unit.
  2.  前記描画処理部は、パスデータのグリッドフィッティング処理をX軸方向とY軸方向とで独立して行うことを特徴とする請求項1記載のフォント描画装置。 The font drawing apparatus according to claim 1, wherein the drawing processing unit performs grid fitting processing of path data independently in the X-axis direction and the Y-axis direction.
  3.  前記描画処理部はハードウェア処理部を備え、当該ハードウェア処理部が前記第2の記憶部のパスデータを用いて描画を行うことを特徴とする請求項1記載のフォント描画装置。 2. The font drawing apparatus according to claim 1, wherein the drawing processing unit includes a hardware processing unit, and the hardware processing unit performs drawing using the path data of the second storage unit.
PCT/JP2013/061771 2013-04-22 2013-04-22 Font drawing device WO2014174569A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2013/061771 WO2014174569A1 (en) 2013-04-22 2013-04-22 Font drawing device
TW102122323A TW201441838A (en) 2013-04-22 2013-06-24 Font drawing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/061771 WO2014174569A1 (en) 2013-04-22 2013-04-22 Font drawing device

Publications (1)

Publication Number Publication Date
WO2014174569A1 true WO2014174569A1 (en) 2014-10-30

Family

ID=51791180

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/061771 WO2014174569A1 (en) 2013-04-22 2013-04-22 Font drawing device

Country Status (2)

Country Link
TW (1) TW201441838A (en)
WO (1) WO2014174569A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI575389B (en) * 2015-06-10 2017-03-21 文鼎科技開發股份有限公司 A font deformation method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007529788A (en) * 2004-03-16 2007-10-25 ミツビシ・エレクトリック・リサーチ・ラボラトリーズ・インコーポレイテッド How to render an area of a composite glyph
JP2009258289A (en) * 2008-04-15 2009-11-05 Mitsubishi Electric Corp Character display apparatus
JP2010170097A (en) * 2009-01-26 2010-08-05 Mitsubishi Electric Research Laboratories Inc Method for aligning character to sampling grid of image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007529788A (en) * 2004-03-16 2007-10-25 ミツビシ・エレクトリック・リサーチ・ラボラトリーズ・インコーポレイテッド How to render an area of a composite glyph
JP2009258289A (en) * 2008-04-15 2009-11-05 Mitsubishi Electric Corp Character display apparatus
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
TW201441838A (en) 2014-11-01

Similar Documents

Publication Publication Date Title
JP6863693B2 (en) Graphics processing system and method
JP2006221650A (en) Method of removing index of geometric primitive, rasterization device, computer readable medium
US20160364892A1 (en) Font deformation method by changing dimensions of at least one partition of a frame surrounding a character
KR100948510B1 (en) Vector graphic accelerator of hard-wareHW type, application process and terminal comprising the same accelerator, and graphic accelerating method in the same process
JP2009301284A (en) Drawing device and method
WO2014174569A1 (en) Font drawing device
JP5777726B2 (en) Drawing apparatus and drawing program
US8982134B2 (en) Area-based dependency chain analysis of shaders and command stream
US8605112B2 (en) Graphics drawing apparatus, method, and program and recording medium on which the program is recorded
JP2008071241A (en) Image processing device, image processing method, and computer program
US6504543B1 (en) Polygon drawing method and polygon drawing apparatus
JP2010111088A (en) Image forming apparatus
JP2003162728A (en) Image processor and image outputting device
US10241993B1 (en) System and method for detecting reusable groups of drawing commands in a sequence of drawing commands
JP2010176608A (en) Drawing processing apparatus
JP3146771B2 (en) Font rasterizing apparatus and method
JP4461965B2 (en) CHARACTER IMAGE GENERATION DEVICE, CHARACTER IMAGE GENERATION PROGRAM, AND CHARACTER IMAGE GENERATION METHOD
JP2012098951A (en) Graphic drawing processing apparatus, graphic drawing processing method and computer program
JP2011107378A (en) Apparatus and method for processing information
JP4863306B2 (en) Vector image drawing apparatus, vector image drawing method and program
US20220262053A1 (en) Image processing apparatus, image processing method, and program
WO2015121962A1 (en) Character rendering device, character rendering method, and character rendering program
JP2011180904A (en) Drawing apparatus, drawing method, and program
AU2015268723B1 (en) Method, system and apparatus for modifying a font character
JP5346883B2 (en) Image output apparatus and image output program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13883315

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13883315

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP