JPH09281948A - Character cache control device - Google Patents

Character cache control device

Info

Publication number
JPH09281948A
JPH09281948A JP8181523A JP18152396A JPH09281948A JP H09281948 A JPH09281948 A JP H09281948A JP 8181523 A JP8181523 A JP 8181523A JP 18152396 A JP18152396 A JP 18152396A JP H09281948 A JPH09281948 A JP H09281948A
Authority
JP
Japan
Prior art keywords
data
character
edge
pixels
code table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8181523A
Other languages
Japanese (ja)
Inventor
Yasushi Kobayashi
靖 小林
Osamu Sagata
修 佐潟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Data Corp
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 Oki Data Corp filed Critical Oki Data Corp
Priority to JP8181523A priority Critical patent/JPH09281948A/en
Publication of JPH09281948A publication Critical patent/JPH09281948A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

PROBLEM TO BE SOLVED: To shorten the time required for generating bit map data of characters from data of characters in a character cache control device outputting bit map data of characters to a computer, printer, or the like. SOLUTION: An edge data generation section 4 detects an edge indicating a boundary line between a white pixel and a black pixel, data related to the detected edge is cached in an edge storage section 6, when the character is outputted, a bit map generation section 5 generates bit map data based on the edge data. Further, edge data is coded, and it is cached in a coding storage section 15 as coded data.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、文字を出力するプ
リンタ等の装置において、文字のアウトラインデータに
基づき文字のビットマップデータを生成する技術に関す
るものであり、特に、キャッシュメモリを用いて高速に
ビットマップデータを生成する技術に関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a technique for generating character bitmap data on the basis of character outline data in a device such as a printer for outputting characters, and more particularly to high speed using a cache memory. The present invention relates to a technique for generating bitmap data.

【0002】[0002]

【従来の技術】従来から、コンピュータで作成した文書
をプリンタ等で出力する場合、メモリ等に予め記憶され
ている文字のアウトラインデータに基づいて文字のビッ
トマップデータを生成し、そのビットマップデータを出
力している。しかし、一般に、アウトラインデータから
ビットマップデータを生成するには、多くの時間を要す
る。そこで、ビットマップデータを何度も生成すること
を回避し、かつ、ビットマップデータが記憶されている
メモリへのアクセスを迅速にするべく、使用頻度の高い
文字に関しては、一度生成したビットマップデータをキ
ャッシュメモリに待避させておき、再度その文字を出力
するときにはキャッシュメモリからそのビットマップデ
ータを読み出すというキャッシュ方式を用いる文字キャ
ッシュ制御装置が、広く使用されている。
2. Description of the Related Art Conventionally, when a document created by a computer is output by a printer or the like, character bit map data is generated based on character outline data stored in advance in a memory or the like, and the bit map data is stored. It is outputting. However, generally, it takes a lot of time to generate bitmap data from outline data. Therefore, in order to avoid generating bitmap data many times and to speed up access to the memory where the bitmap data is stored, once the frequently used characters are A character cache control device that uses a cache system in which a character is saved in a cache memory and the bit map data is read from the cache memory when the character is output again is widely used.

【0003】さらに、昨今の文字キャッシュ制御装置で
は、限られたキャッシュメモリの領域を効率良く利用す
るべく、ビットマップデータをそのままの形でキャッシ
ュメモリに待避せずに、一度ビットマップデータを圧縮
し、その圧縮したビットマップデータをキャッシュメモ
リに待避させている。そして、その文字を出力する際に
は、キャッシュメモリから圧縮されているビットマップ
データを読み出し、その圧縮されているビットマップデ
ータを伸張することにより正規のビットマップデータに
戻して出力している。このような圧縮・伸張の処理によ
り、有限なキャッシュメモリの領域に少しでも多くの文
字をキャッシュできるようにしている。
Further, in recent character cache control devices, in order to efficiently use the limited area of the cache memory, the bitmap data is compressed once without being saved in the cache memory as it is. , The compressed bitmap data is saved in the cache memory. Then, when outputting the character, the compressed bitmap data is read from the cache memory, and the compressed bitmap data is decompressed to be returned to the regular bitmap data and output. By such compression / expansion processing, as many characters as possible can be cached in a finite cache memory area.

【0004】[0004]

【発明が解決しようとする課題】ところで、上記のよう
な圧縮・伸張の機能を有する従来の文字キャッシュ制御
装置では、ビットマップデータを圧縮したり伸張したり
する処理を短時間で実行できない。従って、たとえ数多
くの文字についてビットマップデータをキャッシュメモ
リに待避することができても、各々のビットマップデー
タを圧縮・伸張するのに多大な時間を費やしてしまうた
めに、全体としては、あまり処理時間を短縮できないと
いう問題があった。
By the way, the conventional character cache control device having the above-mentioned compression / expansion function cannot execute the process of compressing or expanding the bitmap data in a short time. Therefore, even if the bitmap data for many characters can be saved in the cache memory, it takes a lot of time to compress and decompress each bitmap data. There was a problem that the time could not be shortened.

【0005】[0005]

【課題を解決するための手段】本発明は、以上の問題点
を解決するために、次の構成を採用する。 〈構成1〉複数の文字のアウトラインを表すフォントデ
ータを記憶するフォントデータ記憶部と、フォントデー
タから、白画素と黒画素との境目を表すエッジデータを
生成するエッジデータ生成部と、エッジデータをキャッ
シュするエッジ記憶部と、エッジ記憶部にキャッシュさ
れたエッジデータから、白画素と黒画素とを示すビット
マップデータを生成するビットマップ生成部とからなる
ことを特徴する文字キャッシュ制御装置。
The present invention employs the following structure in order to solve the above problems. <Structure 1> A font data storage unit for storing font data representing outlines of a plurality of characters, an edge data generation unit for generating edge data representing a boundary between white pixels and black pixels from the font data, and edge data. A character cache control device comprising: an edge storage unit for caching; and a bitmap generation unit for generating bitmap data indicating white pixels and black pixels from the edge data cached in the edge storage unit.

【0006】〈構成2〉エッジデータ生成部が、複数の
白画素と黒画素とを同色の画素の繋がりに基づいて複数
の領域に区分し、各領域を画素の色と画素の数とによっ
て表すエッジデータを生成することを特徴とする構成1
の文字キャッシュ制御装置。
<Structure 2> The edge data generator divides a plurality of white pixels and black pixels into a plurality of regions based on the connection of pixels of the same color, and each region is represented by the color of the pixel and the number of pixels. Configuration 1 characterized by generating edge data
Character cache controller.

【0007】〈構成3〉エッジデータ生成部が、行毎に
白画素と黒画素との境目の位置を示すエッジデータを生
成することを特徴とする構成1の文字キャッシュ制御装
置。
<Structure 3> The character cache control device according to Structure 1, wherein the edge data generation unit generates edge data indicating a position of a boundary between a white pixel and a black pixel for each row.

【0008】〈構成4〉連続する白画素の個数及び連続
する黒画素の個数と、その個数と出現頻度とに応じて割
り当てられた、その個数を表す符号値との対応関係を示
す符号テーブルを記憶する符号テーブル記憶部と、エッ
ジデータにおける白画素と黒画素の境目の位置から、白
画素の個数及び黒画素の個数を算出し、符号テーブルに
基づき、その算出された白画素の個数及び黒画素の個数
を符号値へ符号化することにより符号化データを生成す
る符号化処理部と、その生成された符号化データを記憶
する符号化記憶部とからなることを特徴とする構成1の
文字キャッシュ制御装置。
<Structure 4> A code table showing a correspondence relationship between the number of continuous white pixels and the number of continuous black pixels and a code value representing the number assigned according to the number and the appearance frequency. The number of white pixels and the number of black pixels are calculated from the stored code table storage unit and the position of the boundary between the white pixel and the black pixel in the edge data, and the calculated number of white pixels and the number of black pixels are calculated based on the code table. Character of configuration 1, comprising an encoding processing unit that generates encoded data by encoding the number of pixels into a code value, and an encoding storage unit that stores the generated encoded data. Cache controller.

【0009】〈構成5〉文字を構成する行の長さに対す
る、連続する白画素の連なりの長さ及び連続する黒画素
の連なりの長さの割合と、それらの割合を表す符号値と
の関係とを示す基準テーブルを記憶する基準テーブル記
憶部と、その基準テーブルを元にして、符号テーブルを
生成する符号テーブル生成部とを有することを特徴とす
る構成4の文字キャッシュ制御装置。
<Structure 5> The relationship between the length of the continuous white pixels and the continuous length of the continuous black pixels with respect to the length of the line forming the character, and the code value representing the ratio. And a code table generation unit for generating a code table based on the reference table.

【0010】〈構成6〉入力された文字に対応する符号
テーブルがあるか否かを、符号テーブル記憶部内を検索
することにより確認する符号テーブル判定部を有するこ
とを特徴とする構成5の文字キャッシュ制御装置。
<Structure 6> A character cache according to structure 5 having a code table determination unit for checking whether or not there is a code table corresponding to an input character by searching a code table storage unit. Control device.

【0011】〈構成7〉符号テーブル判定部が、入力さ
れた文字のフォント・サイズのみに基づき、その入力さ
れた文字に対応する符号テーブルがあるか否かを確認す
ることを特徴とする構成6の文字キャッシュ制御装置。
<Structure 7> The structure 6 is characterized in that the code table determination unit confirms whether or not there is a code table corresponding to the input character based only on the font size of the input character. Character cache controller.

【0012】[0012]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

〈具体例1の構成〉以下、本発明の文字キャッシュ制御
装置について、実施の形態に沿って説明する。図1は、
具体例1の文字キャッシュ制御装置のブロック図であ
る。この文字キャッシュ制御装置Cは、キャッシュ判定
部1、ビットマップ・エッジ判定部2、フォントデータ
記憶部3、エッジデータ生成部4、ビットマップ生成部
5、ビットマップ記憶部6、エッジ記憶部7、イメージ
記憶部8から構成されている。
<Structure of Concrete Example 1> Hereinafter, a character cache control device of the present invention will be described with reference to an embodiment. FIG.
3 is a block diagram of a character cache control device of Specific Example 1. FIG. The character cache control device C includes a cache determination unit 1, a bitmap / edge determination unit 2, a font data storage unit 3, an edge data generation unit 4, a bitmap generation unit 5, a bitmap storage unit 6, an edge storage unit 7, It is composed of the image storage unit 8.

【0013】キャッシュ判定部1は、図示しないコンピ
ュータやプリンタ等から入力された文字が、キャッシュ
されるべき文字であるか否かについて、ビットマップ記
憶部6のキャッシュ要否フラグ、並びに、エッジ記憶部
7のキャッシュ要否フラグを参照することによって判定
する。ビットマップ・エッジ判定部2は、キャッシュさ
れるべき文字について、ビットマップデータがキャッシ
ュされるべきであるか、あるいは、エッジデータがキャ
ッシュされるべきであるかを、ビットマップ記憶部6の
キャッシュ要否フラグ、または、エッジ記憶部7のキャ
ッシュ要否フラグを参照することによって判定する。
The cache determination unit 1 determines whether a character input from a computer, a printer or the like (not shown) is a character to be cached, and a cache necessity flag of the bitmap storage unit 6 and an edge storage unit. The determination is made by referring to the cache necessity flag of No. 7. The bitmap / edge determination unit 2 determines whether the bitmap data of the character to be cached should be cached or the edge data should be cached. The determination is made by referring to the no flag or the cache necessity flag of the edge storage unit 7.

【0014】フォントデータ記憶部3は、各文字のアウ
トラインを示すベクトルデータを予め記憶している。エ
ッジデータ生成部4は、フォントデータを2次元の座標
上にアナログ量として展開し、次に、文字の輪郭をディ
ジタル量として表現するべく輪郭を抽出・量子化し、そ
して、その抽出・量子化された輪郭に基づいて、白画素
と黒画素とを峻別し、さらに、それらの白画素と黒画素
とを画素の繋がりに基づいて複数の領域に区分し、最後
に各領域をその領域に存在する画素の数のみによって、
あるいは、その領域に存在する画素の数とそれらの色と
によって表すことにより、エッジデータを生成する。ビ
ットマップ生成部5は、エッジデータに基づいて、2次
元の座標上に白画素と黒画素とを再生することにより、
ビットマップデータを生成する。
The font data storage unit 3 stores in advance vector data indicating the outline of each character. The edge data generation unit 4 develops the font data as an analog quantity on a two-dimensional coordinate, then extracts and quantizes the contour so as to express the contour of the character as a digital quantity, and then extracts and quantizes the contour. The white pixels and the black pixels are distinguished from each other based on the contour, and the white pixels and the black pixels are further divided into a plurality of regions based on the connection of the pixels, and finally each region exists in the region. Only by the number of pixels,
Alternatively, the edge data is generated by representing the number of pixels existing in the area and their colors. The bitmap generation unit 5 reproduces white pixels and black pixels on two-dimensional coordinates based on the edge data,
Generate bitmap data.

【0015】ビットマップ記憶部6は、ビットマップデ
ータ6aとビットマップ登録情報6bとを記憶してい
る。ビットマップデータ6aは、ビットマップ生成部5
により生成されたビットマップデータ自身である。一
方、ビットマップ登録情報6bは、キャッシュ要否フラ
グとキャッシュ済未フラグとから構成されており、キャ
ッシュ要否フラグは、その文字がキャッシュされるべき
文字であるか否かを示すフラグであり、キャッシュ済未
フラグは、その文字がキャッシュされているか否かを示
すフラグである。エッジ記憶部7は、ビットマップ記憶
部6と同様に、エッジデータ7aとエッジ登録情報7b
とを記憶している。エッジデータ7aは、エッジデータ
生成部4により生成されたエッジデータ自身である。一
方、エッジ登録情報7bは、キャッシュ要否フラグとキ
ャッシュ済未フラグとから構成されており、それらの機
能は、ビットマップ登録情報6bの場合と全く同様であ
る。イメージ記憶部8は、一時的に各文字のビットマッ
プデータを記憶し、そのビットマップデータを出力デー
タとして出力する。
The bitmap storage unit 6 stores bitmap data 6a and bitmap registration information 6b. The bitmap data 6a is stored in the bitmap generation unit 5
It is the bitmap data itself generated by. On the other hand, the bitmap registration information 6b is composed of a cache necessity flag and a cached non-flag, and the cache necessity flag is a flag indicating whether the character is a character to be cached, The cached unflagged flag is a flag indicating whether or not the character is cached. The edge storage unit 7, like the bitmap storage unit 6, has edge data 7a and edge registration information 7b.
And remember. The edge data 7a is the edge data itself generated by the edge data generation unit 4. On the other hand, the edge registration information 7b includes a cache necessity flag and a cached non-flag, and their functions are exactly the same as those of the bitmap registration information 6b. The image storage unit 8 temporarily stores the bitmap data of each character and outputs the bitmap data as output data.

【0016】〈動作〉次に、本発明の文字キャッシュ制
御装置の動作について説明する。図2、3、4は、本発
明の文字キャッシュ制御装置の動作フローチャートであ
る。また、図5は、エッジデータとしてキャッシュされ
るべき文字『A』が処理される過程を示す図であり、図
6は、文字『A』のエッジ画素列とエッジデータとを示
す図である。以下、本発明の文字キャッシュ制御装置の
動作について、文字『A』に対する処理を交えながら、
それらの動作フローチャートに沿って説明する。なお、
文字『A』のエッジデータは、未だキャッシュされてい
ないものとする。
<Operation> Next, the operation of the character cache control device of the present invention will be described. 2, 3 and 4 are operation flowcharts of the character cache control device of the present invention. Further, FIG. 5 is a diagram showing a process of processing the character “A” to be cached as edge data, and FIG. 6 is a diagram showing an edge pixel string and edge data of the character “A”. Hereinafter, regarding the operation of the character cache control device of the present invention, with the processing for the character "A",
A description will be given along these operation flowcharts. In addition,
It is assumed that the edge data of the character "A" has not been cached yet.

【0017】〈データの入力〉 ステップS100: 文字キャッシュ制御装置Cは、図
示しないコンピュータやプリンタから、文字等により構
成される文書を入力データとして受け取る。 ステップS110: キャッシュ判定部1は、その受け
取った文書中に存在する各文字について、その文字がキ
ャッシュされるべき文字であるか否かを、ビットマップ
登録情報6b並びにエッジ登録情報7bを参照して判定
する。ここで、文字『A』については、ビットマップ登
録情報6bのキャッシュ要否フラグは「否」となってい
るが、エッジ登録情報7bのキャッシュ要否フラグが
「要」となっているので、文字『A』は、キャッシュさ
れる処理の方へ進むことになる。
<Data Input> Step S100: The character cache control device C receives a document composed of characters and the like as input data from a computer or printer (not shown). Step S110: The cache determination unit 1 refers to the bitmap registration information 6b and the edge registration information 7b for each character existing in the received document to determine whether or not the character is a character to be cached. judge. Here, for the character "A", the cache necessity flag of the bitmap registration information 6b is "no", but the cache necessity flag of the edge registration information 7b is "necessary". "A" will proceed to the cached process.

【0018】〈キャッシュされるべき文字の処理〉 ステップS200: ビットマップ・エッジ判定部2
は、そのキャッシュされるべき文字が、ビットマップデ
ータとしてキャッシュされるべき文字であるか、あるい
は、エッジデータとしてキャッシュされるべき文字かに
ついて、ビットマップ登録情報6bのキャッシュ要否フ
ラグ、並びに、エッジ登録情報7bのキャッシュ要否フ
ラグを参照して判定する。ここで、文字『A』について
は、エッジ登録情報7bのキャッシュ要否フラグが
「要」となっているので、文字『A』は、エッジデータ
をキャッシュされる処理(ステップS260)へ進むこ
とになる。
<Processing of Characters to be Cached> Step S200: Bitmap / Edge Determination Unit 2
Indicates whether the character to be cached is a character to be cached as bitmap data or a character to be cached as edge data, and a cache necessity flag of the bitmap registration information 6b and an edge. The determination is made by referring to the cache necessity flag of the registration information 7b. Here, since the cache necessity flag of the edge registration information 7b is "necessary" for the character "A", the character "A" proceeds to the process of caching the edge data (step S260). Become.

【0019】〈ビットマップデータがキャッシュされる
文字の処理〉 ステップS210: その文字がビットマップデータと
してキャッシュされる文字である場合には、ビットマッ
プ・エッジ判定部2は、その文字が、既にビットマップ
データとしてキャッシュされているか、あるいは、未だ
ビットマップデータとしてキャッシュされていないかに
ついて、ビットマップ登録情報6bのキャッシュ済未フ
ラグを参照して判定する。 ステップS220: その文字が、既にビットマップデ
ータとしてキャッシュされている場合には、ビットマッ
プ記憶部6からビットマップデータ6aを読み出す。 ステップS230: その文字が、未だビットマップデ
ータとしてキャッシュされていない場合には、エッジデ
ータ生成部4は、後述(ステップS280)するよう
に、フォントデータ記憶部3からフォントデータを読出
し、そのフォントデータに基づいてエッジデータを生成
する。 ステップS240: さらに、ビットマップ生成部5
は、後述(ステップS290)するように、そのエッジ
データからビットマップデータを生成する。 ステップS250: ビットマップ記憶部6は、その生
成されたビットマップデータを記憶すると共に、エッジ
登録情報7bのキャッシュ済未フラグを「済」にする。
<Processing of Characters in which Bitmap Data is Cached> Step S210: If the character is a character cached as bitmap data, the bitmap / edge determination unit 2 determines that the character is already a bit. Whether cached as map data or not yet cached as bitmap data is determined by referring to the cached unflagged flag of the bitmap registration information 6b. Step S220: If the character is already cached as bitmap data, the bitmap data 6a is read from the bitmap storage unit 6. Step S230: If the character is not yet cached as bitmap data, the edge data generation unit 4 reads the font data from the font data storage unit 3 and writes the font data, as will be described later (Step S280). Generate edge data based on Step S240: Furthermore, the bitmap generation unit 5
Generates bitmap data from the edge data, as will be described later (step S290). Step S250: The bitmap storage unit 6 stores the generated bitmap data and sets the cached unflagged flag of the edge registration information 7b to “done”.

【0020】〈エッジデータがキャッシュされる文字の
処理〉 ステップS260: その文字がエッジデータとしてキ
ャッシュされる文字である場合には、ビットマップ・エ
ッジ判定部2は、その文字が、既にエッジデータとして
キャッシュされているか、あるいは、未だエッジデータ
としてキャッシュされていないかについて、エッジ登録
情報7bのキャッシュ済未フラグを参照して判定する。
ここで、文字『A』のエッジ登録情報7bには、キャッ
シュ既未フラグが「未」となっているので、文字『A』
は、エッジデータを生成される処理(ステップS28
0)へ進むことになる。 ステップS270: その文字が、既にエッジデータと
してキャッシュされている場合には、エッジ記憶部7か
らエッジデータ7aを読み出す。
<Processing of Character whose Edge Data is Cached> Step S260: If the character is a character that is cached as edge data, the bitmap / edge determination unit 2 determines that the character is already edge data. Whether it is cached or not yet cached as edge data is determined by referring to the cached unflagged flag of the edge registration information 7b.
In the edge registration information 7b for the character "A", the cache flag "not yet" is set, so the character "A" is displayed.
Is a process for generating edge data (step S28).
It will proceed to 0). Step S270: If the character is already cached as edge data, the edge data 7a is read from the edge storage unit 7.

【0021】ステップS280: その文字が、未だエ
ッジデータとしてキャッシュされていない場合には、フ
ォントデータ記憶部3からフォントデータを読み出し、
エッジデータを生成する。ここで、文字『A』のエッジ
データの生成について説明する。第1に、フォントデー
タ記憶部3に記憶されている文字『A』のフォントデー
タ、即ち、ベクトル・データを2次元の座標上(17行
×18列)に展開することにより、図5(a)に示すよ
うな文字『A』のアウトラインを作成する。なお、この
際、必要に応じて、ヒント処理等の補正処理や曲線平滑
化等の近似処理等を実行する。なお、この2次元の座標
上において、格子に囲まれたそれぞれの部分は、最終的
に作成されるビットマップデータの画素に相当する。
Step S280: If the character is not cached as edge data yet, read the font data from the font data storage unit 3,
Generate edge data. Here, the generation of the edge data of the character "A" will be described. First, by expanding the font data of the character "A" stored in the font data storage unit 3, that is, the vector data, on the two-dimensional coordinates (17 rows x 18 columns), as shown in FIG. ) Create an outline of the letter "A" as shown in (). At this time, correction processing such as hint processing and approximation processing such as curve smoothing are executed as necessary. It should be noted that, on these two-dimensional coordinates, each portion surrounded by the grid corresponds to a pixel of the finally created bitmap data.

【0022】第2に、その生成されたアウトラインをデ
ィジタル処理に適するようにするべく、サンプリング処
理と量子化処理を実行する。ここでは、サンプリング処
理として、スキャンコンバージョン処理の下で、各格子
の中央に、横方向へ延びる補助格子(図中の点線)を仮
想的に設定することにより、図5(b)に示すように、
それらの補助格子とアウトラインとの交点(黒点)を抽
出している。そして、各交点のX座標の値を量子化する
ことにより、図5(c)に示すように、各交点を最も近
接する格子上に近似し、この結果、エッジ(黒点)を得
ている。
Second, a sampling process and a quantization process are executed so that the generated outline is suitable for digital processing. Here, as the sampling process, an auxiliary lattice (dotted line in the figure) extending in the horizontal direction is virtually set at the center of each lattice under the scan conversion process, as shown in FIG. 5B. ,
The intersections (black dots) of those auxiliary grids and outlines are extracted. Then, by quantizing the value of the X coordinate of each intersection, each intersection is approximated to the closest grid, as shown in FIG. 5C, and as a result, an edge (black dot) is obtained.

【0023】第3に、文字『A』自身を構成する画素に
対し、黒であることを意味する数値「1」を割り当てる
一方、余白を構成する画素に対し、白であることを意味
する数値「0」を割り当てる。各行において、奇数番目
のエッジと次の偶数番目のエッジとの間の画素は、
「黒」となる一方、偶数番目のエッジと次の奇数番目の
エッジとの間の画素は、「白」となる。従って、各エッ
ジが奇数番目であるか、あるいは、偶数番目であるかを
参照することによって、各画素に対し、「1」または
「0」を割り当てることができる。これにより、例え
ば、4行目に位置する画素に対しては、左側から順番
に、00000011011000000(白×6、黒
×2、白×1、黒×2、白×6)という数値が、割り当
てられる。
Thirdly, the numerical value "1" meaning black is assigned to the pixels forming the character "A" itself, while the numerical value meaning white is assigned to the pixels forming the margin. Assign "0". In each row, the pixel between the odd-numbered edge and the next even-numbered edge is
While it is “black”, the pixels between the even-numbered edge and the next odd-numbered edge are “white”. Therefore, "1" or "0" can be assigned to each pixel by referring to whether each edge is an odd number or an even number. As a result, for example, to the pixels located in the fourth row, numerical values of 0000001111000000 (white × 6, black × 2, white × 1, black × 2, white × 6) are sequentially assigned from the left side. .

【0024】第4に、これら「1」、「0」数値の割り
当てられた全画素(306画素:17×18画素)を一
列に配置することにより、図6(a)に示すようなエッ
ジ画素列を作成する。これにより、例えば、図5(d)
における1行目の画素000000011100000
00(白×7、黒×3、白×7)は、図6(a)の最初
に位置付けられ、また、2行目の画素00000011
111000000(白×6、黒5、白×6)は、その
右隣りに位置付けられる。同様にして、後続する行の画
素も次々に位置付けられる。
Fourth, by arranging all the pixels (306 pixels: 17 × 18 pixels) to which the numerical values of “1” and “0” are assigned in a line, edge pixels as shown in FIG. Create a column. Thereby, for example, FIG.
1st row pixel in
00 (white × 7, black × 3, white × 7) is positioned at the beginning of FIG. 6A, and the pixel 00000011 in the second row is
111,000,000 (white x 6, black 5, white x 6) is positioned to the right of it. Similarly, the pixels of the following rows are positioned one after another.

【0025】最後に、このエッジ画素列を同じ色の画素
毎に区分し、区分された各部分を色と画素数とによって
表す。この結果、図6(a)に示すように、このエッジ
画素列は、白×7、黒×3、白×13、黒×5、白×1
2、……、白×1、黒×3、白×11、黒×6、白×1
1、黒×3を表すことになる。さらに、白画素の連なり
と白画素の連なりとは交互に繰り返されるので、エッジ
画素列の最初の色のみを明確にしさえすれば、エッジ画
素列の冗長性、即ち、色に関する余分な情報を削除する
ことが可能となる。従って、このエッジ画素列は、白、
7、3、13、5、12、……、1、3、11、6、1
1、3というエッジデータで表すことができる。これに
より、例えば、最初に位置する40画素(1行目の画素
+2行目の画素+3行目の6画素)を表すのに必要であ
った40ビット(bit )は、17ビット(1+3+2+
4+3+4)で表すことができる。
Finally, this edge pixel array is divided into pixels of the same color, and each divided portion is represented by a color and the number of pixels. As a result, as shown in FIG. 6A, this edge pixel row is white × 7, black × 3, white × 13, black × 5, white × 1.
2, ..., White x 1, Black x 3, White x 11, Black x 6, White x 1
1 represents black × 3. Further, since the series of white pixels and the series of white pixels are alternately repeated, the redundancy of the edge pixel row, that is, the extra information about the color is deleted if only the first color of the edge pixel row is clarified. It becomes possible to do. Therefore, this edge pixel row is white,
7, 3, 13, 5, 12, ..., 1, 3, 11, 6, 1
It can be represented by edge data 1 and 3. As a result, for example, 40 bits (bits) required to represent the first 40 pixels (pixels in the first row + pixels in the second row + six pixels in the third row) are 17 bits (1 + 3 + 2 +).
4 + 3 + 4).

【0026】ステップS290: エッジ記憶部7は、
その生成されたエッジデータを記憶する。 ステップS300: ビットマップ生成部5は、その生
成されたエッジデータ、あるいは、読み出されたエッジ
データに基づいて、文字の部分を黒画素にし、かつ、余
白の部分を白画素する。これにより、ビットマップデー
タが生成される。ここで、文字『A』については、図5
(d)に示すようなビットマップデータが生成される。
Step S290: The edge storage unit 7
The generated edge data is stored. Step S300: Based on the generated edge data or the read edge data, the bitmap generation unit 5 makes the character portion a black pixel and the blank portion a white pixel. As a result, bitmap data is generated. Here, regarding the character “A”, FIG.
Bitmap data as shown in (d) is generated.

【0027】〈キャッシュされない文字の処理〉 ステップS400: その文字が、キャッシュされない
文字である場合には、前述(ステップS280)のよう
に、エッジデータ生成部4は、フォントデータ記憶部3
からフォントデータを読み出し、そのフォントデータに
基づいてエッジデータを生成する。 ステップS410: ビットマップ生成部5は、前述
(ステップS290)のように、その生成されたエッジ
データに基づいて、ビットマップデータを生成する。
<Processing of Non-Cached Characters> Step S400: If the character is a non-cached character, the edge data generation unit 4 causes the font data storage unit 3 to operate as described above (Step S280).
The font data is read from and the edge data is generated based on the font data. Step S410: As described above (step S290), the bitmap generation unit 5 generates bitmap data based on the generated edge data.

【0028】〈データの出力〉 ステップS120: 読み出されたビットマップデータ
や生成されたビットマップデータは、イメージ記憶部8
に記憶される。 ステップS130: 全ての文字のビットマップデータ
がイメージ記憶部8に記憶された後に、文字キャッシュ
制御装置Cは、それらのビットマップデータを図示しな
いコンピュータやプリンタ等の装置へ出力する。
<Data Output> Step S120: The read bit map data and the generated bit map data are stored in the image storage unit 8.
Is stored. Step S130: After the bitmap data of all the characters are stored in the image storage unit 8, the character cache control device C outputs the bitmap data to a device (not shown) such as a computer or a printer.

【0029】このように、この具体例の文字キャッシュ
制御装置では、エッジデータ生成部4が、文字のフォン
トデータから、白画素と黒画素との境目であるエッジを
示すデータを生成し、このエッジデータをエッジ記憶部
にキャッシュする。そして、その文字を出力する際に
は、ビットマップ生成部が、そのエッジデータをエッジ
データ記憶部から読出し、そのエッジデータに基づいて
白画素と黒画素の位置を示すビットマップデータを生成
する。従って、ビットマップデータをそのままの形でキ
ャッシュメモリにキャッシュすることはせずに、そのビ
ットマップデータよりもデータ量の少ないエッジデータ
の形でキャッシュメモリにキャッシュするので、有限な
キャッシュメモリの領域をより効率良く用いることがで
きるようになる。
As described above, in the character cache control device of this specific example, the edge data generation unit 4 generates data indicating the edge which is the boundary between the white pixel and the black pixel from the font data of the character, and this edge is generated. Cache data in edge store. Then, when outputting the character, the bitmap generation unit reads the edge data from the edge data storage unit and generates bitmap data indicating the positions of the white pixels and the black pixels based on the edge data. Therefore, the bitmap data is not cached in the cache memory as it is, but is cached in the cache memory in the form of edge data having a smaller data amount than the bitmap data. It can be used more efficiently.

【0030】〈他の方法によるエッジデータの生成〉な
お、上述の具体例とは異なり、エッジデータ生成部4
が、各行毎にエッジの「位置」のみをエッジデータとし
てエッジ記憶部7に記憶させることもできる。この方法
を用いると、文字『A』については、1行目は、7、1
0と表すことができ、2行目は、6、11と表すことが
でき、18行目は、0、3、14、17と表すことがで
き、他の行についても、同様に表すことができる。これ
により、本来ならば表すのに17ビットを要する各行
を、例えば、1行目については、7ビット(3+4)で
表すことができ、2行目について、7ビット(3+4)
ビットで表すことができ、18行目については、12ビ
ット(1+2+4+5)で表すことができる。この結
果、1個あたりの文字に関し、キャッシュメモリに記憶
させるデータ量を、従来の技術で記憶させたデータ量に
比べて、約半分に低減させることが可能となる。
<Generation of Edge Data by Other Method> Unlike the above specific example, the edge data generation unit 4
However, it is also possible to store only the “position” of the edge for each row as the edge data in the edge storage unit 7. Using this method, the first line is 7, 1 for the character "A".
Can be represented as 0, the second row can be represented as 6, 11, the 18th row can be represented as 0, 3, 14, 17, and so on for the other rows. it can. As a result, each row that normally requires 17 bits to represent can be represented by 7 bits (3 + 4) for the first row and 7 bits (3 + 4) for the second row, for example.
It can be represented by bits, and the 18th row can be represented by 12 bits (1 + 2 + 4 + 5). As a result, the amount of data stored in the cache memory for each character can be reduced to about half of the amount of data stored by the conventional technique.

【0031】〈具体例2の構成〉次に、具体例2の文字
キャッシュ制御装置について説明する。図7は、具体例
2の文字キャッシュ制御装置のブロック図である。具体
例2の文字キャッシュ制御装置と具体例1の文字キャッ
シュ制御装置との機能上の相違は、具体例2の装置で
は、予め用意された基準テーブルから符号テーブルを生
成し、その生成された符号テーブルに基づいて、具体例
1の装置が生成したエッジデータを符号化することによ
り符号化データを生成することである。従って、具体例
2の文字キャッシュ制御装置は、具体例1の文字キャッ
シュ制御装置での各部1〜8を全て有しており、さら
に、符号テーブル判定部10、符号テーブル生成部1
1、基準テーブル記憶部12、符号テーブル記憶部1
3、符号化処理部14、符号化記憶部15、復号化処理
部16を有している。
<Structure of Concrete Example 2> Next, a character cache control device of Concrete Example 2 will be described. FIG. 7 is a block diagram of the character cache control device of the second specific example. The functional difference between the character cache control device of the specific example 2 and the character cache control device of the specific example 1 is that in the device of the specific example 2, a code table is generated from a reference table prepared in advance, and the generated code is used. This is to generate encoded data by encoding the edge data generated by the device of the first specific example based on the table. Therefore, the character cache control device of the second specific example has all the units 1 to 8 in the character cache control device of the first specific example, and further includes the code table determination unit 10 and the code table generation unit 1.
1, reference table storage unit 12, code table storage unit 1
3, a coding processing unit 14, a coding storage unit 15, and a decoding processing unit 16.

【0032】ここで、基準テーブルとは、文字の種類や
フォント・サイズ等に拘わらず、ある白の連なりの長さ
または黒の連なりの長さが、文字を構成する行の長さに
対し占める割合と、その割合を示す符号値との対応関係
を示すテーブルをいい、また、符号テーブルとは、その
基準テーブルを元にして、文字のフォント・サイズ等ご
とに、そのフォント・サイズ等において、前述の連なり
が何個の画素に相当するかということと、前述の符号値
との対応関係を示すテーブルをいう。
Here, the reference table means that the length of a certain white line or the length of a black line occupies the length of a line forming a character regardless of the type of character, font size, etc. A table showing a correspondence relationship between a ratio and a code value indicating the ratio.The code table is based on the reference table, for each font size of characters, in the font size, etc., It is a table showing how many pixels the above-mentioned sequence corresponds to and the corresponding relationship with the above-mentioned code value.

【0033】以下、具体例2の文字キャッシュ制御装置
に固有な構成及びそれら固有な構成による動作を中心
に、具体例2の文字キャッシュ制御装置について説明す
る。なお、本質的な機能に相違は無いが、説明の便宜
上、具体例1におけるビットマップ・エッジ判定部2の
名称をビットマップ・エッジ・符号化判定部2に変更し
て説明する。
The character cache control device of the second specific example will be described below, focusing on the configuration unique to the character cache control device of the second specific example and the operation of the configuration. Although there is no difference in the essential function, for convenience of explanation, the name of the bitmap / edge determination unit 2 in the specific example 1 is changed to the bitmap / edge / coding determination unit 2 for description.

【0034】〈具体例1と共通する構成・動作〉具体例
1の構成と共通する、キャッシュ判定部1からイメージ
記憶部8までの動作は、概ね具体例1の動作と同じであ
る。唯一の相違点は、ビットマップ・エッジ・符号化判
定部2が、キャッシュされるべき文字について、ビット
マップデータがキャッシュされるべきであるか、エッジ
データがキャッシュされるべきであるか、あるいは、符
号化データがキャッシュされるべきであるかを、ビット
マップ記憶部6中のキャッシュ要否フラグ、エッジ記憶
部7中のキャッシュ要否フラグ、また、符号化記憶部1
5中のキャッシュ要否フラグを参照することにより判定
することである。
<Structure / Operation Common to Specific Example 1> The operations from the cache determination unit 1 to the image storage unit 8 that are common to the structure of Specific example 1 are substantially the same as those of Specific example 1. The only difference is that the bitmap / edge / encoding determination unit 2 should cache bitmap data, cache edge data, or cache data for a character to be cached, or Whether or not the encoded data should be cached is determined by a cache necessity flag in the bitmap storage unit 6, a cache necessity flag in the edge storage unit 7, and the encoding storage unit 1.
The determination is made by referring to the cache necessity flag in 5.

【0035】〈具体例1と相違する構成・動作〉具体例
1の構成と相違する、符号テーブル判定部10から復号
化処理部16の動作は、以下の通りである。符号テーブ
ル判定部10は、入力された文字のフォント・サイズ等
に基づき、そのフォント・サイズ等に対応する符号テー
ブルが存在するか否かを判定する。符号テーブル生成部
11は、基準テーブル記憶部12に予め用意された基準
テーブルから符号テーブルを生成する。符号テーブル記
憶部13は、符号テーブル生成部11によって生成され
た符号テーブルを記憶する。符号化処理部14は、エッ
ジデータ生成部4によって生成されたエッジデータを、
符号テーブル記憶部13に記憶されている符号テーブル
に基づき符号化することにより、符号化データを生成す
る。符号化記憶部15は、その生成された符号化データ
を記憶する。復号化処理部16は、符号化記憶部15か
ら符号化データを読出し、その符号化データに対応する
符号テーブルを参照することにより、その符号化データ
をエッジデータへ再生するという復号化処理を実行す
る。
<Structure / Operation Different from Specific Example 1> The operations of the code table determination unit 10 to the decoding processing unit 16 different from the structure of the specific example 1 are as follows. The code table determination unit 10 determines whether or not there is a code table corresponding to the font size or the like based on the font size or the like of the input character. The code table generation unit 11 generates a code table from the reference table prepared in advance in the reference table storage unit 12. The code table storage unit 13 stores the code table generated by the code table generation unit 11. The encoding processing unit 14 converts the edge data generated by the edge data generation unit 4 into
Encoding is performed based on the code table stored in the code table storage unit 13 to generate encoded data. The encoding storage unit 15 stores the generated encoded data. The decoding processing unit 16 reads out the encoded data from the encoding storage unit 15 and refers to the code table corresponding to the encoded data to execute the decoding process of reproducing the encoded data into edge data. To do.

【0036】〈具体例2の動作〉図8は、具体例2の装
置全体の動作フローチャートであり、図9は、具体例2
の装置に特有な動作である符号化処理を示す動作フロー
チャートである。以下、これらの動作フローチャートに
沿って説明する。なお、具体例1の場合と同様に、文字
『A』を符号化データという形でキャッシュされるべき
文字であると想定して、その処理を交えながら説明す
る。但し、文字『A』は、未だキャッシュされておら
ず、また、文字『A』のフォント・サイズと同じフォン
ト・サイズである文字も未だキャッシュされていないも
のと仮定する。
<Operation of Concrete Example 2> FIG. 8 is an operation flowchart of the entire apparatus of Concrete Example 2, and FIG. 9 is a concrete example 2
3 is an operation flowchart showing an encoding process which is an operation peculiar to the device of FIG. The operation will be described below with reference to these operation flowcharts. As in the case of the first specific example, assuming that the character “A” is a character to be cached in the form of encoded data, the process will be described together. However, it is assumed that the character "A" has not been cached yet, and that the character having the same font size as that of the character "A" has not been cached yet.

【0037】ステップS100: 文字キャッシュ制御
装置Cは、入力データとして、図示しないコンピュータ
やプリンタから、文字等により構成される文書を受信す
る。 ステップS110: キャッシュ判定部1は、その受信
した文書中に存在する各文字について、その文字がキャ
ッシュされるべき文字であるか否かを、ビットマップ登
録情報6b、エッジ登録情報7b、符号化登録情報15
bを参照して判定する。ここで、文字『A』について
は、ビットマップ登録情報6bのキャッシュ要否フラグ
と、エッジ登録情報7bのキャッシュ要否フラグとは
「否」であり、一方、符号化登録情報15bのキャッシ
ュ要否フラグは「要」となっているため、文字『A』
は、キャッシュされる処理の方向へ進むことになる。
Step S100: The character cache controller C receives, as input data, a document composed of characters or the like from a computer or printer (not shown). Step S110: The cache determination unit 1 determines whether or not each character existing in the received document is a character to be cached, the bitmap registration information 6b, the edge registration information 7b, and the encoding registration. Information 15
It judges by referring to b. Here, for the character "A", the cache necessity flag of the bitmap registration information 6b and the cache necessity flag of the edge registration information 7b are "no", while the cache necessity of the encoding registration information 15b is "NO". Since the flag is "necessary", the character "A"
Will proceed in the direction of cached processing.

【0038】ステップS120: ビット・エッジ・符
号化判定部2は、そのキャッシュされるべき文字が、ビ
ットマップデータとしてキャッシュされるべき文字であ
るか、エッジデータとしてキャッシュされるべき文字で
あるか、あるいは、符号化データとしてキャッシュされ
るべき文字であるかについて、ビットマップ登録情報6
bのキャッシュ要否フラグ、エッジ登録情報7bのキャ
ッシュ要否フラグ、符号化登録情報15bのキャッシュ
要否フラグを参照して判定する。ここで、文字『A』に
ついては、符号化登録情報15bのキャッシュ要否フラ
グにみが「要」になっているので、文字『A』は、符号
化データとしてキャッシュされる処理の方向へ進むこと
になる。なお、ビットマップデータとしてキャッシュさ
れる場合には、具体例1で説明したように、ステップS
210以下の処理が実行され、また、エッジデータとし
てキャッシュされる場合には、同様に、ステップS26
0以下の処理が実行される。
Step S120: Whether the character to be cached is a character to be cached as bitmap data or a character to be cached as edge data is determined by the bit / edge / encoding determination unit 2. Alternatively, whether the character is a character to be cached as encoded data, the bitmap registration information 6
The cache necessity flag of b, the cache necessity flag of the edge registration information 7b, and the cache necessity flag of the encoded registration information 15b are referred to for the determination. Here, as for the character "A", since only the cache necessity flag of the encoding registration information 15b is "necessary", the character "A" advances toward the process of being cached as encoded data. It will be. When the data is cached as bitmap data, as described in the concrete example 1, step S
If the processing of 210 or less is executed and the data is cached as edge data, similarly, step S26 is performed.
The processing of 0 or less is executed.

【0039】〈符号化データとしてキャッシュされる文
字の処理〉 ステップS310: その文字が符号化データとしてキ
ャッシュされる文字である場合には、ビットマップ・エ
ッジ・符号化判定部2は、その文字が、既に符号化デー
タとしてキャッシュされているか、あるいは、未だ符号
化データとしてキャッシュされていないかについて、符
号化登録情報15bのキャッシュ済未フラグを参照して
判定する。ここで、文字『A』の符号化登録情報15b
には、キャッシュ済未フラグが、未だキャッシュされて
いないことを示す「未」となっているので、文字『A』
は、符号化データを生成される処理へ進むことになる。
<Processing of Character Cached as Encoded Data> Step S310: If the character is a character cached as encoded data, the bitmap / edge / encoding determination unit 2 determines that the character is It is determined by referring to the cached unflagged flag of the coding registration information 15b whether it has already been cached as coded data or has not been cached as coded data. Here, the coded registration information 15b of the character "A"
Indicates that the cached unflagged flag is "not yet" indicating that it has not been cached yet. Therefore, the character "A" is displayed.
Will proceed to the process of generating encoded data.

【0040】ステップS320: その文字が、既に符
号化データとしてキャッシュされている場合には、符号
化データを符号化記憶部15から読出すと共に、その文
字のフォント・サイズ用の符号テーブルを符号テーブル
記憶部12から読み出す。 ステップS330: 復号化処理部16は、その符号テ
ーブルを元にして、その読み出された符号化データを復
号化することにより、エッジデータを再生する。
Step S320: If the character is already cached as encoded data, the encoded data is read from the encoding storage unit 15 and the code table for the font size of the character is set in the code table. It is read from the storage unit 12. Step S330: The decoding processing unit 16 reproduces the edge data by decoding the read coded data based on the code table.

【0041】〈符号テーブルの準備〉 ステップS340: その文字が、未だ符号化データと
してキャッシュされていない場合には、符号化テーブル
の作成、エッジテーブルの生成、符号化データの生成等
を実行する。 ステップS340a: 符号テーブル判定部10は、そ
の文字のフォント・サイズに対応する符号テーブルが存
在するか否かについて、符号テーブル記憶部13を確認
する。 ステップS340b: その文字のフォント・サイズに
対応する符号テーブルが検索された場合には、符号テー
ブル判定部10は、その符号テーブルを読み出す旨を符
号化処理部14に指示する。そして、符号化処理部14
は、符号テーブル記憶部13からその検索された符号テ
ーブルを読み出す。
<Preparation of Code Table> Step S340: If the character is not cached as coded data yet, the coded table is created, the edge table is created, the coded data is created, etc. Step S340a: The code table determination unit 10 checks the code table storage unit 13 as to whether or not there is a code table corresponding to the font size of the character. Step S340b: When the code table corresponding to the font size of the character is searched, the code table determination unit 10 instructs the encoding processing unit 14 to read the code table. Then, the encoding processing unit 14
Reads the retrieved code table from the code table storage unit 13.

【0042】ステップS340c: その文字のフォン
ト・サイズに対応する符号テーブルが検索されない場合
には、符号テーブル判定部10は、符号テーブルを生成
する旨を符号テーブル生成部に11に指示する。その指
示の下に、符号テーブル生成部11は、基準テーブルか
ら符号テーブルを生成する。このように、符号テーブル
判定部10が、符号テーブルの有無を判定するので、符
号テーブルが無い場合には、符号テーブルを作成する処
理へ直ちに移行することができ、また、符号テーブルが
ある場合には、再び、その符号テーブルと同一な符号テ
ーブルを作成してしまうという無駄な処理を避けること
ができる。さらには、符号テーブルが一般に最も依存す
るフォント・サイズのみに基づいて判定するので、符号
テーブルの有無を迅速に判定することが可能となる。
Step S340c: If the code table corresponding to the font size of the character is not searched, the code table determination unit 10 instructs the code table generation unit 11 to generate the code table. Under the instruction, the code table generating unit 11 generates a code table from the reference table. In this way, the code table determination unit 10 determines the presence or absence of the code table. Therefore, if there is no code table, it is possible to immediately shift to the process of creating the code table, and if there is a code table. Can avoid the wasteful processing of creating the same code table as the code table again. Further, since the code table is generally judged only based on the font size on which it most depends, it is possible to quickly judge the presence or absence of the code table.

【0043】〈基準テーブル、符号テーブルの説明〉図
11は、基準テーブルと符号テーブルとの関係を示す図
である。基準テーブルは、文字を形成する行の長さに対
する、連続する黒または白の繋がりの占める割合と、そ
の割合を示す符号値との対応関係を示すテーブルであ
る。例えば、1行の長さが50(単位無し)である場合
に、長さが10である連なりを、二進数の符号値010
0へ符号化するときには、0.2(=10/50)と0
100とが対応していることを示すことになる。同様に
して、長さが0、10、30、40……である繋がりの
割合と、その割合を示す符号値との対応関係も用意され
ている。さらに、この対応関係は、連なりの長さとその
連なりの発生頻度とに基づき定められており、より具体
的には、発生頻度が高く、かつ、長さが長い連なりであ
ればあるほど、小さい符号値へ符号するように設定され
ている。これにより、発生頻度が高く、しかも、量の多
いデータほど、より少ない量のデータで表すことが可能
となる。
<Description of Reference Table and Code Table> FIG. 11 is a diagram showing the relationship between the reference table and the code table. The reference table is a table showing a correspondence relationship between a ratio of continuous black or white connections to a length of a line forming a character and a code value indicating the ratio. For example, when the length of one line is 50 (no unit), a run having a length of 10 is converted into a binary code value 010.
When encoding to 0, 0.2 (= 10/50) and 0
It means that 100 and 100 correspond. Similarly, a correspondence relationship between the proportion of connections having lengths of 0, 10, 30, 40 ... And the code value indicating the proportion is also prepared. Furthermore, this correspondence is determined based on the length of the run and the frequency of occurrence of the run, and more specifically, the higher the frequency of occurrence and the longer the run, the smaller the code. Set to sign to value. As a result, the more frequently the data is generated, the more the data can be represented by the smaller amount of data.

【0044】一方、符号テーブルは、上記の基準テーブ
ルと、実際の文字のフォント・サイズ、より正確には、
1行を構成する画素の個数とに基づいて、上記の連なり
に相当する画素数と、上記の符号値と同値である符号値
との対応関係を示す。従って、例えば、割合0.2と符
号値0100との対応関係を含む基準テーブルを元にし
て、1行当たり17画素を含むフォント・サイズ用の符
号テーブルを生成すると、画素数3(より正確には、画
素数3.4(17×0.2))の連なりと符号値001
0との対応関係を含む符号テーブルが生成されることに
なる。同様にして、1行当たり30画素を含むフォント
・サイズ用の符号テーブルを生成すると、画素数6(3
0×0.2)と符号値0100との対応関係を含む符号
テーブルが生成されることになる。ここで、1行を17
画素から構成される文字『A』については、フォント・
サイズ17用の符号テーブルが、未だ生成されていない
ので、そのフォント・サイズ17についての符号テーブ
ルが生成されることになる。
On the other hand, the code table includes the above reference table and the font size of the actual character, more accurately,
Based on the number of pixels forming one row, the correspondence relationship between the number of pixels corresponding to the series and the code value that is the same as the code value is shown. Therefore, for example, if a code table for a font size including 17 pixels per row is generated based on a reference table including a correspondence relationship between the ratio 0.2 and the code value 0100, the number of pixels is 3 (more accurately). Is a sequence of the number of pixels 3.4 (17 × 0.2) and the code value 001
A code table including a correspondence relationship with 0 will be generated. Similarly, when a code table for a font size including 30 pixels per line is generated, the number of pixels is 6 (3
(0 × 0.2) and a code value of 0100 will be generated as a code table. Here, one line is 17
For the character "A" composed of pixels, the font
Since the code table for size 17 has not been generated yet, the code table for that font size 17 will be generated.

【0045】ステップS340d: 符号テーブル生成
部11は、生成された符号テーブルを符号テーブル記憶
部13に記憶すると共に、その符号テーブルを符号化処
理部14へ引き渡す。
Step S340d: The code table generation unit 11 stores the generated code table in the code table storage unit 13 and delivers the code table to the encoding processing unit 14.

【0046】〈符号化データの生成〉 ステップS350: 符号化処理部14は、具体例1に
おけるステップS280並びに具体例1における他の方
法と同様にして、フォントデータ記憶部3からフォント
データを読出し、エッジデータを生成する。図12は、
文字『A』について、エッジデータから符号化データへ
の変換を示す図である。図12(a)に示すように、文
字『A』の各行については、1行目のエッジデータ
(7、10)、2行目のエッジデータ(6、11)、3
行目のエッジデータ(6、11)、10行目のエッジデ
ータ(3、6、11、14)、18行目のエッジデータ
(0、3、14、17)を生成することになる。なお、
このエッジデータには、先頭の画素が白画素であるか黒
画素であるかの情報を含んでいない。例えば、1行目に
おける最初の7個の画素は、白であるか黒であるか、ま
た、2行目における最初の6個の画素は、白であるか黒
であるか等の情報を含んでいない。しかし、各行におい
て最初に位置する画素の連なりは、必ず白画素であり、
次に、位置する画素の連なりは、必ず黒であり、以下、
同様にして、白画素の連なりと黒画素の連なりとが交互
に繰り返される。従って、各行の先頭の画素の連なりが
白画素であるか黒画素であるかについての情報は不要で
あり、同様にして、それ以後の画素の連なりについて
も、白画素であるか黒画素であるかに関する情報は不要
となる。
<Generation of Encoded Data> Step S350: The encoding processing unit 14 reads the font data from the font data storage unit 3 in the same manner as Step S280 in the first specific example and the other methods in the first specific example. Generate edge data. FIG.
It is a figure which shows conversion from edge data to encoding data about a character "A". As shown in FIG. 12A, for each line of the character "A", the edge data (7, 10) of the first line, the edge data (6, 11) of the second line,
The edge data (6, 11) of the line 10, the edge data (3, 6, 11, 14) of the line 10, and the edge data (0, 3, 14, 17) of the line 18 are generated. In addition,
This edge data does not include information on whether the leading pixel is a white pixel or a black pixel. For example, the first seven pixels in the first row include information such as white or black, and the first six pixels in the second row include information such as white or black. Not at all. However, the series of pixels located first in each row is always a white pixel,
Next, the sequence of pixels located is always black.
Similarly, a series of white pixels and a series of black pixels are alternately repeated. Therefore, there is no need for information on whether the sequence of the first pixel in each row is a white pixel or a black pixel, and similarly, the sequence of pixels thereafter is also a white pixel or a black pixel. No information about that is needed.

【0047】ステップS360: 符号化処理部14
は、エッジデータから、連続する白画素の個数及び連続
する黒画素の個数を算出する。ここで、文字『A』につ
いては、例えば、10行目のエッジデータ(3、6、1
1、14)は、図12(b)に示すように、白画素の連
なりと黒画素の連なりとの境目を表す数値同士を減算す
ることにより、白画素の連なりを構成する白画素の個数
及び黒画素の連なりを構成する黒画素の個数を得る。こ
の結果として、減算データ(3、3、5、3)を得るこ
とができる。
Step S360: Encoding processing section 14
Calculates the number of consecutive white pixels and the number of consecutive black pixels from the edge data. Here, for the character “A”, for example, the edge data (3, 6, 1
1 and 14), as shown in FIG. 12B, by subtracting the numbers representing the boundary between the series of white pixels and the series of black pixels, the number of white pixels forming the series of white pixels and The number of black pixels forming a series of black pixels is obtained. As a result, subtraction data (3, 3, 5, 3) can be obtained.

【0048】ステップS370: 符号化処理部14
は、白の画素数及び黒の画素数を示す減算データを、前
述した符号テーブルを元にして、符号値、即ち、符号化
データへ変換する。ここで、文字『A』の10行目の減
算データ(3、3、5、3)については、「3」が「0
010」へ変換され、「5」が「0100」へ変換され
ることにより、符号化データ(0010、0010、0
100、00100を得ることとなる。 ステップS380: 符号化記憶部15は、その符号化
された符号化データを記憶する。 ステップS390: ビットマップデータ生成不5は、
ステップS330で再生されたエッジデータ、あるい
は、ステップS350で新規に生成されたエッジデータ
に基づき、文字自体の部分を黒画素にし、かつ、余白の
部分を白画素にする。これにより、ビットマップデータ
が生成されることになる。
Step S370: Encoding processing unit 14
Converts the subtraction data indicating the number of white pixels and the number of black pixels into a code value, that is, encoded data, based on the code table described above. Here, in the subtraction data (3, 3, 5, 3) on the 10th line of the character “A”, “3” is “0”.
The coded data (0010, 0010, 0) is converted into "0" and "5" into "0100".
100,00100 will be obtained. Step S380: The encoding storage unit 15 stores the encoded data that has been encoded. Step S390: If the bitmap data generation failure 5
Based on the edge data reproduced in step S330 or the edge data newly generated in step S350, the character itself is made a black pixel and the margin is made a white pixel. As a result, bitmap data is generated.

【0049】このように、この具体例の文字キャッシュ
制御装置では、エッジデータにおける画素の個数とその
個数を表す符号値との対応関係を示す符号テーブルに基
づいて、連続している白画素の個数あるいは連続してい
る黒画素の個数を符号値へ変換することにより、符号化
データを生成する。そして、符号化記憶部が、その生成
された符号化データを記憶する。ここで、この符号テー
ブルでは、連続する画素の個数とその個数を表す符号値
との対応関係が、その個数や出現頻度に基づいて決定さ
れている。従って、ある連続する複数の画素をエッジデ
ータで表す場合に必要とするデータ量よりも少ないデー
タ量である符号化データによって、その連続する画素を
表すことができる。よって、エッジデータのデータ量よ
りもさらにすくないデータ量である符号化データをキャ
ッシュメモリにキャッシュすることができるため、有限
な空間であるキャッシュメモリの領域をより有効に使え
るだけでなく、アクセス時間もより短縮することが可能
となる。
As described above, in the character cache control device of this specific example, the number of consecutive white pixels is determined based on the code table showing the correspondence relationship between the number of pixels in the edge data and the code value representing the number. Alternatively, encoded data is generated by converting the number of consecutive black pixels into a code value. Then, the encoding storage unit stores the generated encoded data. Here, in this code table, the correspondence relationship between the number of consecutive pixels and the code value representing the number is determined based on the number and the appearance frequency. Therefore, the continuous pixel can be represented by the encoded data having a data amount smaller than the data amount required when the continuous data is represented by the edge data. Therefore, it is possible to cache the encoded data, which is a data amount smaller than the data amount of the edge data, in the cache memory, so that the area of the cache memory, which is a finite space, can be used more effectively and the access time is also increased. It is possible to shorten it further.

【0050】また、基準テーブル記憶部が、文字のフォ
ント・サイズや文字の種類等に左右されない、連続する
白画素の連なりの長さや連続する黒画素の連なりの長さ
が一行の長さに対して占める割合と、その割合を表す符
号値との対応関係を示す基準テーブルを記憶している。
そして、符号テーブル生成部が、入力された文字のフォ
ント・サイズ等に基づき、その基準テーブル記憶部に記
憶されている基準テーブルを参照することにより、その
入力された文字のフォント・サイズ等に適する符号テー
ブルを生成する。従って、符号テーブル記憶部が、多数
のフォント・サイズや多種の文字種に対応できるような
多数の符号テーブルを記憶せずに、基準テーブル記憶部
に記憶されている1つの基準テーブル、あるいは、数少
ない基準テーブルを元に符号テーブル生成部によって生
成された少数の符号テーブルを記憶すれば足りる。これ
により、使用される可能性が少ない符号テーブルまでも
を記憶するということを避けることができるので、メモ
リ領域を有効に使用することが可能となる。
In addition, the reference table storage unit does not depend on the font size of the character, the type of character, etc., and the length of the continuous white pixels and the length of the continuous black pixels with respect to the length of one line. It stores a reference table showing a correspondence relationship between the ratio of the total occupied area and the code value representing the ratio.
Then, the code table generation unit refers to the reference table stored in the reference table storage unit based on the font size and the like of the input character, and thereby the font size and the like of the input character is suitable. Generate a code table. Therefore, the code table storage unit does not store a large number of code tables that can support a large number of font sizes and various character types, and one reference table stored in the reference table storage unit or a small number of reference tables. It suffices to store a small number of code tables generated by the code table generation unit based on the tables. As a result, it is possible to avoid storing even the code table that is less likely to be used, and it is possible to effectively use the memory area.

【0051】さらに、符号テーブル判定部が、入力され
た文字に適した符号テーブルが存在するか否かについ
て、符号テーブル記憶部を検索することにより確認す
る。従って、その入力された文字に対応できる符号テー
ブルが既に存在する場合には、その符号テーブルを元に
して、直ちにエッジデータを符号化データへ変換するこ
とができる一方で、その入力された文字に対応できる符
号テーブルが存在しない場合には、符号テーブル生成部
が、新規に、符号テーブルを生成することができる。従
って、同じ符号テーブルを生成してしまうことや、生成
しなければならない符号テーブルを生成せずに符号化処
理を進めること等を回避することができることとなる。
Furthermore, the code table determination unit checks whether or not there is a code table suitable for the input character by searching the code table storage unit. Therefore, if there is already a code table corresponding to the input character, edge data can be immediately converted to coded data based on the code table, while If there is no compatible code table, the code table generation unit can newly generate a code table. Therefore, it is possible to avoid generating the same code table, and proceeding with the encoding process without generating the code table that has to be generated.

【0052】そして、符号テーブル判定部が、入力され
た文字に対応する符号テーブルが存在するか否かを、そ
の入力された文字のフォント・サイズのみに基づき、符
号テーブル記憶部を検索することにより確認する。従っ
て、文字のフォント・サイズだけに基づいて、符号テー
ブルの有無を確認するので、符号テーブルがあるか否か
を迅速に確認することが可能となる。
Then, the code table determination unit searches the code table storage unit based on only the font size of the input character to determine whether or not the code table corresponding to the input character exists. Confirm. Therefore, since the presence or absence of the code table is confirmed based only on the font size of the character, it is possible to quickly confirm whether or not the code table exists.

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

【図1】具体例1のブロック図である。FIG. 1 is a block diagram of a specific example 1.

【図2】具体例1の動作フローチャート(全体)であ
る。
FIG. 2 is an operation flowchart (overall) of the first specific example.

【図3】具体例1の動作フローチャート(キャッシュす
る場合)である。
FIG. 3 is an operation flowchart of specific example 1 (when cached).

【図4】具体例1の動作フローチャート(キャッシュし
ない場合)である。
FIG. 4 is an operation flowchart of specific example 1 (when not cached).

【図5】文字『A』が処理される過程を示す図である。FIG. 5 is a diagram showing a process in which a character “A” is processed.

【図6】文字『A』のエッジ画素列とエッジデータとを
示す図である。
FIG. 6 is a diagram showing an edge pixel string and edge data of a character “A”.

【図7】具体例2のブロック図である。FIG. 7 is a block diagram of a second specific example.

【図8】具体例2の動作フローチャート(全体)であ
る。
FIG. 8 is a flowchart of the operation of the second specific example (overall).

【図9】具体例2の動作フローチャート(符号化処理)
である。
FIG. 9 is an operation flowchart of specific example 2 (encoding process).
It is.

【図10】具体例2の動作フローチャート(テーブルの
準備)である。
FIG. 10 is an operation flowchart (preparation of a table) of the second specific example.

【図11】具体例2の基準テーブルと符号テーブルであ
る。
FIG. 11 is a reference table and a code table according to the second specific example.

【図12】具体例2の符号化データを示す図である。FIG. 12 is a diagram showing encoded data according to a second specific example.

【符号の説明】 C 文字キャッシュ制御装置 3 フォントデータ記憶部 4 エッジデータ生成部 5 ビットマップ生成部 6 エッジ記憶部 7 ビットマップ記憶部[Explanation of Codes] C Character Cache Control Device 3 Font Data Storage Unit 4 Edge Data Generation Unit 5 Bitmap Generation Unit 6 Edge Storage Unit 7 Bitmap Storage Unit

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 複数の文字のアウトラインを表すフォン
トデータを記憶するフォントデータ記憶部と、 前記フォントデータから、白画素と黒画素との境目を表
すエッジデータを生成するエッジデータ生成部と、 前記エッジデータをキャッシュするエッジ記憶部と、 前記エッジ記憶部にキャッシュされた前記エッジデータ
から、白画素と黒画素とを示すビットマップデータを生
成するビットマップ生成部とからなることを特徴する文
字キャッシュ制御装置。
1. A font data storage unit for storing font data representing outlines of a plurality of characters; an edge data generation unit for generating edge data representing a boundary between white pixels and black pixels from the font data; A character cache comprising: an edge storage unit that caches edge data; and a bitmap generation unit that generates bitmap data indicating white pixels and black pixels from the edge data cached in the edge storage unit. Control device.
【請求項2】 エッジデータ生成部が、複数の白画素と
黒画素とを同色の画素の繋がりに基づいて複数の領域に
区分し、各領域を画素の色と画素の数とによって表すエ
ッジデータを生成することを特徴とする請求項1記載の
文字キャッシュ制御装置。
2. The edge data generation unit divides a plurality of white pixels and black pixels into a plurality of regions based on the connection of pixels of the same color, and represents each region by the color of the pixel and the number of pixels. The character cache control device according to claim 1, wherein
【請求項3】 エッジデータ生成部が、行毎に白画素と
黒画素との境目の位置を示すエッジデータを生成するこ
とを特徴とする請求項1記載の文字キャッシュ制御装
置。
3. The character cache control device according to claim 1, wherein the edge data generation unit generates edge data indicating a position of a boundary between a white pixel and a black pixel for each row.
【請求項4】 連続する白画素の個数及び連続する黒画
素の個数と、その個数と出現頻度とに応じて割り当てら
れた、その個数を表す符号値との対応関係を示す符号テ
ーブルを記憶する符号テーブル記憶部と、 エッジデータにおける白画素と黒画素の境目の位置か
ら、白画素の個数及び黒画素の個数を算出し、前記符号
テーブルに基づき、その算出された白画素の個数及び黒
画素の個数を符号値へ符号化することにより符号化デー
タを生成する符号化処理部と、 その生成された符号化データを記憶する符号化記憶部と
からなることを特徴とする請求項1記載の文字キャッシ
ュ制御装置。
4. A code table is stored which shows a correspondence relationship between the number of consecutive white pixels and the number of consecutive black pixels, and a code value representing the number, which is assigned according to the number and the appearance frequency. The number of white pixels and the number of black pixels are calculated from the code table storage unit and the position of the boundary between the white pixel and the black pixel in the edge data, and the calculated number of white pixels and the number of black pixels are calculated based on the code table. 2. The encoding processing unit that generates encoded data by encoding the number of symbols into a code value, and the encoding storage unit that stores the generated encoded data. Character cache controller.
【請求項5】 文字を構成する行の長さに対する、連続
する白画素の連なりの長さ及び連続する黒画素の連なり
の長さの割合と、それらの割合を表す符号値との関係と
を示す基準テーブルを記憶する基準テーブル記憶部と、 その基準テーブルを元にして、前記符号テーブルを生成
する符号テーブル生成部とを有することを特徴とする請
求項4記載の文字キャッシュ制御装置。
5. A relationship between a ratio of a continuous length of continuous white pixels and a continuous length of continuous black pixels to a length of a line forming a character, and a relationship between a code value representing the ratio and The character cache control device according to claim 4, further comprising a reference table storage unit that stores the reference table shown, and a code table generation unit that generates the code table based on the reference table.
【請求項6】 入力された文字に対応する符号テーブル
があるか否かを、符号テーブル記憶部内を検索すること
により確認する符号テーブル判定部を有することを特徴
とする請求項5記載の文字キャッシュ制御装置。
6. The character cache according to claim 5, further comprising a code table determination unit for checking whether or not there is a code table corresponding to an input character by searching a code table storage unit. Control device.
【請求項7】 符号テーブル判定部が、入力された文字
のフォント・サイズのみに基づき、その入力された文字
に対応する符号テーブルがあるか否かを確認することを
特徴とする請求項6記載の文字キャッシュ制御装置。
7. The code table determination unit confirms whether or not there is a code table corresponding to the input character based on only the font size of the input character. Character cache controller.
JP8181523A 1996-02-14 1996-06-21 Character cache control device Pending JPH09281948A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8181523A JPH09281948A (en) 1996-02-14 1996-06-21 Character cache control device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP8-50965 1996-02-14
JP5096596 1996-02-14
JP8181523A JPH09281948A (en) 1996-02-14 1996-06-21 Character cache control device

Publications (1)

Publication Number Publication Date
JPH09281948A true JPH09281948A (en) 1997-10-31

Family

ID=26391469

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8181523A Pending JPH09281948A (en) 1996-02-14 1996-06-21 Character cache control device

Country Status (1)

Country Link
JP (1) JPH09281948A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006308671A (en) * 2005-04-26 2006-11-09 Sony Corp Information processor, information processing method, program storage medium and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006308671A (en) * 2005-04-26 2006-11-09 Sony Corp Information processor, information processing method, program storage medium and program

Similar Documents

Publication Publication Date Title
US6212234B1 (en) Color image encoding apparatus and color image decoding apparatus
US4853971A (en) Method and apparatus for processing image data
JPH0547853B2 (en)
KR0134750B1 (en) Output apparatus and method
JPH09281948A (en) Character cache control device
JPH06217110A (en) Image converting method
JPS5856872B2 (en) Expanded character pattern encoder
JPH01130957A (en) Character controlling apparatus
JP2839578B2 (en) Image data input processing device
KR960016738B1 (en) Method and apparatus for processing information
JP2000184197A (en) Image processor
JP3059618B2 (en) Image control device
JP3757297B2 (en) Printing device
JP3210448B2 (en) Character processing method and apparatus
JPH11119763A (en) Bit map high-efficiency encoding system
JPS61148487A (en) Expander/reducer
JPH08305335A (en) Character processor
JPH06167962A (en) Method and device for compression of font data
JPH11202849A (en) Processor and method for character processing, and recording medium where character processing program is recorded
JPH06175637A (en) Method for generating character
JP2000078415A (en) Image processing system, image compressing device and recording medium
JPH04280383A (en) Method and device for generating graphic/character
JPH09214777A (en) Image expansion processing method
JPS628663A (en) Data recovering circuit
JPH05183753A (en) Device and method for outputting color image