JPH0948160A - Character storage - Google Patents
Character storageInfo
- Publication number
- JPH0948160A JPH0948160A JP20227195A JP20227195A JPH0948160A JP H0948160 A JPH0948160 A JP H0948160A JP 20227195 A JP20227195 A JP 20227195A JP 20227195 A JP20227195 A JP 20227195A JP H0948160 A JPH0948160 A JP H0948160A
- Authority
- JP
- Japan
- Prior art keywords
- character
- dot data
- characters
- stored
- data
- 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
Links
- 238000007906 compression Methods 0.000 claims description 22
- 230000006835 compression Effects 0.000 claims description 21
- 239000000284 extract Substances 0.000 claims description 5
- 238000000034 method Methods 0.000 description 29
- 238000013144 data compression Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000000605 extraction Methods 0.000 description 2
- 230000006837 decompression Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 238000005549 size reduction Methods 0.000 description 1
Landscapes
- Record Information Processing For Printing (AREA)
Abstract
Description
【0001】[0001]
【発明の属する技術分野】本発明は、文字の形状を表す
ドットデータを圧縮して記憶する文字記憶装置に関する
ものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character storage device that compresses and stores dot data representing a character shape.
【0002】[0002]
【従来の技術】従来、プリンタで文字あるいは図形の形
状を印字する場合には、それらの形状はドットデータで
表されている。ドットデータとは、印字装置の最小印字
単位であるドット毎に、印字するか印字しないかを示し
たデータのことである(ここでは、文字の形状を印字す
る場合について説明するが、表示する場合でも同様であ
る)。2. Description of the Related Art Conventionally, when printing the shapes of characters or figures with a printer, those shapes are represented by dot data. Dot data is data that indicates whether or not to print for each dot, which is the minimum printing unit of the printing device. (Here, the case of printing the shape of a character But the same).
【0003】上記のように構成されるドットデータは、
1つのドットが印字すると印字しないとの2つの状態を
取る場合には、1つのドットを1つのビットに対応させ
た、0(2進数を示す、以降、0bのように記述)と1
bの2値で表されるビットマップデータとして、RAM
やROM等のメモリに記憶される。尚、以降では、印字
するドットを1bのビットとし、印字しないドットを0
bのビットとして説明する。例えば、24ドット×24
ドットのドットデータでは、576個のドットがあり、
これをビットマップデータにしてメモリに記憶すると、
576ビットのメモリ容量が必要である。(コンピュー
タでは8ビットを1バイトとすることが多く、バイト単
位で表記すると、576ビットは72バイトとなる。以
降では、特に説明せずに8ビットを1バイトとする)。The dot data constructed as above is
When one dot is printed and one dot is not printed, one dot corresponds to one bit, which is 0 (indicates a binary number; hereinafter, described as 0b) and 1
RAM as bit map data represented by the binary value of b
And a memory such as a ROM. In the following, the dots to be printed will be bits 1b, and the dots not to be printed will be 0.
It will be described as a bit of b. For example, 24 dots x 24
In the dot data of dots, there are 576 dots,
When this is converted to bitmap data and stored in memory,
A memory capacity of 576 bits is required. (In a computer, 8 bits are often 1 byte, and when expressed in bytes, 576 bits is 72 bytes. Hereinafter, 8 bits are 1 byte without any particular explanation).
【0004】しかしながら、最近は文字を高品質に表示
したり、印字したりする要求が高まってきており、これ
に伴いドットデータを記憶するためのメモリがより多く
必要となってきている。例えば、24ドット×24ドッ
トのドットデータを記憶する場合では、72バイトで記
憶できたが、48ドット×48ドットのドットデータを
記憶する場合では、288バイトものメモリが必要であ
り、24ドット×24ドットの場合よりも4倍ものメモ
リが必要となる。また、最近では文字記憶装置に複数の
書体を備える場合があり、この場合もドットデータを記
憶するためのメモリがより多く必要である。例えば、4
つの書体を備える場合では、1書体の場合と比べて4倍
ものメモリが必要となる。However, recently, there has been an increasing demand for displaying and printing characters with high quality, and as a result, more memory for storing dot data is required. For example, when storing dot data of 24 dots x 24 dots, 72 bytes could be stored, but when storing dot data of 48 dots x 48 dots, 288 bytes of memory are required, and 24 dots x It requires four times as much memory as the 24-dot case. Further, recently, a character storage device may be provided with a plurality of typefaces, and in this case as well, more memory for storing dot data is required. For example, 4
When one typeface is provided, four times more memory is required than when one typeface is used.
【0005】そこで従来は、ランレングス圧縮などの多
くのデータ圧縮方法が用いられていた。ランレングス圧
縮は、ドットデータがビットマップデータとして記憶さ
れている場合、ビットマップデータ中で0bまたは1b
の連続する個数を交互に記憶する方法である。Therefore, in the past, many data compression methods such as run-length compression have been used. When the dot data is stored as bitmap data, the run length compression is 0b or 1b in the bitmap data.
Is a method of alternately storing the continuous number of.
【0006】[0006]
【発明が解決しようとする課題】しかしながら、上述し
たような文字記憶装置は、最近、装置自体の低コスト
化、或いは小型化を実現するために、ドットデータをよ
り少ないメモリ容量で記憶する要求が高まっている。そ
こで、従来は、0bまたは1bの連続する個数を交互に
記憶するランレングス圧縮などのデータ圧縮方法が用い
られている。しかし、従来のデータ圧縮方法は、すでに
性能の限界に達している。また、書体数を増加させて
も、圧縮による効果に変化が生じないために、書体数の
増加に比例して、ドットデータを記憶するためのメモリ
容量も増加していた。However, the character storage device as described above has recently been required to store dot data with a smaller memory capacity in order to realize cost reduction or size reduction of the device itself. It is rising. Therefore, conventionally, a data compression method such as run length compression in which a continuous number of 0b or 1b is alternately stored is used. However, the conventional data compression method has already reached the performance limit. Further, even if the number of typefaces is increased, the effect due to compression does not change, so the memory capacity for storing dot data also increases in proportion to the increase in the number of typefaces.
【0007】本発明は、上述したような従来の問題点を
解決するためになされたものであり、ドットデータ内に
類似のパターンが偏って出現するようにドットデータの
配置を変えることで、ランレングス圧縮などの効果を増
大させ、従来より少ないメモリ容量でドットデータを記
憶することができる文字記憶装置を提供する事を目的と
している。The present invention has been made in order to solve the above-mentioned conventional problems, and by changing the arrangement of dot data so that similar patterns appear unevenly in the dot data, It is an object of the present invention to provide a character storage device capable of storing dot data with a memory capacity smaller than conventional ones by increasing the effects of length compression and the like.
【0008】更には、複数の書体で文字を表した場合、
同じ文字の場合は書体が異なっていても形状が類似して
いる。そのため、複数の書体を備える文字記憶装置で
は、ドットデータ内に類似のパターンが偏って出現する
ようにドットデータの配置を変えることが容易になり、
ランレングス圧縮などの効果を増大させ、従来より少な
いメモリ容量で、ドットデータを記憶することができ
る。Further, when a character is represented by a plurality of typefaces,
In the case of the same letter, the shape is similar even if the typeface is different. Therefore, in a character storage device provided with a plurality of typefaces, it becomes easy to change the arrangement of dot data so that similar patterns appear unevenly in the dot data,
It is possible to increase the effects such as run length compression and store the dot data with a smaller memory capacity than the conventional one.
【0009】[0009]
【課題を解決するための手段】この目的を達成するため
に、本発明の請求項1に記載される文字記憶装置は、複
数の文字から文字群が構成されており、分割手段によ
り、その文字群を構成する文字のドットデータを、各文
字毎に複数のブロックに分割し、変換手段により、前記
文字群を構成する全ての文字から1つずつブロックを抽
出し、それらを集めた形のドットデータに変換し、圧縮
手段により、前記変換手段により変換されたドットデー
タを圧縮し、記憶手段により、その圧縮手段により圧縮
されたドットデータを記憶する。To achieve this object, in a character storage device according to claim 1 of the present invention, a character group is composed of a plurality of characters, and the character means is divided by a dividing means. The dot data of the characters forming the group is divided into a plurality of blocks for each character, the conversion means extracts one block from all the characters forming the character group, and the dots are collected. The dot data converted into data is compressed by the compression means, and the dot data converted by the conversion means is compressed. The storage means stores the dot data compressed by the compression means.
【0010】また、請求項2に記載される文字記憶装置
において、前記文字群を構成する複数の文字は、1つの
文字を複数の書体で表したものである。Further, in the character storage device according to the second aspect, the plurality of characters forming the character group are one character represented by a plurality of typefaces.
【0011】また、請求項3に記載される文字記憶装置
は、変換手段により、前記文字群を構成するそれぞれの
文字の同じ座標に存在するブロックを、全ての文字から
1つずつ抽出し、それらを集めた形のドットデータに変
換する。Further, in the character storage device according to a third aspect of the present invention, the conversion unit extracts, from the characters, one block existing at the same coordinate of each character forming the character group, and extracts the blocks. Is converted into dot data in the form of collection.
【0012】また、請求項4に記載される文字記憶装置
において、前記文字群を構成する文字に、ドットデータ
の大きさが異なる文字が含まれる場合、補正手段によ
り、前記文字群を構成する文字のドットデータの大きさ
を全て同じ大きさに補正し、前記補正手段で補正された
文字群を前記分割手段の入力とする。Further, in the character storage device according to the fourth aspect, when the characters forming the character group include characters having different dot data sizes, the correcting unit sets the characters forming the character group. The dot data are all corrected to the same size, and the character group corrected by the correcting means is input to the dividing means.
【0013】更には、請求項5に記載の文字記憶装置
は、記憶位置獲得手段により、前記記憶手段で記憶され
ている圧縮されたドットデータのうち、形状を復元した
い文字が属する文字群の、圧縮されたドットデータが記
憶されているアドレスを得て、展開手段により、前記記
憶位置獲得手段により得られたアドレスに記憶されてい
る圧縮されたドットデータを読み出して、圧縮される前
のドットデータに展開し、抽出手段により、前記展開手
段により展開されたドットデータの中から、形状を復元
したい文字のドットデータが記憶されている複数のブロ
ックを抽出し、復元手段により、前記抽出手段により抽
出された複数のブロックを用いて、文字の形状を復元す
る。Further, in the character storage device according to a fifth aspect of the present invention, among the compressed dot data stored in the storage means by the storage position acquisition means, a character group to which a character whose shape is desired to be restored belongs, The address at which the compressed dot data is stored is obtained, and the compressed dot data stored at the address obtained by the storage position acquisition unit is read by the decompressing unit to obtain the dot data before being compressed. A plurality of blocks storing dot data of a character whose shape is to be restored from the dot data developed by the developing means by the extracting means, and extracted by the extracting means by the restoring means. The shape of the character is restored using the plurality of blocks that have been created.
【0014】[0014]
【発明の実施の形態】以下、本発明の実施の形態につい
て図面を参照して説明する。本発明をドットプリンタに
適用した場合を用いて説明する。BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below with reference to the drawings. A case where the present invention is applied to a dot printer will be described.
【0015】なお、ドットデータは、通常、印字する部
分が1bのビット、印字しない部分が0bのビットで表
されるビットマップデータにして、メモリ等に記憶され
ることが広く行われている。そのため、ドットデータを
ビットマップデータにする処理については特に説明せず
に、記述する。The dot data is generally stored in a memory or the like as bitmap data in which a portion to be printed is represented by a bit of 1b and a portion not to be printed is represented by a bit of 0b. Therefore, the process of converting dot data into bitmap data will be described without any particular explanation.
【0016】図1はドットプリンタの制御回路の構成を
示すブロック図であり、この制御回路の主体をなすマイ
クロコンピュータ部1は、CPU2と、キャラクタメモ
リ3と、印字メモリ4と、プログラムROM5と、ドッ
トデータメモリ6と、ワークメモリ7とを備えている。
そして、それらはバス10によってCPU2と接続され
ており、バス10には更に入力部11および印字部12
が接続されている。FIG. 1 is a block diagram showing the configuration of the control circuit of the dot printer. The microcomputer unit 1 which is the main component of this control circuit has a CPU 2, a character memory 3, a print memory 4, a program ROM 5, and A dot data memory 6 and a work memory 7 are provided.
Then, they are connected to the CPU 2 by a bus 10, and the bus 10 further includes an input unit 11 and a printing unit 12.
Is connected.
【0017】続いて、上記各構成要素の概要を説明する
と、CPU2は、プログラムROM5に記憶される各種
プログラムに従ってプリンタ全体の動作制御を行うもの
であり、印字メモリ4は、印刷する文字の形状に関する
ドットデータを記憶するものであり、入力部11は、印
刷する文字に関する文字コード等の必要なデータをマイ
クロコンピュータ部1に対して入力するものである。Next, the outline of each of the above components will be described. The CPU 2 controls the operation of the entire printer according to various programs stored in the program ROM 5, and the print memory 4 relates to the shape of the characters to be printed. The dot data is stored, and the input unit 11 inputs necessary data such as a character code relating to a character to be printed to the microcomputer unit 1.
【0018】印字部12は、マイクロコンピュータ部1
からの指令に基づいて、文字の印刷を行う部分であり、
ワークメモリ7は、CPU2がプログラムに基づいて各
種処理を実行する際に、一時的に処理に必要なデータを
記憶するものである。The printing unit 12 is the microcomputer unit 1.
Is a part that prints characters based on commands from
The work memory 7 temporarily stores data necessary for processing when the CPU 2 executes various kinds of processing based on programs.
【0019】キャラクタメモリ3は、文字コードと、文
字コードに対応する文字のドットデータが記憶されてい
るドットデータメモリ6上の位置とを記憶するものであ
る。The character memory 3 stores a character code and a position on the dot data memory 6 in which dot data of a character corresponding to the character code is stored.
【0020】次に、図2は「H」の文字を4つの書体で
表した8ドット×8ドット(x軸の向きに8ドット×y
軸の向きに8ドット、という意味であり、以降では、特
に説明しない)の大きさのドットデータである。以降、
(a)乃至(d)を用いてそれぞれの文字及び書体を指
すものとする。特に書体を示すときは書体(a)のよう
に記述する。また、図中、黒で塗りつぶされている部分
は印字する部分を示し、一方、白の部分は印字しない部
分を示す。Next, in FIG. 2, the letter "H" is represented by four typefaces, 8 dots x 8 dots (8 dots x y in the direction of the x axis).
The dot data has a size of 8 dots in the direction of the axis, which will not be described below). Or later,
(A) to (d) are used to indicate respective characters and typefaces. In particular, when a typeface is shown, it is described as a typeface (a). Further, in the figure, a black-painted portion indicates a printed portion, while a white portion indicates a non-printed portion.
【0021】また、図5の(a)乃至(d)は、それぞ
れ、図2の(a)乃至(d)に示す「H」の文字のドッ
トデータを、それぞれ1×2ドットのブロックに分割し
た場合について示したものであり、各ブロックに示され
ている、a00、a01、b21などの記号は、各ブロ
ックを示す記号であり、例えば、a42とある場合は、
(a)の文字のx座標が4であり、y軸の向きにおい
て、y座標が4〜5の位置に存在するブロックを指す。Further, FIGS. 5A to 5D respectively divide the dot data of the character “H” shown in FIGS. 2A to 2D into blocks of 1 × 2 dots. The symbols such as a00, a01, and b21 shown in each block are symbols indicating each block. For example, in the case of a42,
The x-coordinate of the character in (a) is 4, and the y-coordinate indicates a block located at a position of 4-5 in the y-axis direction.
【0022】また、図中、灰色で塗りつぶされている部
分は、図2の(a)乃至(d)の黒で塗りつぶされてい
る部分に対応し、印字する部分を示す。また、白の部分
も図2の(a)乃至(d)の白で塗りつぶされている部
分に対応し、印字しない部分を示す。Further, in the figure, the gray-painted portion corresponds to the black-painted portion in FIGS. 2A to 2D and indicates the portion to be printed. Further, the white portions also correspond to the portions filled with white in FIGS. 2A to 2D and indicate the portions that are not printed.
【0023】前記ドットデータメモリ6は、文字の形状
に関するドットデータ等を記憶するものであり、詳細に
はドットデータメモリはドットデータ部及び、書体デー
タ部を有する。The dot data memory 6 stores dot data and the like relating to the shape of a character. Specifically, the dot data memory has a dot data section and a typeface data section.
【0024】ドットデータ部には、データ圧縮されたド
ットデータが記憶されている。The dot data section stores dot data that has been data-compressed.
【0025】また、書体データ部は詳細には書体コード
部及び、書体位置部及び、書体サイズ部とから構成され
ている。The typeface data section is specifically composed of a typeface code section, a typeface position section, and a typeface size section.
【0026】書体コード部には各書体を表すコードが記
憶されている。また、書体位置部にはブロックを集めて
記憶する際に、それぞれの書体に属する文字のブロック
が記憶される位置が記憶されており、書体サイズ部には
それぞれの書体に属する文字のドットデータの大きさが
記憶されている。A code representing each typeface is stored in the typeface code portion. In the typeface position section, the position where the blocks of the characters belonging to each typeface are stored when the blocks are collected and stored is stored, and the typeface size section stores the dot data of the characters belonging to each typeface. The size is remembered.
【0027】本説明では、書体位置部には、書体(a)
が1番目、書体(b)が2番目、書体(c)が3番目、
書体(d)が4番目、のように記憶されており、変換手
段では、この順番でそれぞれの書体に属する文字のブロ
ックを集めて記憶する。In this description, the font position (a) is set in the font position portion.
Is first, typeface (b) is second, typeface (c) is third,
The typeface (d) is stored as fourth, and the conversion unit collects and stores blocks of characters belonging to each typeface in this order.
【0028】さらに、書体(a)乃至、書体(d)に属
する文字のドットデータは、すべて8ドット×8ドット
であり、4つの書体それぞれに対応した書体サイズ部
に、8ドット×8ドットの大きさのドットデータである
ことが記憶されているものとする。Further, the dot data of the characters belonging to the typefaces (a) to (d) are all 8 dots × 8 dots, and there are 8 dots × 8 dots in the typeface size portion corresponding to each of the four typefaces. It is assumed that the size of the dot data is stored.
【0029】前記のような構成のドットプリンタで、図
2の(a)乃至(d)に示す4書体で表される「H」の
文字の8ドット×8ドットの大きさのドットデータを記
憶する場合の処理について、図4のフローチャートを用
いて説明する。また、ワークメモリ7の一部に、図2に
示すように4つの書体で表される「H」のドットデータ
が記憶されているものする。また、文字群が図2に示す
4つの文字から構成されていることとする。また、文字
群を構成するそれぞれの文字のドットデータを、図5に
示すように、1ドット×2ドットのブロックに均等に分
割する。また、文字群を構成するそれぞれの文字の同じ
座標にあるブロックを、全ての文字から1つずつ抽出
し、それらを集めた形のドットデータにする。The dot printer having the above-mentioned configuration stores the dot data of the size of 8 dots × 8 dots of the character “H” represented by the four typefaces shown in FIGS. 2 (a) to 2 (d). The processing in the case of doing will be described with reference to the flowchart of FIG. It is also assumed that a part of the work memory 7 stores "H" dot data represented by four typefaces as shown in FIG. Further, it is assumed that the character group is composed of four characters shown in FIG. Further, the dot data of each character forming the character group is equally divided into blocks of 1 dot × 2 dots as shown in FIG. In addition, the blocks at the same coordinates of the respective characters forming the character group are extracted one by one from all the characters, and are made into dot data in the form of collecting them.
【0030】まず、S41において、(a)乃至(d)
の文字のドットデータを、1ドット×2ドットの大きさ
のブロックに均等に分割する。尚、図10が分割された
状態を示す図である。尚、この処理が分割手段を構成す
る部分である。First, in S41, (a) to (d)
The dot data of the character is evenly divided into blocks each having a size of 1 dot × 2 dots. It is to be noted that FIG. 10 is a diagram showing a divided state. Incidentally, this processing is a part constituting the dividing means.
【0031】次に、S42〜S44において、それぞれ
の文字の同じ座標に存在するブロックを抽出し、それら
を集めた形に変換する。Next, in S42 to S44, blocks existing at the same coordinates of each character are extracted and converted into a collected form.
【0032】詳細には、まず、S42において、全ての
文字の、全てのブロックに対して処理が終了したか否か
を判別する。まだ、終了していないならば、S43へ進
み、終了したならばS45へ進む。Specifically, first, in S42, it is determined whether or not the processing has been completed for all blocks of all characters. If not finished yet, the process proceeds to S43, and if finished, the process proceeds to S45.
【0033】次に、S43において、(a)、(b)、
(c)、(d)の文字の同じ位置に存在するブロック
を、全ての文字から1つずつ読み込む。尚、S43の処
理が抽出手段に相当する。Next, in S43, (a), (b),
The blocks existing at the same positions of the characters (c) and (d) are read one by one from all the characters. The process of S43 corresponds to the extraction means.
【0034】次に、S44において、S43にて抽出し
たブロックを、(a)、(b)、(c)、(d)のブロ
ックの順にワークメモリ7に記憶し、S42へ進む。
尚、S44の処理が変換手段に相当する。Next, in S44, the blocks extracted in S43 are stored in the work memory 7 in the order of blocks (a), (b), (c), and (d), and the process proceeds to S42.
The process of S44 corresponds to the converting means.
【0035】S42〜S44の処理を具体例を挙げて説
明する。The processing of S42 to S44 will be described with a specific example.
【0036】まず、S42において、まだ処理が終了し
ていないと判別されるので、S43に進む。First, in S42, it is determined that the processing has not been completed, so the process proceeds to S43.
【0037】次に、S43において、a00、b00、
c00、d00のブロックを読み込む。Next, in S43, a00, b00,
The blocks of c00 and d00 are read.
【0038】次に、S44において、a00、b00、
c00、d00のブロックの順に、ワークメモリ7に記
憶し、S42へ進む。ビットマップデータで示すと、a
00は00b、b00は10b、c00は00b、d0
0は11bなので、00100011bのビットマップ
データがワークメモリ7に記憶される。Next, in S44, a00, b00,
The blocks c00 and d00 are stored in the work memory 7 in this order, and the process proceeds to S42. In terms of bitmap data, a
00 is 00b, b00 is 10b, c00 is 00b, d0
Since 0 is 11b, the bitmap data of 00100011b is stored in the work memory 7.
【0039】次に、S42において、まだ処理が終了し
ていないと判別されるので、S43に進む。Next, in S42, since it is determined that the processing has not been completed, the process proceeds to S43.
【0040】次に、S43において、a01、b01、
c01、d01のブロックを読み込み、S44において
a01、b01、c01、d01の順に記憶する。Next, in S43, a01, b01,
The blocks of c01 and d01 are read and stored in order of a01, b01, c01 and d01 in S44.
【0041】以降、a73、b73、c73、d73の
ブロックまで同様な処理を行う。Thereafter, the same processing is performed up to the blocks a73, b73, c73 and d73.
【0042】また、S42〜S44の処理を行うこと
で、特定のパターンがドットデータ内に偏って出現する
ようにドットデータを変換できる。例えば、a10、b
10、c10、d10のブロックを集める処理をする
と、11111111bのビットマップデータがワーク
メモリ7に記憶される。また、続いて行われる、a1
1、b11、c11、d11のブロックを集める処理、
a12、b12、c12、d12のブロックを集める処
理、a13、b13、c13、d13のブロックを集め
る処理においても、11111111bのビットマップ
データがワークメモリ7に記憶されることから、結局ワ
ークメモリ7には1bのビットが32ビット連続して記
憶され、1bのビットが偏って現れる。By performing the processing of S42 to S44, the dot data can be converted so that the specific pattern appears in the dot data in a biased manner. For example, a10, b
When the process of collecting the blocks of 10, c10, and d10, the bitmap data of 11111111b is stored in the work memory 7. In addition, the subsequent a1
Processing to collect blocks of 1, b11, c11, d11,
Even in the process of collecting the blocks of a12, b12, c12, d12 and the process of collecting the blocks of a13, b13, c13, d13, since the bitmap data of 11111111b is stored in the work memory 7, the work memory 7 ends up in the work memory 7. 32 bits of 1b are continuously stored, and the bits of 1b appear unevenly.
【0043】次に、S45において、S42〜S44の
処理において変換されたドットデータを圧縮手段を用い
て圧縮しワークメモリ7の一部に記憶する。尚、圧縮手
段としては、CPU2がプログラムROM5内の所定の
プログラムを用いて行う圧縮の処理がこれに相当してお
り、この処理には、既存のランレングス圧縮などを好適
に用いることが可能である。Next, in S45, the dot data converted in the processing of S42 to S44 is compressed by the compression means and stored in a part of the work memory 7. The compression means corresponds to a compression process performed by the CPU 2 using a predetermined program in the program ROM 5, and an existing run length compression or the like can be preferably used for this process. is there.
【0044】次に、S46において、S45で圧縮され
たデータを、記憶手段を用いてドットデータメモリ6に
記憶する。また、圧縮されたデータを記憶したドットデ
ータメモリ6上の位置をキャラクタメモリ3に記憶し、
このフローチャートを終了する。尚、S46の処理が記
憶手段を構成する部分である。また、S44までの処理
により、ドットデータ内に特定パターンが偏って出現し
ているので、圧縮手段による効果が従来より増すため、
従来より少ないメモリ容量でドットデータを記憶するこ
とができる。Next, in S46, the data compressed in S45 is stored in the dot data memory 6 using the storage means. Further, the position on the dot data memory 6 storing the compressed data is stored in the character memory 3,
This flowchart is finished. Incidentally, the processing of S46 is a part constituting a storage means. Further, since the specific pattern appears unevenly in the dot data due to the processing up to S44, the effect of the compression unit is increased compared to the conventional case,
It is possible to store dot data with a smaller memory capacity than before.
【0045】前記のように構成されるドットプリンタを
用いて、指定された文字を印字する場合の処理について
図3のフローチャートを用いて以下に説明する。A process for printing a designated character by using the dot printer configured as described above will be described below with reference to the flowchart of FIG.
【0046】文字を印字する指示を受けると、このフロ
ーチャートが実行される。文字を印字する際には、どの
文字を、どの書体で印字するという指示が出される。具
体例として、「H」を書体(c)で印字する例を交えな
がら説明する。また、図2の(a)乃至(d)に示すよ
うな、「H」の文字を4つの書体で表した8ドット×8
ドットの大きさのドットデータが、上述した図4のフロ
ーチャートの処理に則って記憶されているとする。When receiving an instruction to print characters, this flowchart is executed. When printing characters, an instruction is issued to print which character and which typeface. As a specific example, description will be given with an example in which “H” is printed in the typeface (c). In addition, as shown in FIGS. 2A to 2D, 8 dots × 8 in which the character “H” is represented by four typefaces
It is assumed that the dot data of the dot size is stored according to the processing of the flowchart of FIG. 4 described above.
【0047】まず、S31において、キャラクタメモリ
3から、印字する指示を受けた文字を含む文字群が記憶
されているドットデータメモリ6上のアドレスを読み出
す。文字を印字する指示は、当該文字に対応する文字コ
ードで与えられ、文字コードに対応するドットデータメ
モリ6上のアドレスを、キャラクタメモリ3から読み出
すこととなる。First, in S31, the address in the dot data memory 6 in which the character group including the character instructed to print is stored is read from the character memory 3. The instruction to print a character is given by the character code corresponding to the character, and the address on the dot data memory 6 corresponding to the character code is read from the character memory 3.
【0048】次に、S32において、S31で読み出さ
れた、ドットデータメモリ6のアドレスから、データを
読み出す。このデータは圧縮手段により圧縮されている
ので、展開手段によりデータを展開しながらワークメモ
リ7に記憶する。尚、S32の処理が展開手段を構成す
る部分である。また、この展開手段は、圧縮手段で圧縮
されたデータを展開するものであり、圧縮手段に対応し
た方法を用いる。Next, in S32, data is read from the address of the dot data memory 6 read in S31. Since this data is compressed by the compression means, it is stored in the work memory 7 while expanding the data by the expansion means. The process of S32 is a part that constitutes the expanding means. The decompression means is for decompressing the data compressed by the compression means, and uses a method corresponding to the compression means.
【0049】次に、S33において、指定された書体に
属する文字のブロックが記憶されている位置、及び、指
定された書体に属する文字のドットデータの大きさを、
ドットデータメモリ6の書体データ部より読み出す。各
書体にはそれぞれ書体コードが割り当てられており、書
体コードに対応している書体位置部から、指定された書
体に属する文字のブロックの位置が読み出され、書体サ
イズ部より、指定された書体に属する文字のドットデー
タの大きさが読み出される。本説明では、書体(c)は
3番目に記憶されていること、及び、ドットデータは8
ドット×8ドットの大きさであることが読み出される。
尚、S33の処理が記憶位置獲得手段を構成する部分で
ある。Next, in S33, the position where the block of characters belonging to the designated typeface is stored and the size of the dot data of the characters belonging to the designated typeface are
It is read from the typeface data section of the dot data memory 6. A typeface code is assigned to each typeface, and the position of the block of characters belonging to the specified typeface is read from the typeface position part corresponding to the typeface code, and the specified typeface is read from the typeface size part. The dot data size of the character belonging to is read. In this description, the typeface (c) is stored in the third place, and the dot data is 8
It is read that the size is dot × 8 dots.
The process of S33 is a part that constitutes the storage position acquisition means.
【0050】次に、S34及びS35において、S32
でワークメモリ7に記憶されたデータから、指定された
書体のブロックのみ取り出し、指定された書体のドット
データを復元し印字メモリ4に、記憶する。Next, in S34 and S35, S32
Then, only the block of the designated typeface is taken out from the data stored in the work memory 7, and the dot data of the designated typeface is restored and stored in the print memory 4.
【0051】詳細には、S34において、文字の復元が
終了したか否かを判別する。終了したならば、S36へ
進む。また、まだ終了していないならば、S35へ進
む。Specifically, in S34, it is determined whether or not the character restoration is completed. When finished, the process proceeds to S36. If not finished yet, the process proceeds to S35.
【0052】次に、S35において、ワークメモリ7か
ら、集められて記憶されたブロックの集合より、指定さ
れた書体に属する文字のブロックが記憶されている位置
(S33にて得られた)のブロックを読み出し、ワーク
メモリ7に記憶し、S34に進む。尚、ワークメモリ7
にブロックを記憶する際には、指定された書体に属する
文字のドットデータの大きさ(S33にて得られた)に
基づき、指定された書体を復元しつつ、ワークメモリ7
に記憶していく。Next, in S35, the block at the position (obtained in S33) at which the block of characters belonging to the designated typeface is stored from the set of blocks collected and stored from the work memory 7 Is read and stored in the work memory 7, and the process proceeds to S34. The work memory 7
When the block is stored in the work memory 7 while restoring the designated typeface based on the size of the dot data of the characters belonging to the designated typeface (obtained in S33).
I will remember.
【0053】以降、文字の復元を終えるまで、S34〜
S35をくり返す。尚、S34及び、S35の処理が抽
出手段及び、復元手段を構成する部分である。After that, until the character restoration is completed, S34-
Repeat S35. Incidentally, the processing of S34 and S35 is a part which constitutes the extraction means and the restoration means.
【0054】具体例としては、S32でワークメモリ7
に展開されたデータは、a00とb00とc00とd0
0のブロックが集められて記憶されており、以降、a7
3とb73とc73とd73のブロックまでそれぞれ集
められて記憶されている。書体(c)のデータは3番目
に記憶されているので、a00とb00とc00とd0
0のブロックが集められて記憶されているときは、c0
0を読み出しワークメモリ7に記憶する。次に、a01
とb01とc01とd01のブロックが集められて記憶
されているときは、c01を読み出し、ワークメモリ7
に記憶する。以降、同様な処理をくり返し、図5の
(c)に示すようなドットデータが得られるように復元
する。As a specific example, the work memory 7 in S32
The data expanded to is a00, b00, c00, d0
Blocks of 0 are collected and stored, and thereafter, a7
Blocks 3, 3, b73, c73, and d73 are collected and stored. Since the data for typeface (c) is stored in the third place, a00, b00, c00, and d0
When 0 blocks are collected and stored, c0
0 is read and stored in the work memory 7. Next, a01
When the blocks of b01, b01, c01, and d01 are collected and stored, c01 is read and the work memory 7
To memorize. After that, the same processing is repeated to restore the dot data as shown in FIG. 5C.
【0055】S36において、復元されたドットデータ
を印字メモリ4に転送し、印字処理を行う。In S36, the restored dot data is transferred to the print memory 4 and the print processing is performed.
【0056】尚、本発明の文字記憶装置は、以上詳述し
たような実施の形態に限定されるものではなく、その主
旨を逸脱しない範囲において、種々の変更が可能であ
る。The character storage device of the present invention is not limited to the embodiment described above in detail, and various modifications can be made without departing from the spirit of the invention.
【0057】また、文字群を構成する文字のドットデー
タの大きさが異なる場合においても、本発明を適用で
き、その際には、補正手段を用いてもよい。補正手段
は、複数の文字のドットデータのうち、最大の大きさを
持つドットデータに、他の文字のドットデータの大きさ
を変換する処理を行う。The present invention can be applied to the case where the dot data of the characters forming the character group have different sizes, and in that case, the correction means may be used. The correction means performs a process of converting the dot data of the other characters into the dot data having the largest size among the dot data of the plurality of characters.
【0058】また、1ドット×2ドットのブロックにド
ットデータを均等に分割したが、任意の大きさのブロッ
クに分割してもよい。Further, although the dot data is equally divided into blocks of 1 dot × 2 dots, it may be divided into blocks of any size.
【0059】また、8×8ドットの大きさのドットデー
タを用いて説明しているが、任意の大きさのドットデー
タに対しても同様に処理できる。Further, although the description has been made by using the dot data having a size of 8 × 8 dots, the dot data having an arbitrary size can be similarly processed.
【0060】また、書体の種類については特に指定して
いないが、どのような書体であっても差し支えない。The type of font is not specified, but any font may be used.
【0061】また、複数の書体に属する「H」という同
じ文字を用いて説明したが、違う文字において行っても
よい。Although the same letter "H" belonging to a plurality of typefaces has been used for explanation, different letters may be used.
【0062】また、複数の書体に属する文字について説
明したが、同じ書体に属する文字において同様の処理を
行ってもよい。Although the characters belonging to a plurality of fonts have been described, the same processing may be performed on characters belonging to the same font.
【0063】また、本発明を適用するのはドットプリン
タを用いて文字を印字する場合に限らず、ディスプレイ
等の表示装置に文字を表示させる場合にも用いてよい。Further, the present invention is not limited to the case of printing characters using a dot printer, but may be applied to the case of displaying characters on a display device such as a display.
【0064】また、本発明を適用するのはドットプリン
タに限らず、レーザープリンタなどの他の方法で印字す
るプリンタに適用することも可能である。The present invention can be applied not only to a dot printer but also to a printer that prints by another method such as a laser printer.
【0065】或いは、ワードプロセッサ、ワークステー
ション、パーソナルコンピュータ等の印字装置や、表示
装置を備える装置に適用してもよい。Alternatively, the present invention may be applied to a printing device such as a word processor, a workstation, a personal computer or the like, or a device having a display device.
【0066】[0066]
【発明の効果】以上説明したことから明らかなように、
請求項1記載の文字記憶装置によれば、文字群を構成す
る文字のドットデータに、分割手段及び変換手段を適用
することにより、類似のパターンが偏って出現するドッ
トデータに変換することができる。すると、ランレング
ス圧縮などのデータ圧縮法の圧縮が増大し、ドットデー
タをより少ないメモリ容量で記憶することができる。As is apparent from the above description,
According to the character storage device of the first aspect, by applying the dividing means and the converting means to the dot data of the characters forming the character group, it is possible to convert the dot data into the dot data in which similar patterns appear unevenly. . Then, the compression of the data compression method such as the run length compression is increased, and the dot data can be stored with a smaller memory capacity.
【0067】また、請求項2記載の文字記憶装置によれ
ば、前記文字群が、1つの文字を複数の書体で表したも
のから構成されている場合、同じ文字の場合は書体が異
なっていても形状が類似している。そのため、その文字
群に分割手段及び変換手段を適用することで、文字群に
属する文字のドットデータを、類似の形状が偏って出現
するドットデータに変換することが容易であり、ランレ
ングス圧縮などのデータ圧縮法の効率が増大し、ドット
データをより少ないメモリ容量で記憶することができ
る。Further, according to the character storage device of the second aspect, when the character group is composed of one character represented by a plurality of fonts, the same character has different fonts. Are similar in shape. Therefore, by applying the dividing means and the converting means to the character group, it is easy to convert the dot data of the characters belonging to the character group into the dot data in which similar shapes appear unevenly, such as run length compression. The efficiency of the data compression method is increased, and the dot data can be stored with a smaller memory capacity.
【0068】また、請求項3記載の文字記憶装置によれ
ば、ドットデータの大きさが同じ文字から文字群が構成
されているため、文字記憶装置の構成を請求項1記載の
ものより単純にできる。Further, according to the character storage device of the third aspect, since the character group is composed of the characters having the same dot data size, the character storage device has a simpler configuration than that of the first aspect. it can.
【0069】また、請求項4記載の文字記憶装置によれ
ば、ドットデータの大きさが異なる文字から文字群が構
成されている場合において、文字のドットデータの大き
さを全て同じ大きさにすることができる。そのため請求
項3の文字記憶装置の構成が利用でき、文字記憶装置の
構成を、請求項1記載のものより単純にできる。According to the character storage device of the fourth aspect, when the character group is composed of characters having different dot data sizes, all the dot data sizes of the characters are set to the same size. be able to. Therefore, the configuration of the character storage device according to claim 3 can be used, and the configuration of the character storage device can be made simpler than that according to claim 1.
【0070】また、請求項5記載の文字記憶装置によれ
ば、請求項1〜4の文字記憶装置で記憶された文字のド
ットデータを復元できる。According to the character storage device of the fifth aspect, the dot data of the character stored in the character storage device of the first to fourth aspects can be restored.
【図1】本発明を適用したドットプリンタの制御回路の
構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of a control circuit of a dot printer to which the present invention is applied.
【図2】文字「H」に関する各書体におけるドットデー
タを示す図である。FIG. 2 is a diagram showing dot data in each typeface related to a character “H”.
【図3】本発明を適用したドットプリンタで文字を印字
する際の処理を示すフローチャートである。FIG. 3 is a flowchart showing a process of printing characters by a dot printer to which the present invention is applied.
【図4】文字のドットデータを記憶する際の処理を示す
フローチャートである。FIG. 4 is a flowchart showing processing when storing dot data of characters.
【図5】図2に示すドットデータを1ドット×2ドット
に均等分割した様子を示す図である。FIG. 5 is a diagram showing a state in which the dot data shown in FIG. 2 is uniformly divided into 1 dot × 2 dots.
1 マイクロコンピュータ部 2 CPU 3 キャラクタメモリ 4 印字メモリ 5 プログラムROM 6 ドットデータメモリ 7 ワークメモリ 10 バス 11 入力部 12 印字部 1 Microcomputer Section 2 CPU 3 Character Memory 4 Printing Memory 5 Program ROM 6 Dot Data Memory 7 Work Memory 10 Bus 11 Input Section 12 Printing Section
Claims (5)
する文字記憶装置において、 複数の文字から文字群が構成されており、その文字群を
構成する文字のドットデータを、各文字毎に複数のブロ
ックに分割する分割手段と、 前記文字群を構成する全ての文字から1つずつブロック
を抽出し、それらを集めた形のドットデータに変換する
変換手段と、 その変換手段により変換されたドットデータを圧縮する
圧縮手段と、 その圧縮手段により圧縮されたドットデータを記憶する
記憶手段とを備えたことを特徴とする文字記憶装置。1. A character storage device for storing dot data relating to the shape of a character, wherein a character group is composed of a plurality of characters, and the dot data of the characters constituting the character group is divided into a plurality of blocks for each character. A dividing means for dividing into a plurality of characters, a converting means for extracting blocks one by one from all the characters constituting the character group, and converting the blocks into dot data in a collected form, and the dot data converted by the converting means. A character storage device comprising: a compression unit for compressing; and a storage unit for storing the dot data compressed by the compression unit.
で表したものから構成されていることを特徴とする請求
項1記載の文字記憶装置。2. The character storage device according to claim 1, wherein the character group is formed by representing one character in a plurality of typefaces.
それぞれの文字の同じ座標に存在するブロックを、全て
の文字から1つずつ抽出し、それらを集めた形のドット
データに変換することを特徴とする請求項1記載の文字
記憶装置。3. The converting means extracts, from each of the characters, blocks existing at the same coordinates of the respective characters forming the character group one by one, and converting the blocks into dot data in a collected form. The character storage device according to claim 1, wherein:
ータの大きさが異なる文字が含まれる場合、その文字群
を構成する文字のドットデータの大きさを全て同じ大き
さに補正する補正手段を備え、その補正手段で補正され
た文字群を前記分割手段の入力とすることを特徴とする
請求項3記載の文字記憶装置。4. When the characters forming the character group include characters having different dot data sizes, a correction unit for correcting all the dot data sizes of the characters forming the character group to the same size. 4. The character storage device according to claim 3, further comprising: a character group corrected by the correction means as an input of the dividing means.
たドットデータのうち、形状を復元したい文字が属する
文字群の圧縮されたドットデータが記憶されているアド
レスを得る記憶位置獲得手段と、 その記憶位置獲得手段により得られたアドレスに記憶さ
れている圧縮されたドットデータを読み出して、圧縮さ
れる前のドットデータに展開する展開手段と、 その展開手段により展開されたドットデータの中から、
形状を復元したい文字のドットデータが記憶されている
複数のブロックを抽出する抽出手段と、 その抽出手段により抽出された複数のブロックを用い
て、文字の形状を復元する復元手段とを備えたことを特
徴とする文字記憶装置。5. A storage position acquisition means for obtaining an address at which the compressed dot data of a character group to which a character whose shape is to be restored belongs is stored among the compressed dot data stored in the storage means, From the expansion means for reading the compressed dot data stored at the address obtained by the storage position acquisition means and expanding it to the dot data before compression, and the dot data expanded by the expansion means ,
An extracting unit that extracts a plurality of blocks in which dot data of a character whose shape is to be restored is stored, and a restoring unit that restores the shape of the character by using the plurality of blocks extracted by the extracting unit are provided. Character storage device characterized by.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP20227195A JPH0948160A (en) | 1995-08-08 | 1995-08-08 | Character storage |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP20227195A JPH0948160A (en) | 1995-08-08 | 1995-08-08 | Character storage |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0948160A true JPH0948160A (en) | 1997-02-18 |
Family
ID=16454780
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP20227195A Pending JPH0948160A (en) | 1995-08-08 | 1995-08-08 | Character storage |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0948160A (en) |
-
1995
- 1995-08-08 JP JP20227195A patent/JPH0948160A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0478304B1 (en) | Character output device | |
| KR960016739B1 (en) | Method of correctly aligning the line width of outline font | |
| JPH06328785A (en) | Method and apparatus for forming character | |
| JP2828592B2 (en) | Kerning treatment method | |
| JPH06106810A (en) | Image forming method and apparatus | |
| US5471676A (en) | Character data compressing method and character modifying method | |
| JPH0351894A (en) | Information processing device equipped with a character pattern generation function using vector fonts | |
| JP2887928B2 (en) | Image data output device | |
| JP2881924B2 (en) | Data storage device | |
| JP2972466B2 (en) | Dot pattern compression method and apparatus and output method and apparatus | |
| JP3116732B2 (en) | Lossless bitmap image compression method and method | |
| JP3221493B2 (en) | Dot character font compression / decompression methods and their control devices | |
| JP2005165160A (en) | Method of generating scalable font and method of displaying scalable font | |
| JP2001005440A (en) | Character data generator | |
| JPH087563B2 (en) | Figure pattern compression method and its restoration method | |
| JPH0346697A (en) | Outline font generation system | |
| JPH01210355A (en) | Character pattern generation | |
| JPH02287739A (en) | Memory access method | |
| JPH02287494A (en) | Character information compressing method | |
| JPH08305335A (en) | Character processor | |
| JPH07146672A (en) | Dot pattern compression method | |
| JPH1049129A (en) | Character pattern generation device, computer readable recording medium recording character pattern data, and computer readable recording medium recording character pattern generation program | |
| JPH0695642A (en) | Character / symbol pattern generator | |
| JPH05134647A (en) | Character processing method | |
| JPH06161424A (en) | Method for output processing of character data |