JPH07137341A - Recorder - Google Patents

Recorder

Info

Publication number
JPH07137341A
JPH07137341A JP5289363A JP28936393A JPH07137341A JP H07137341 A JPH07137341 A JP H07137341A JP 5289363 A JP5289363 A JP 5289363A JP 28936393 A JP28936393 A JP 28936393A JP H07137341 A JPH07137341 A JP H07137341A
Authority
JP
Japan
Prior art keywords
data
font
character
compressed
run
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP5289363A
Other languages
Japanese (ja)
Other versions
JP3160446B2 (en
Inventor
Yasuyuki Onizuka
康如 鬼塚
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP28936393A priority Critical patent/JP3160446B2/en
Publication of JPH07137341A publication Critical patent/JPH07137341A/en
Application granted granted Critical
Publication of JP3160446B2 publication Critical patent/JP3160446B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the quantity of information required for storing font data to lower a cost in a recorder in which character data from the external is developed to an internal font and, printed as image data. CONSTITUTION:Data inputted through a data reception part 100 is temporarily stored in a RAM 103. Whether the data is a command, image data, or a character code is analyzed by a CPU 101 in accordance with a program stored in a ROM 102. If the data is a character code, font data that has been previously compressed by run-length coding and stored is read from the ROM 102 by a DMA and transmitted to a font forming part 104. In the font forming part, the run-length compressed data from the ROM 102 is expanded to be normalized, thereafter being converted to required font data through a reverse prediction function processing.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、ホストコンピュータ等
の外部機器より文字データ等を入力して記録媒体に記録
する記録装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a recording apparatus for inputting character data or the like from an external device such as a host computer and recording it on a recording medium.

【0002】[0002]

【従来の技術】従来、記録装置において、フォントデー
タ等の画像データは記録装置内部の記録部(ROM)に
格納して、入力データに相当する文字ビットパターンを
記録部よりアクセスし印字データとして展開し、印字を
行っていた。近年フォントデータ等の画像データは文字
品位を上げるため、より高い解像度の印字データが要求
されている。すなわちフォントデータ1文字を形成して
いるドット数はその解像度に比例して多くなる。48ド
ット×48ドットのマトリックスで形成されたフォント
は1フォントにつき288バイト(2306ビット)必
要となる。日本語フォントの場合1書体で7000文字
程度存在すると約2Mバイトの記憶部のROM容量が必
要となる。
2. Description of the Related Art Conventionally, in a recording apparatus, image data such as font data is stored in a recording unit (ROM) inside the recording apparatus, and a character bit pattern corresponding to input data is accessed from the recording unit and expanded as print data. Then, it was printing. In recent years, in order to improve the character quality of image data such as font data, print data with higher resolution is required. That is, the number of dots forming one character of font data increases in proportion to the resolution. A font formed by a matrix of 48 dots × 48 dots requires 288 bytes (2306 bits) for each font. In the case of Japanese fonts, if there are about 7,000 characters in one typeface, the ROM capacity of the storage unit of about 2 Mbytes is required.

【0003】またROM容量削減のため従来より画像デ
ータの圧縮を施し記録装置内部に格納する手法が取られ
ている。例えばランレングス圧縮である。
Further, in order to reduce the ROM capacity, a method of compressing image data and storing it in a recording device has been conventionally used. For example, run length compression.

【0004】[0004]

【発明が解決しようとする課題】上記従来例では次のよ
うな欠点があった。
The above-mentioned conventional example has the following drawbacks.

【0005】1.文字フォントを圧縮せずそのまま記録
装置の記憶部に格納するとROM容量が膨大になりかな
りのコストアップとなっている。
1. If the character font is stored in the storage unit of the recording device as it is without being compressed, the ROM capacity becomes huge and the cost is considerably increased.

【0006】2.文字フォントを圧縮し記録装置の記憶
部に格納した場合、圧縮データを伸張する論理が複雑で
しかもビット単位に処理を行わなければならないため、
伸張処理にソフトウェアの負荷が多大となり、記録装置
全体としてのスループットに影響を与え印字スピードの
低下を招いていた。
2. When the character font is compressed and stored in the storage unit of the recording device, the logic for decompressing the compressed data is complicated and the processing must be performed in bit units.
The decompression process requires a large load of software, which affects the throughput of the recording apparatus as a whole and causes a decrease in printing speed.

【0007】3.文字フォントをランレングスによる圧
縮方法を用いてデータ圧縮した場合、圧縮効率を大幅に
高めることができない。
3. When the character font is data-compressed using the run-length compression method, the compression efficiency cannot be significantly increased.

【0008】本発明の目的は以上のような問題を解消し
た記録装置を提供することにある。
An object of the present invention is to provide a recording apparatus that solves the above problems.

【0009】[0009]

【課題を解決するための手段】本発明は外部からのキャ
ラクタデータを内部フォントに展開し画像データとして
印刷する記録装置において、予め内部フォントデータを
予測関数により正規化し、さらにランレングス圧縮を施
した圧縮データを記憶する記憶手段と、該記憶手段に記
憶された圧縮データを外部からのキャラクタデータに応
答して所望のフォントデータに変換する際に当該圧縮デ
ータをランレングス伸張し正規化する手段と、該手段に
より正規化されたデータに逆予測関数処理を施して所望
のフォントデータに変換する手段とを備えたことを特徴
とする。
According to the present invention, in a recording apparatus which develops character data from the outside into an internal font and prints it as image data, the internal font data is normalized in advance by a prediction function and further run-length compressed. Storage means for storing the compressed data, and means for normalizing the run length extension of the compressed data when converting the compressed data stored in the storage means into desired font data in response to external character data. And means for performing inverse prediction function processing on the data normalized by the means to convert the data into desired font data.

【0010】[0010]

【作用】本発明によれば、例えば画像データの圧縮を施
し記録装置内部に格納し、その手法としてランレングス
圧縮を用いた場合予測関数処理を元フォントデータに対
して施し、できるだけ白ドットが連続するようにデータ
を変換しランレングス圧縮による圧縮率を高め記憶部の
容量を大幅に削減し、さらに予測関数、ランレングス圧
縮されたデータの復元処理を全てハード化することによ
りフォントデータ作成の処理時間を大幅に短縮しスルー
プットを下げることなく印字することができるようにな
る。
According to the present invention, for example, when the image data is compressed and stored in the recording device, and the run length compression is used as the method, the predictive function process is applied to the original font data so that white dots are continuous. Font data creation processing by converting the data to increase the compression rate by run length compression, greatly reducing the capacity of the storage unit, and further hardizing the prediction function and the restoration processing of run length compressed data. Printing can be performed without significantly reducing the throughput and throughput.

【0011】[0011]

【実施例】フォントデータのように確定データは広義の
視野で考えれば全て規則性を備えていることができる。
1個のフォントに注目するひとつのピクセル(ドット)
に対して過去n個のピクセスの組み合わせは2元符号の
場合2n+1 個の状態が存在する。しかし現実的には全て
の状態に対してこの論理を持たせることは不可能なので
一つのピクセルに対してその周りのピクセルのみに注目
して考えてみる。特にフォントデータの場合は一般的な
画像データと比較して黒ドットから白ドット、白ドット
から黒ドットへの変化点が少ないので、変化点を黒ドッ
トで表すことにより白データ部分を多くしランレングス
圧縮の効率をより高めることが考えられる。また白ドッ
トから白ドット、黒ドットから黒ドットの遷移確率が非
常に高いのに対して、白ドットから黒ドット、黒ドット
から白ドットへの遷移確率は非常に低いためひとつのピ
クセルに対して隣接するピクセルの2値状態を予測する
ことができる。このことを元フォントデータに応用して
予測関数を用いランレングス圧縮に有利な形にデータを
変換させる。
[Embodiment] All fixed data such as font data can be provided with regularity in a broad sense.
One pixel (dot) focusing on one font
On the other hand, the past n pixel combinations have 2 n + 1 states in the case of a binary code. However, in reality it is impossible to have this logic for all states, so for one pixel, consider only the surrounding pixels. In particular, in the case of font data, the number of change points from black dots to white dots and from white dots to black dots is small compared to general image data. It is possible to further improve the efficiency of the length compression. The transition probability of white dots to white dots and black dots to black dots is very high, while the transition probability of white dots to black dots and black dots to white dots is very low. The binary state of adjacent pixels can be predicted. By applying this to the original font data, the data is converted into a form advantageous for run-length compression by using the prediction function.

【0012】図2の予測関数値表に従い説明を行う。Description will be given according to the prediction function value table of FIG.

【0013】フォント中のある1ドット(d)に対し
て、当該ドットの上(b),左(c)および斜め上
(a)のドットに注目した場合に当該a〜cの3ドット
の組み合わせに対してdとして現われる確率の高いドッ
トを予測関数と呼ぶ。a〜cに対する予測関数の値と実
際の値のdを比較し、一致していればdを“0”(白)
で置き換え、一致していなければ“1”で置き換える。
つまり遷移確率の高いパターンを白で置き換えると言う
ことである。このことにより大部分のドットが白で置き
換わることにより、ランレングス圧縮の圧縮効率を上げ
る。
When one dot (d) in the font is focused on the dots above (b), left (c) and diagonally above (a), a combination of the three dots a to c. A dot having a high probability of appearing as d is called a prediction function. The value of the prediction function for a to c is compared with the actual value d, and if they match, d is “0” (white)
Replace with, and if they do not match, replace with "1".
In other words, the pattern with a high transition probability is replaced with white. As a result, most of the dots are replaced with white, thereby increasing the compression efficiency of run length compression.

【0014】図3で表したマトリクスでこれらを予測関
数式で表現すると以下のようになる。
The matrix shown in FIG. 3 can be used to express these in a prediction function formula as follows.

【0015】[0015]

【数1】 [Equation 1]

【0016】以上のようにして元フォントデータを予測
関数により変換し該変換データをランレングス圧縮し記
録装置の記憶部に格納しておく。
As described above, the original font data is converted by the prediction function, the converted data is run-length compressed, and stored in the storage unit of the recording device.

【0017】復元処理の逆予測関数の論理式は以下のよ
うになる。
The logical formula of the inverse prediction function of the restoration process is as follows.

【0018】[0018]

【数2】 [Equation 2]

【0019】Y=出力データ D=未処理データ 図3に復元処理の例を示す。Y = output data D = unprocessed data FIG. 3 shows an example of the restoration process.

【0020】(a)は元フォントデータに対して予測関
数処理を施し作成されたデータである。このデータに対
して左上端のドットから順に式(2)に従ってデータを
復元してゆく。この際左端,上端の外周1ドット分は仮
想的に白(0)とみなす。太枠で囲まれた4ドットにお
いて当該ドット“D”に対して上“B”、左“C”、斜
め上“A”の3ドットを取り出す。当該ドット“Dの値
をチェックして、もしD=“0”ならばDの値は予測関
数と一致していることを意味し、D=“1”ならばDの
値は予測関数値と不一致であることを意味する。
(A) is data created by subjecting the original font data to predictive function processing. With respect to this data, the data is restored in order from the upper left dot according to the equation (2). At this time, the outermost one dot at the left end and the upper end is virtually regarded as white (0). Of the four dots surrounded by the thick frame, three dots of “B” above, “C” to the left, and “A” above diagonally are extracted with respect to the dot “D”. Check the value of the dot “D”, and if D = “0” means that the value of D matches the prediction function, and if D = “1”, the value of D is the prediction function value. It means disagreement.

【0021】(b)のマトリクスにおいて考えると太枠
で囲まれた4ドットについて“D”にあたるドットは黒
“1”であり予測関数値とは不一致である。従って図2
の予測関数値表からこのドットは黒“1”である。次に
(c)の処理に移る。
Considering in the matrix of (b), the dot corresponding to "D" among the four dots surrounded by the thick frame is black "1" and does not match the prediction function value. Therefore, FIG.
This dot is black “1” from the prediction function value table. Next, the process of (c) is performed.

【0022】このとき右上のドットは(b)で生成した
ドットを用いる。(b)と同様にして“D”にあたるド
ットに着目すると白“0”であり予測関数と合致してい
る。
At this time, the dot generated in (b) is used as the upper right dot. Focusing on the dot corresponding to “D” as in (b), it is white “0”, which matches the prediction function.

【0023】この場合図2の予測関数値表から3のパタ
ーンであり黒“1”であることがわかる。
In this case, it can be seen from the prediction function value table of FIG. 2 that there are 3 patterns and black is "1".

【0024】以上の処理を順に繰り返していくと(r)
のパターンが復元される。
When the above processing is repeated in sequence (r)
Pattern is restored.

【0025】次に予測関数により正規化されたデータに
関するランレングス圧縮の手法を説明する。
Next, a run length compression method for data normalized by a prediction function will be described.

【0026】フォントデータのように2値のデータでは
黒データと白データの群が必ず交互に現われるのでそれ
ぞれの群をランレングス符号で表現する。フォントを先
頭から縦方向に順にサーチし連続した白ドットをランレ
ングスコード(図4)を用いて圧縮する。フォントの下
端に達してならば、その1つ右の列の先頭ドットがそれ
に連続しているものとして一次元的に符号化する。ここ
でランレングスコードとは“1”に先立つ連続した0〜
22ビットの“0”(これをオペランドと呼ぶ)と、そ
れに続く(オペランドの長さにより決まる)特定のビッ
ト列(これをデータと呼ぶ)の組み合わせにより符号化
を行う。すなわち“1”に先立つ連続した“0”(=オ
ペランド部)のビット数をnとおくとき、予め決められ
たデータ長テーブルより求められた数値がそれに続く
“データ部”のビット長になる。次に“1”に続くmビ
ットのデータ部の値(αとおく)に、nに対応する“デ
ータ初期値テーブル”のエントリを加えたものが、連続
した白ドット(白ブロック)のビット数を表す。白ブロ
ックと黒ブロックは必ず交互に現われるがフォントの先
頭ブロックが白ブロックか黒ブロックかが判定できなけ
ればならないので、圧縮されたデータの先頭には先頭ブ
ロックが白ブロックか黒ブロックかを示すデータ“識別
子”を1ビット格納するものとする。このようにしてラ
ンレングス圧縮されたフォントデータを記憶部に格納す
る。以上述べてきた手順で格納されたフォントデータに
対して逆の手順をハードウェアにより一括処理を行う。
In binary data such as font data, groups of black data and white data always appear alternately. Therefore, each group is represented by a run length code. The fonts are sequentially searched from the beginning in the vertical direction, and consecutive white dots are compressed using the run length code (FIG. 4). If the lower end of the font is reached, it is one-dimensionally encoded as if the leading dot of the column to the right of it is continuous with it. Here, the run length code is a series of 0s preceding the "1".
Encoding is performed by a combination of 22-bit "0" (this is called an operand) and a specific bit string (which is determined by the length of the operand) that follows it (this is called data). That is, when the number of consecutive "0" (= operand part) bits preceding "1" is set to n, the numerical value obtained from a predetermined data length table becomes the bit length of the subsequent "data part". Next, the number of bits of consecutive white dots (white blocks) is obtained by adding the entry of the "data initial value table" corresponding to n to the value of the m-bit data part following "1" (denoted as α). Represents White blocks and black blocks always appear alternately, but it is necessary to determine whether the head block of a font is a white block or a black block. Therefore, at the beginning of compressed data, data indicating whether the head block is a white block or a black block is displayed. One bit of "identifier" is stored. The run-length compressed font data is stored in the storage unit. The reverse procedure is collectively performed by the hardware on the font data stored by the procedure described above.

【0027】以下、図面を参照して本発明の実施例を詳
細に説明する。
Embodiments of the present invention will be described in detail below with reference to the drawings.

【0028】図1は本発明の一実施例による記録装置の
制御系の構成を示す電気ブロック図である。図1におい
て101はこの装置における動作,処理を実行するCP
U、102はCPU101の制御プログラムやフォント
生成のためのランレングス圧縮データ,処理のための各
種データを格納するROM(CGROM)、103は各
種データを一時保存するためのRAM、100はホスト
コンピュータ等の外部機器との間で通信制御を行い、ホ
ストコンピュータより送られてくる印字データを取り込
むためのデータ受信部、105は記録装置が記録媒体に
画像を記録するためにCPU101からの制御信号をヘ
ッドドライバに供給し、記録ヘッドに画像データを転送
して印字するHEAD駆動部である。
FIG. 1 is an electrical block diagram showing the configuration of a control system of a recording apparatus according to an embodiment of the present invention. In FIG. 1, 101 is a CP that executes the operation and processing in this device.
U, 102 is a ROM (CGROM) for storing a control program of the CPU 101, run-length compressed data for font generation, and various data for processing, 103 is a RAM for temporarily storing various data, and 100 is a host computer or the like. A data receiving unit for controlling communication with an external device and capturing print data sent from a host computer; 105 is a head for receiving a control signal from the CPU 101 for the recording device to record an image on a recording medium. This is a HEAD drive unit that supplies the image data to the driver, transfers the image data to the recording head, and prints.

【0029】キャリッジモータドライバとキャリッジモ
ータのCR駆動部106、紙送りモータドライバと紙送
りモータのLF駆動部107はCPU101からそれぞ
れのドライバに制御信号を供給し、印字を記録媒体に行
う際に必要な記録ヘッドの水平方向移動と垂直方向移動
を促す制御系である。104は102のROMに格納さ
れているランレングス圧縮フォントを印字ビットパター
ンに復元するためのランレングス伸張処理を行い、ラン
レングス伸張した1文字分のデータを一時格納する48
ビット×48ビットで構成されているRAMより前記ラ
ンレングス伸張されたデータを逆予測関数処理して本来
のビットフォントに復元するための逆予測関数処理を行
うフォント作成部である。このフォント作成部について
は後述する。
The carriage motor driver and CR drive unit 106 of the carriage motor, and the paper feed motor driver and LF drive unit 107 of the paper feed motor are required to supply control signals from the CPU 101 to the respective drivers to print on the recording medium. It is a control system that promotes horizontal movement and vertical movement of the recording head. Reference numeral 104 denotes a run length decompression process for restoring the run length compressed font stored in the ROM 102 to a print bit pattern, and temporarily stores the run length decompressed data for one character 48.
It is a font creation unit that performs an inverse prediction function process for performing an inverse prediction function process on the data that has been run-length expanded from a RAM configured by bits × 48 bits to restore the original bit font. This font creation unit will be described later.

【0030】次に本発明においての制御の手順を同様に
図1を用いて説明する。まずデータ受信部100によっ
て入力されたデータはRAM103に一時格納され、R
OM102に格納してあるプログラムにそってCPU1
01によりコマンド,イメージデータ,キャラクタコー
ドの解析が行われる。キャラクタコードの場合、予めラ
ンレングス圧縮されて格納してあるフォントデータを1
02のROMよりDMAにより読み出され104のフォ
ント作成部に送られる。フォント作成部ではフォントの
ビット生成が行われ、順次103のRAMにDMAによ
り格納される。1文字分のフォント作成が終了するとC
PUに割り込みを発生させ次のフォント作成を行う。1
ライン分の展開が終了するか、もしくは外部機器のホス
トコンピュータより印字命令が入力された時点で106
のCR駆動部をドライブし105のHEAD駆動部に1
03のRAMより印字データが転送され、印字が行われ
る。印字終了後、107のLF駆動部がドライブされ一
連のシーケンスが終了する。
Next, the control procedure in the present invention will be described with reference to FIG. First, the data input by the data receiving unit 100 is temporarily stored in the RAM 103, and R
CPU1 according to the program stored in OM102
A command, image data, and character code are analyzed by 01. In the case of the character code, the font data that has been run length compressed and stored in advance is set to 1
The data is read from the ROM of 02 by DMA and sent to the font creating unit of 104. The font generation unit generates bits of the font and sequentially stores them in the RAM 103 by DMA. When the font for one character is created, C
The PU is interrupted and the next font is created. 1
When the line expansion is completed or a print command is input from the host computer of the external device, 106
Drives the CR drive unit of No. 1 to the HEAD drive unit of No. 105
The print data is transferred from the RAM 03 to print. After printing is completed, the LF drive unit 107 is driven, and a series of sequences is completed.

【0031】次に図5のフォント作成ブロック図につい
て詳細に説明する。ランレングス伸張の要求がCPUか
ら出され200のDMA制御部が起動し設定されたCG
ROM(ROM102)のフォントデータ先頭アドレス
から予め図4のランレングスコード表に従って作成され
た圧縮フォントがDMA転送される。データの転送が確
認されると202のDATA SHIFT(データシフ
ト)部により順次1ビットづつシフトされる。201は
シフトされた回数をカウントするシフトカウンタであ
る。まず最初のデータの1ビット目は203のHEAD
ER(ヘッダ)判別回路に送られ次に続くビットが白ビ
ットであるか黒ビットであるかの判断を行いその情報を
204のオペランド,データ,黒データのスイッチ回路
に送る。205は白データのオペランド解析部でデータ
シフト部202よりシフトされてきたビットの“0”の
数をカウントして“1”が検出された時点のカウント値
によりオペランド長に相当するデータ初期値を求め、2
06のラッチ回路に転送する。また205のオペランド
解析部ではそれぞれのオペランド長によって設定してあ
るデータ部のビット長を求めその情報を208のデータ
解析部に転送する。
Next, the font creation block diagram of FIG. 5 will be described in detail. A request for run length extension is issued from the CPU, the DMA control unit of 200 is activated, and the set CG is set.
A compressed font created in advance according to the run length code table of FIG. 4 is DMA-transferred from the font data start address of the ROM (ROM 102). When the data transfer is confirmed, the DATA SHIFT (data shift) unit 202 shifts the data one bit at a time. Reference numeral 201 is a shift counter for counting the number of shifts. The first bit of the first data is HEAD of 203
It is sent to the ER (header) discriminating circuit and it is discriminated whether the next bit is a white bit or a black bit, and the information is sent to a switch circuit of 204 operands, data and black data. Reference numeral 205 denotes an operand analysis unit for white data, which counts the number of “0” s of the bits shifted by the data shift unit 202 and determines the initial data value corresponding to the operand length by the count value when “1” is detected. Seek 2
06 latch circuit. In addition, the operand analysis unit 205 obtains the bit length of the data part set by each operand length and transfers the information to the data analysis unit 208.

【0032】205のオペランド解析部の解析の終了を
204のスイッチ回路に知らせ、204のスイッチ回路
により208のデータ解析部を起動させる。208のデ
ータ解析部ではオペランドに続くシフトデータのビット
の“1”,“0”を検知し図4のデータ表現可能範囲に
示される値を求め209のデータ値ラッチ回路に転送す
る。
The switch circuit of 204 is notified of the end of the analysis of the operand analysis unit of 205, and the data analysis unit of 208 is activated by the switch circuit of 204. The data analysis unit 208 detects "1" and "0" of the bits of the shift data following the operand, finds the value shown in the data representable range of FIG. 4, and transfers it to the data value latch circuit 209.

【0033】ついでデータ解析部208のデータ解析が
終了したことを204のスイッチ回路に知らせる。ラッ
チ回路206と209にラッチされた値は207の加算
部に転送され加算し白データビット数として210のラ
ッチ回路に転送される。そこで一旦202のデータシフ
ト部によるデータシフトを中断し、白データのフォント
展開処理に移る。例えばオペランド部とデータ部のデー
タが“000010100”(LSB← →MSB)で
ある場合オペランド部は“00001”になる。このと
きのデータ初期値は図4からわかるように“49”であ
り、データ部のビット長は4ビットとなる。ここまでを
205のオペランド解析部で行う。
Then, the switch circuit 204 is notified that the data analysis of the data analysis unit 208 is completed. The values latched in the latch circuits 206 and 209 are transferred to the adder 207, added, and transferred to the latch circuit 210 as the number of white data bits. Therefore, the data shift by the data shift unit 202 is once interrupted, and the process proceeds to the font development processing of white data. For example, when the data of the operand part and the data part is "000010100" (LSB ← → MSB), the operand part is "00001". The initial data value at this time is "49" as can be seen from FIG. 4, and the bit length of the data part is 4 bits. The operations up to this point are performed by the operand analysis unit 205.

【0034】データ部は“0100”(LSB← →M
SB)であることから値は“2”となる。この解析を2
08のデータ解析部で行う。その後加算され白データビ
ット長は“51”となる。ラッチ回路210によりラッ
チされた白データビット数は212の展開部により順次
縦ドット列に展開され214のフォント生成部により正
規化フォントマトリクスが形成される。縦16ビット生
成されたフォントは216のラッチ回路に転送され、2
18の内蔵RAM(48ビット×48ビット)に一時保
存される。
The data part is "0100" (LSB ← → M
Since it is SB), the value is "2". This analysis is 2
08 data analysis unit. After that, the white data bit length is added to become "51". The number of white data bits latched by the latch circuit 210 is sequentially expanded into vertical dot rows by the expansion unit 212, and the normalized font matrix is formed by the font generation unit 214. The vertical 16-bit generated font is transferred to the 216 latch circuit, and 2
It is temporarily stored in 18 built-in RAMs (48 bits × 48 bits).

【0035】カウンタ215ではフォント生成部214
における展開ビット数のカウントが行われ、終了の判断
を行い202のDATA SHIFT部に知らせシフト
を展開させ黒データ解析部211を起動する。211の
黒データ解析部ではデータシフト部202よりシフトさ
れてきたビットの“1”,“0”を検出し“1”が検出
されるまでの“0”の数+1だけ黒ドットとして213
の黒データビット展開部を起動させる。後は白ドット展
開と同様の処理で正規化フォントマトリクスを生成す
る。例えば黒ドットが4ドット連続の場合はオペラン
ド、データに続くデータは“0001”と表現される。
In the counter 215, the font generation unit 214
The expansion bit number is counted, the end is determined, the DATA SHIFT section 202 is notified, the shift is expanded, and the black data analysis section 211 is activated. In the black data analysis unit 211, "1" and "0" of the bits shifted by the data shift unit 202 are detected, and the number of "0" until "1" is detected + 1 as black dots 213
The black data bit expansion unit of is activated. After that, the normalized font matrix is generated by the same process as the white dot expansion. For example, when four black dots are consecutive, the operand and the data following the data are expressed as "0001".

【0036】以上の処理が201のシフトカウンタによ
りシフトデータのビット数だけ行われシフトが終了した
ことを検知したら再びROM102よりDMA転送で圧
縮データを読込み処理を続ける。ラッチ回路216から
のデータに関し、221の文字サイズ設定部で設定され
た1文字分のランレングス伸張圧縮が終了すると(これ
は1文字転送終了判断部217が行う)、次に逆予測関
数処理へ移る。
The above processing is performed by the shift counter 201 for the number of bits of the shift data, and when it is detected that the shift is completed, the compressed data is read again from the ROM 102 by DMA transfer and the processing is continued. With respect to the data from the latch circuit 216, when the run length expansion / compression for one character set by the character size setting unit 221 is completed (this is performed by the one character transfer end determination unit 217), the process proceeds to the inverse prediction function process. Move.

【0037】逆予測関数処理部219は218の内蔵R
AMに一時保存されたデータを順次16ビットずつ読み
出し図3のデータ復元処理に従いビットフォントを作成
していく。作成されたビットフォントはラッチ回路22
0に送られる。このラッチ回路220からの16ビット
のフォントデータは、DMA設定部222に転送され外
部のRAMの指定された領域へDMA転送される。
The inverse prediction function processing unit 219 has a built-in R of 218.
The data temporarily stored in the AM is sequentially read in 16-bit units, and bit fonts are created according to the data restoration process shown in FIG. The created bit font is the latch circuit 22.
Sent to 0. The 16-bit font data from the latch circuit 220 is transferred to the DMA setting unit 222 and DMA-transferred to a designated area of the external RAM.

【0038】221の文字サイズ設定部により設定され
た1文字分の転送が終了すると(その判別は1文字作成
終了判別部223が行う)、223の1文字作成終了判
別部からCPUに対して終了割り込みを発生させる。
When the transfer of one character set by the character size setting unit 221 is completed (the determination is made by the one-character creation completion determination unit 223), the one-character creation completion determination unit 223 terminates to the CPU. Generate an interrupt.

【0039】以上の処理は最初にCPUからCGROM
のフォントデータ先頭アドレスと文字サイズ、出来上が
ったビットフォントの外部RAM格納先頭アドレスをフ
ォント作成部に設定し、ランレングス伸張スタートの信
号をフォント作成部に与えてやるだけで最後の終了割り
込みが発生するまでCPUは介在することなく処理が行
われる。
The above processing is first performed by the CPU to the CGROM.
Setting the font data start address and character size of the finished bit font, and the external RAM storage start address of the finished bit font in the font creation section, and giving the run length extension start signal to the font creation section will generate the final end interrupt. Until then, the processing is performed without the intervention of the CPU.

【0040】<他の実施例>ホストコンピュータからダ
ウンロード文字等を外字登録する場合、ランレングス圧
縮処理を内部ROMのプログラムとして格納することに
より外字登録領域を通常の登録領域より大幅に小さくす
ることが可能となり、RAM容量の削減にも貢献でき
る。
<Other Embodiments> When a downloaded character or the like is registered as an external character from the host computer, the external character registration area can be made much smaller than the normal registration area by storing the run length compression processing as a program in the internal ROM. It is possible and can contribute to the reduction of RAM capacity.

【0041】[0041]

【発明の効果】以上説明したように記録装置内部のフォ
ントデータの格納に要する情報量を減少することがで
き、コストを低減することが可能となった。さらに予測
関数、ランレングス圧縮されたデータの伸張処理をハー
ドウェアによって行うことによりフォントデータ作成の
処理スピードをアップしソフトウェアの負荷を大幅に軽
減することが可能となり記録装置全体のスループットを
向上させることが可能となった。
As described above, the amount of information required to store font data inside the recording device can be reduced, and the cost can be reduced. Furthermore, by performing the decompression process of the prediction function and run-length compressed data by hardware, the processing speed of font data creation can be increased and the load of software can be significantly reduced, improving the throughput of the entire recording device. Became possible.

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

【図1】本発明の一実施例に関する記録装置のブロック
図である。
FIG. 1 is a block diagram of a recording apparatus according to an embodiment of the present invention.

【図2】本発明での予測関数値表を示す図である。FIG. 2 is a diagram showing a prediction function value table according to the present invention.

【図3】本発明での逆予測関数処理によるデータの復元
例を示す図である。
FIG. 3 is a diagram showing an example of data restoration by inverse prediction function processing according to the present invention.

【図4】本発明でのランレングス圧縮法によるランレン
グスコード表を示す図である。
FIG. 4 is a diagram showing a run length code table according to a run length compression method in the present invention.

【図5】本発明の他の実施例によるフォント作成部回路
のブロック図である。
FIG. 5 is a block diagram of a font creation unit circuit according to another embodiment of the present invention.

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

100 データ受信部 101 CPU 102 ROM 104 フォント作成部 100 data receiving unit 101 CPU 102 ROM 104 font creating unit

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06T 9/00 H03M 7/46 8842−5J H04N 1/419 8420−5L G06F 15/66 330 E ─────────────────────────────────────────────────── ─── Continuation of front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical display location G06T 9/00 H03M 7/46 8842-5J H04N 1/419 8420-5L G06F 15/66 330 E

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 外部からのキャラクタデータを内部フォ
ントに展開し画像データとして印刷する記録装置におい
て、予め内部フォントデータを予測関数により正規化
し、さらにランレングス圧縮を施した圧縮データを記憶
する記憶手段と、該記憶手段に記憶された圧縮データを
外部からのキャラクタデータに応答して所望のフォント
データに変換する際に当該圧縮データをランレングス伸
張し正規化する手段と、該手段により正規化されたデー
タに逆予測関数処理を施して所望のフォントデータに変
換する手段とを備えたことを特徴とする記録装置。
1. A recording device for expanding character data from the outside into an internal font and printing the image data as image data, a storage means for storing the compressed data obtained by normalizing the internal font data in advance with a prediction function and further performing run-length compression. And a means for normalizing the compressed data stored in the storage means by run-length expanding the compressed data when converting the compressed data into desired font data in response to external character data. And a means for performing inverse prediction function processing on the data and converting the data into desired font data.
JP28936393A 1993-11-18 1993-11-18 Recording device Expired - Fee Related JP3160446B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28936393A JP3160446B2 (en) 1993-11-18 1993-11-18 Recording device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28936393A JP3160446B2 (en) 1993-11-18 1993-11-18 Recording device

Publications (2)

Publication Number Publication Date
JPH07137341A true JPH07137341A (en) 1995-05-30
JP3160446B2 JP3160446B2 (en) 2001-04-25

Family

ID=17742241

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28936393A Expired - Fee Related JP3160446B2 (en) 1993-11-18 1993-11-18 Recording device

Country Status (1)

Country Link
JP (1) JP3160446B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103522774A (en) * 2012-07-04 2014-01-22 精工爱普生株式会社 Recording device, and control method for recording device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103522774A (en) * 2012-07-04 2014-01-22 精工爱普生株式会社 Recording device, and control method for recording device

Also Published As

Publication number Publication date
JP3160446B2 (en) 2001-04-25

Similar Documents

Publication Publication Date Title
EP0602818B1 (en) Dot data compression and expansion method and apparatus
JP3327650B2 (en) Recording device
CN101282406B (en) Image processing apparatus
JP3160446B2 (en) Recording device
JPH06222747A (en) Font compression device and font restoration device
JP2972466B2 (en) Dot pattern compression method and apparatus and output method and apparatus
JP3061562B2 (en) Printing system, information processing device, information processing method, printing device, and printing method
JP2003189108A (en) Image compression method
JPH1117959A (en) Run length coding method for binary image and recording medium storing run length coding program
JP3221493B2 (en) Dot character font compression / decompression methods and their control devices
JP2008124632A (en) Image encoding apparatus, image decoding apparatus, image encoding method, image decoding method, image encoding program, image decoding program, recording medium recording image encoding program, and recording medium recording image decoding program
JP2502869B2 (en) Character font data encoding processing method
JP3166222B2 (en) Character data generator and method
JP2683506B2 (en) Data compression method and apparatus, data decompression method and apparatus
JPH02287739A (en) Memory access method
JPH05281948A (en) Font pattern compressing and storing method
JPH07282242A (en) Device and method for character font compression
JP3757297B2 (en) Printing device
JPH09163154A (en) Picture processor
US20040190783A1 (en) Image compressing method, program, storing medium, and apparatus
JPH06202610A (en) Method and device for pattern compression
JPH087563B2 (en) Figure pattern compression method and its restoration method
JPH0736431A (en) Method for visualizing font data
JPH1188193A (en) Byte run length expansion device and its method
JPH06169407A (en) Encoder

Legal Events

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

Free format text: PAYMENT UNTIL: 20080216

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090216

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees