JPH05127648A - Compression device for outline font data - Google Patents

Compression device for outline font data

Info

Publication number
JPH05127648A
JPH05127648A JP3313877A JP31387791A JPH05127648A JP H05127648 A JPH05127648 A JP H05127648A JP 3313877 A JP3313877 A JP 3313877A JP 31387791 A JP31387791 A JP 31387791A JP H05127648 A JPH05127648 A JP H05127648A
Authority
JP
Japan
Prior art keywords
data
character
outline font
information
font 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
Application number
JP3313877A
Other languages
Japanese (ja)
Inventor
Hiroaki Suzuki
博顕 鈴木
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP3313877A priority Critical patent/JPH05127648A/en
Publication of JPH05127648A publication Critical patent/JPH05127648A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To decrease the capacity of a memory for holding outline font data. CONSTITUTION:A shared pattern extracting means 11 extracts the number of a character, which can be considered to be synthesized from a registered character list and extracts the character numbers of the main body and crown part constituting a composite character and a restoration information calculating means 12 expands the composite character to obtain the base points of the main body and crown part, expands the main body to obtain its base point, and expands the crown part to obtain its base point. The offset values of the main body and crown part are calculated to correct their offsets. An information adding means 13 additionally stores the offset values in the table when coordinate data on the main body and crown part of the composite character match each other.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、文字を印字データを構
成するアウトラインフォントデータの圧縮装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a device for compressing outline font data which constitutes print data of characters.

【0002】[0002]

【従来の技術】一般に、日本語のデスクトップ・パブリ
ッシング(DTP)システムを構築する場合に幾つかの
課題が残されているが、その一つとしてフォントの容量
をあげることができる。DTPでは多くの書体や文字サ
イズのフォントを取り扱うことが必須条件であるが、ア
ウトラインフォントは、文字サイズに注目するとビット
マップフォントに比べてデータ容量が小さいという利点
があり、また、変倍や回転を行う場合に文字の品質を維
持することができるという利点がある。このアウトライ
ンフォントは、図39に示すようなベゼー曲線により構
成されている場合、スタートポイントSと、エンドポイ
ントEと、コントロールポイントC1,C2の合計4つ
のポイントにより一つの曲線を構成する。
2. Description of the Related Art Generally, some problems remain when constructing a Japanese desktop publishing (DTP) system, and one of them is the font capacity. In DTP, it is indispensable to handle fonts of many typefaces and character sizes, but outline fonts have the advantage that the data capacity is smaller than bitmap fonts when attention is paid to character size, and scaling and rotation are also important. When doing, there is an advantage that the character quality can be maintained. When this outline font is composed of Beze curves as shown in FIG. 39, a start point S, an end point E, and a total of four points C1 and C2 form one curve.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、このア
ウトラインフォントは、マップフォントに比べてデータ
容量が小さいとはいえ、日本語の一書体ではJIS第
1、第2水準で約8000文字分より構成されるので、
データ量が膨大になる。また、アウトラインフォントは
図39に示すように、一つの曲線が四つのポイントによ
り構成されるので、複雑な漢字の場合には多くのデータ
量となり、一書体で約4Mバイトのデータ量となる。し
たがって、DTPシステムでは、使用頻度が高い数書体
分のアウトラインフォントデータをROM(リードオン
リメモリ)により内蔵し、他の書体のアウトラインフォ
ントデータをハードディスク装置等により保持する方法
が採用されている。
However, although the outline font has a smaller data capacity than the map font, one typeface in Japanese is composed of about 8000 characters according to the JIS 1st and 2nd levels. So
The amount of data becomes huge. In addition, as shown in FIG. 39, the outline font has a large amount of data in the case of a complicated Chinese character because one curve is composed of four points, and the amount of data in one typeface is about 4 Mbytes. Therefore, in the DTP system, a method is adopted in which outline font data for several typefaces which are frequently used are built in a ROM (read only memory) and outline font data of other typefaces are held by a hard disk device or the like.

【0004】本発明は上記従来の問題点に鑑み、アウト
ラインフォントデータを保持するためのメモリの容量を
低減することができるアウトラインフォントデータの圧
縮装置を提供することを目的とする。
In view of the above conventional problems, it is an object of the present invention to provide an outline font data compression apparatus capable of reducing the capacity of a memory for holding outline font data.

【0005】[0005]

【課題を解決するための手段】第1の手段は上記目的を
達成するために、文字の一部を共有化可能な図形のアウ
トラインフォントデータを抽出する図形抽出手段と、前
記図形抽出手段により抽出された図形により原文字を復
元するための情報を算出する復元情報算出手段と、前記
図形抽出手段により抽出された図形により構成される文
字であることを示す情報を付加する情報付加手段と、前
記図形抽出手段により抽出された図形と、前記復元情報
算出手段により算出された復元情報と、前記情報付加手
段により付加された情報を所定のフォーマットに構成し
て圧縮する圧縮手段とを備えたことを特徴とする。
In order to achieve the above object, the first means is to extract the outline font data of a graphic in which a part of a character can be shared, and the graphic extracting means. Restoration information calculating means for calculating information for restoring the original character by the drawn graphic, information adding means for adding information indicating that the character is composed of the graphic extracted by the graphic extracting means, A graphic unit extracted by the graphic extraction unit; the restoration information calculated by the restoration information calculation unit; and a compression unit configured to compress the information added by the information addition unit into a predetermined format. Characterize.

【0006】第2の手段は、文字のアウトラインフォン
トデータから1バイトを越えるデータを抽出する抽出手
段と、文字のデータ幅に対する出現頻度の分布の広がり
が小さくなるようなX進数を予め算出するX進数算出手
段と、前記抽出手段により抽出されたデータを前記X進
数で圧縮する圧縮手段とを備えたことを特徴とする。
The second means is an extracting means for extracting data exceeding 1 byte from the outline font data of the character, and an X-adic number for preliminarily calculating an X-adic number such that the spread of the distribution of the appearance frequency with respect to the data width of the character becomes small. It is characterized in that it is provided with a base number calculation means and a compression means for compressing the data extracted by the extraction means with the X base number.

【0007】第3の手段は、文字のアウトラインフォン
トデータをその情報ごとに階層化する階層化手段と、前
記階層化手段により階層化された各階層のデータの出現
頻度を算出する算出手段と、前記算出手段により算出さ
れた各階層の出現頻度により階層別の圧縮用置換テーブ
ルを作成して階層毎に圧縮する圧縮手段とを備えたこと
を特徴とする。
A third means is a hierarchizing means for hierarchizing the character outline font data for each information, and a calculating means for calculating the appearance frequency of the data of each hierarchy hierarchized by the hierarchizing means, And a compression unit that creates a compression replacement table for each layer based on the appearance frequency of each layer calculated by the calculation unit and compresses each layer.

【0008】第4の手段は、予めオリジナルのアウトラ
インフォントデータの曲線データを抽出してアウトライ
ンフォントデータをグループ化するグループ化手段と、
オリジナルのアウトラインフォントデータと前記グルー
プ化されたアウトラインフォントデータの差を算出して
圧縮する圧縮手段とを備えたことを特徴とする。
The fourth means is a grouping means for extracting the curve data of the original outline font data in advance and grouping the outline font data,
It is characterized by comprising compression means for calculating and compressing a difference between the original outline font data and the grouped outline font data.

【0009】第5の手段は、第1ないし第4の手段の圧
縮手段により圧縮された符号を更に可逆符号化により圧
縮する手段を備えたことを特徴とする。
The fifth means is characterized by further comprising means for further compressing the code compressed by the compression means of the first to fourth means by reversible encoding.

【0010】[0010]

【作用】第1の手段では上記構成により、文字の一部を
共有化可能な図形のアウトラインフォントデータが抽出
されて符号化されるので、文字を分解して圧縮すること
ができ、したがって、アウトラインフォントデータを保
持するためのメモリの容量を低減することができる。
According to the first means, the outline font data of the figure capable of sharing a part of the character is extracted and coded by the above-mentioned structure, so that the character can be decomposed and compressed. The capacity of the memory for holding the font data can be reduced.

【0011】第2の手段では、文字のデータ幅に対する
出現頻度の分布の広がりが小さくなるようなX進数が予
め算出され、1バイトを越える分のデータがこのX進数
で圧縮されるので、圧縮効率を向上させることができ
る。
In the second means, an X-adic number is calculated in advance so that the spread of the appearance frequency distribution with respect to the character data width is reduced, and data exceeding 1 byte is compressed with this X-adic number. The efficiency can be improved.

【0012】第3の手段では、文字のアウトラインフォ
ントデータがその情報ごとに階層化されて各階層のデー
タの出現頻度が算出され、この各階層の出現頻度により
階層別の圧縮用置換テーブルにより階層毎に圧縮される
ので、圧縮効率を向上させることができる。
In the third means, the outline font data of characters is hierarchized according to its information to calculate the appearance frequency of the data of each hierarchy, and the appearance frequency of each hierarchy is used to determine the hierarchy by the compression replacement table for each hierarchy. Since each is compressed, the compression efficiency can be improved.

【0013】第4の手段では、オリジナルのアウトライ
ンフォントデータとグループ化されたアウトラインフォ
ントデータの差が符号化されるので、圧縮効率を向上さ
せることができる。
In the fourth means, since the difference between the original outline font data and the grouped outline font data is encoded, the compression efficiency can be improved.

【0014】第5の手段では、第1ないし第4の手段の
圧縮手段により圧縮された符号を更に可逆符号化により
圧縮するので、可逆復号化により元のデータに復元する
ことができる、
In the fifth means, the code compressed by the compressing means of the first to fourth means is further compressed by lossless encoding, so that the original data can be restored by lossless decoding.

【0015】[0015]

【実施例】以下、図面を参照して本発明の実施例を説明
する。図1は本発明に係るアウトラインフォントデータ
の圧縮装置の一実施例を示すブロック図、図2は文字の
本体と冠を示す説明図、図3はアウトラインフォントデ
ータのオフセットを示す説明図、図4は復元動作の概略
を示す説明図、図5はアウトラインフォントデータの全
体構成を示す説明図、図6はアウトラインフォントデー
タの基点を示す説明図、図7は従来例と本実施例のアウ
トラインフォントデータの違いを示す説明図、図8およ
び図9は圧縮動作を説明するためのフローチャート、図
10は復元動作を説明するためのフローチャート、図1
1は可逆符号化を示す説明図である。
Embodiments of the present invention will be described below with reference to the drawings. 1 is a block diagram showing an embodiment of an outline font data compression apparatus according to the present invention, FIG. 2 is an explanatory diagram showing a main body and a crown of a character, FIG. 3 is an explanatory diagram showing an offset of outline font data, and FIG. Is an explanatory view showing the outline of the restoring operation, FIG. 5 is an explanatory view showing the overall structure of the outline font data, FIG. 6 is an explanatory view showing the base point of the outline font data, and FIG. 7 is the outline font data of the conventional example and this embodiment. 8 is a flow chart for explaining the compression operation, FIG. 10 is a flow chart for explaining the decompression operation, and FIG.
1 is an explanatory diagram showing lossless encoding.

【0016】以下、説明を容易にするために欧文書体を
例にして説明する。なお、欧文書体と日本語書体の大き
な違いは、文字の複雑さに起因するデータの容量差であ
るが、書体データのフォーマットは両者とも等しいの
で、欧文書体を圧縮する方法により日本語書体を圧縮す
ることができる。まず、欧文書体においてはアルファベ
ットの上部に図形を付加した文字が存在し、例えば図2
に示すようにドイツ語等における「aウムラウト」と呼
ばれる文字がある。なお、漢字などは、より複雑な組み
合わせにより構成される。
In order to facilitate the explanation, a European typeface will be described below as an example. The major difference between the European typeface and the Japanese typeface is the difference in data volume due to the complexity of the characters, but since the typeface data format is the same for both, the Japanese typeface is compressed by the method of compressing the European typeface. can do. First, in a European typeface, there are characters with graphics added to the upper part of the alphabet.
There is a character called "a umlaut" in German etc. as shown in. It should be noted that kanji and the like are configured by more complicated combinations.

【0017】ここで、アルファベット部「A」,「a」
を本体と呼び、この本体の上部に付加される図形を冠と
呼ぶことにすると、もし冠のオフセットを除く座標デー
タが等しいものとすると、図2(a)に示す大文字の冠
を図2(b)に示す小文字に利用することができる。す
なわち、このオフセットについて説明すると、図2
(a)に示す大文字の冠を図2(b)に示す小文字に利
用する場合には、xy方向に共に負の方向に移動しなけ
れば一致しない。
Here, the alphabet parts "A" and "a"
Is called the main body, and the figure added to the upper part of this main body is called the crown. If the coordinate data excluding the offset of the crown is the same, the uppercase crown shown in FIG. It can be used for lowercase letters shown in b). That is, the offset will be described with reference to FIG.
When the uppercase crown shown in (a) is used for the lowercase letters shown in FIG. 2 (b), they do not match unless they both move in the negative direction in the xy directions.

【0018】ところで、アウトラインフォントを構成す
るフォーマットの一例として図3に示すように、基点
(xs,ys)を基準として、この基準を移動しないか
ぎり、前点との相対値がコード化されている場合があ
り、オフセットの違いとは、この基点の違いを意味す
る。図4(a)に示すように冠だけの文字が登録されて
いる場合、この冠と図4(b)に示す本体により図2
(a)に示す大文字を復元することができ、同様にこの
冠と図4(c)に示す本体により図2(b)に示す小文
字を復元することができる。また、図4(a)に示す冠
だけの文字が登録されていない場合には、図2(a)に
示す大文字から冠データを抜き出して登録し、図2
(a)に示すオリジナルデータを削除することができ
る。
By the way, as shown in FIG. 3 as an example of the format of the outline font, the base point (xs, ys) is used as a reference, and unless this reference is moved, the relative value to the previous point is coded. In some cases, the difference in offset means the difference in this base point. When characters of only a crown are registered as shown in FIG. 4A, the crown and the main body shown in FIG.
The uppercase letters shown in (a) can be restored, and similarly, the lowercase letters shown in FIG. 2 (b) can be restored by this crown and the main body shown in FIG. 4 (c). Further, in the case where the characters of only the crown shown in FIG. 4 (a) are not registered, the crown data is extracted from the capital letters shown in FIG. 2 (a) and registered.
The original data shown in (a) can be deleted.

【0019】本実施例では図1に示すように、図形抽出
手段11により文字の一部を共有化可能な図形のアウト
ラインフォントデータを抽出し、復元情報算出手段12
により、図形抽出手段11により抽出された図形により
原文字を復元するための情報を算出し、情報付加手段1
3により、図形抽出手段11により抽出された図形によ
り構成される文字であることを示す情報を付加し、図形
抽出手段11により抽出された図形と、復元情報算出手
段12により算出された復元情報と、情報付加手段13
により付加された情報を圧縮手段14により所定のフォ
ーマットに構成して圧縮するように構成されている。し
たがって、このように共通の冠を有する文字が多いほど
データ量が少なくなる。本実施例ではまた、この圧縮デ
ータを可逆符号化手段15により更に圧縮して媒体に記
録し、出力の際に可逆復号化手段16により復号し、文
字展開手段17により元のアウトラインフォントデータ
に展開するように構成されている。
In the present embodiment, as shown in FIG. 1, the outline extracting font data of a graphic capable of sharing part of a character is extracted by the graphic extracting means 11, and the restoring information calculating means 12 is used.
The information adding means 1 calculates the information for restoring the original character by the graphic extracted by the graphic extracting means 11.
3, information indicating that it is a character composed of the figure extracted by the figure extracting means 11 is added, and the figure extracted by the figure extracting means 11 and the restoration information calculated by the restoration information calculating means 12 are added. , Information adding means 13
The information added by is compressed into a predetermined format by the compression means 14 and compressed. Therefore, the larger the number of characters having such a common crown, the smaller the amount of data. In the present embodiment, the compressed data is further compressed by the lossless encoding means 15 and recorded on the medium. When output, the lossless decoding means 16 decodes the compressed data and the character expanding means 17 expands the original outline font data. Is configured to.

【0020】つぎに、冠と本体を合成する場合、座標デ
ータにおけるオフセット以外の相対データが等しくない
場合には、オリジナルの文字を構成することができない
が、1文字分のアウトラインフォントデータには、図5
(b)に示すように座標データの他に文字固有のデータ
が付加されている。なお、図5(a)は1つの書体の全
データを示し、書体の名前、作成年月日、登録文字数等
のタイプフェース情報と、登録文字別の文字番号、デー
タの参照場所等の文字索引情報と、登録文字別のアウト
ラインフォントデータである文字情報により構成されて
いる。そして、図5(b)はこの文字情報の詳細な構造
を示し、文字補正用の固有データ「0」「1」と座標デ
ータにより構成されている。すなわち、この固有データ
は座標データと異なり、合成することができないので、
本実施例では座標データのみを圧縮するように構成され
ている。
Next, when the crown and the main body are combined, if the relative data other than the offset in the coordinate data are not equal, the original character cannot be constructed, but the outline font data for one character is Figure 5
As shown in (b), character-specific data is added in addition to the coordinate data. Note that FIG. 5A shows all the data of one typeface. Typeface information such as typeface name, creation date, number of registered characters, etc., and character index for each registered character, character reference such as data reference location, etc. It is composed of information and character information which is outline font data for each registered character. Then, FIG. 5B shows a detailed structure of this character information, which is composed of unique data “0” “1” for character correction and coordinate data. That is, unlike the coordinate data, this unique data cannot be combined, so
In this embodiment, only the coordinate data is compressed.

【0021】つぎに、実際のオフセットについて説明す
ると、図6に示すようにアウトラインデータの基点は、
1文字中に殆ど複数存在するので、冠と本体のオフセッ
トを算出するための基点が必要になる。ここで、図6に
示すような文字のように、データの格納順は、本体から
始まることが圧倒的に多く、この合成文字は基点s0→
s1→s2→s3の順、本体は基点s0→s1の順、冠
は基点s2→s3の順で登録される。したがって、これ
らの基点の順が違っていてもオフセットを算出すること
ができる。なお、例外として、冠の書き始め座標が合成
文字と冠単体の文字で異なる場合があるので、このよう
な文字のオフセットは算出しない。
Next, the actual offset will be explained. As shown in FIG. 6, the base point of the outline data is
Since there are almost a plurality of characters in one character, a base point for calculating the offset between the crown and the main body is required. Here, as in the case of the characters shown in FIG. 6, the data storage order is overwhelmingly started from the main body, and this synthetic character is the base point s0 →
The main body is registered in the order of s1 → s2 → s3, the main body is registered in the order of base points s0 → s1, and the crown is registered in the order of base points s2 → s3. Therefore, the offset can be calculated even if these base points are out of order. In addition, as an exception, since the writing start coordinates of the crown may be different between the combined character and the character of the crown alone, the offset of such a character is not calculated.

【0022】具体的には、各基点の間のデータを展開
し、図形を囲むことができる最小の長方形座標(例えば
左下と右上の2つの座標)を求める。図6における基点
s0〜s3の座標を下記の式(1)のようにすると、 sn:左下座標(xln,yln),(右上座標(xun,yun) (但し、n=0,1,2,3) …(1) 本体の基点s0の長方形が最大になり、基点s1の長方
形を包含することになる。そこで、この最大の長方形に
含まれる図形を本体と判定し、基点s0を本体のオフセ
ットを算出するために用いる。
Specifically, the data between each base point is developed, and the minimum rectangular coordinates (for example, two coordinates, lower left and upper right) that can surround the figure are obtained. When the coordinates of the base points s0 to s3 in FIG. 6 are represented by the following formula (1), sn: lower left coordinate (xln, yln), (upper right coordinate (xun, yun) (where n = 0, 1, 2, 3) (1) The rectangle of the base point s0 of the main body becomes the maximum, and the rectangle of the base point s1 is included.Therefore, the figure included in this maximum rectangle is determined as the main body, and the base point s0 is the offset of the main body. Used to calculate

【0023】また、本体と冠は、最大の長方形の外に存
在する総ての長方形を冠とみなすことにより区別するこ
とができ、したがって、図6に示す例では基点s2、s
3の各長方形を冠と判別することができる。なお、図6
に示すように冠が複数の部品により構成される場合に
は、最も左に位置する長方形の基点s2を冠のオフセッ
トを算出するために用いる。したがって、図6に示す文
字の本体と冠の各オフセットを次のように求めることが
できる。
Further, the main body and the crown can be distinguished by considering all the rectangles existing outside the largest rectangle as the crowns, and therefore, in the example shown in FIG.
Each rectangle of 3 can be discriminated as a crown. Note that FIG.
When the crown is composed of a plurality of parts as shown in, the leftmost rectangular base point s2 is used to calculate the offset of the crown. Therefore, each offset of the main body and the crown of the character shown in FIG. 6 can be calculated as follows.

【0024】 本体:(xl0,yl0) …(2) 冠 :(xl2,yl2) …(3) また、図2に示す文字を合成する場合、図4(a),
(b)に示すデータから同様な長方形の座標を求めるこ
とにより本体のオフセットを(xl0’,yl0’)、
冠のオフセットを(xl2’,yl2’)として求める
ことができるので、平行移動するためのオフセット量を
式(4),(5)により求めることができる。
Body: (xl0, yl0) (2) Crown: (xl2, yl2) (3) When the characters shown in FIG. 2 are combined, the characters shown in FIG.
By calculating the coordinates of a similar rectangle from the data shown in (b), the offset of the body is (xl0 ', yl0'),
Since the offset of the crown can be calculated as (xl2 ′, yl2 ′), the offset amount for the parallel movement can be calculated by the equations (4) and (5).

【0025】 本体:xh=xl0−xl0’,yh=yl0−yl0’ …(4) 冠 :xc=xl2−xl2’,xc=yl2−yl2’ …(5) つぎに、この移動量と、組み合わされる文字が格納され
ているエリアを変更して再登録する。ここで、図5
(b)に示す座標データを詳細に説明すると、アウトラ
インフォントデータの座標は一般に、1000×100
0を基準として格納されている。したがって、最大相対
値は、1バイトで表現可能な数「255」を越えるので
2バイトを要する場合がある。また、直線はxy方向の
一方の相対値が「0」になるので、座標を0〜2バイト
の範囲で可変長で符号化することにより低容量化するこ
とができるが、このように可変長で行う場合には長さを
決定するフラグが必要になる。すなわち、座標データは
式(6)に示す情報が繰り返されるが、式(6)のフォ
ーマットは式(7)に変換される。
Body: xh = xl0-xl0 ', yh = yl0-yl0' (4) Crown: xc = xl2-xl2 ', xc = yl2-yl2' (5) Next, this movement amount and combination Change the area in which the characters to be stored are stored and register again. Here, FIG.
To explain the coordinate data shown in (b) in detail, the coordinates of outline font data are generally 1000 × 100.
It is stored based on 0. Therefore, since the maximum relative value exceeds the number "255" that can be expressed by 1 byte, 2 bytes may be required. Also, since one of the relative values of the straight line in the xy direction is “0”, the capacity can be reduced by encoding the coordinates with a variable length in the range of 0 to 2 bytes. In the case of (1), a flag that determines the length is required. That is, the coordinate data repeats the information shown in Expression (6), but the format of Expression (6) is converted into Expression (7).

【0026】 座標データ:フラグ+座標+補正情報 …(6) フラグ+xh+yh+参照場所+フラグ+xc+yc+参照場所 …(7) 式(7)に示すフラグは、特殊フォーマットを認識する
ために用いられるが、可変長の判定や他の情報がビット
のオン、オフで設定されているので、空いているビット
の組合せで実現することができる。この処理によりデー
タ長を変更する必要があるが、この場合には新しいフォ
ーマットにより書き換えを行う間にバイト数をカウント
することにより、新たなデータ長を古いデータ長が格納
されているエリアに上書きすることができる。
Coordinate data: flag + coordinate + correction information (6) Flag + xh + yh + reference location + flag + xc + yc + reference location (7) The flag shown in equation (7) is used for recognizing the special format, but variable. Since length determination and other information are set by turning bits on and off, it can be realized by a combination of vacant bits. Although it is necessary to change the data length by this process, in this case, the new data length is overwritten in the area where the old data length is stored by counting the number of bytes while rewriting with the new format. be able to.

【0027】また、新フォーマットによりデータ量が低
減し、データの参照場所が変化するので、図5(a)に
示す文字索引情報の参照場所データを変更する必要があ
るが、全ての不要データをシフトすることにより新しい
フォントデータを作成することができる。すなわち、合
成文字は全く別のフォーマットで構成されるが、図1に
示す文字展開手段17により本体の参照場所から本体デ
ータを読み込み、オフセット移動量分だけ展開し、ま
た、冠も同様に処理することにより、オリジナルフォン
トデータと等価のデータを得ることができる。
Further, since the data amount is reduced and the data reference location is changed by the new format, it is necessary to change the reference location data of the character index information shown in FIG. 5A, but all unnecessary data is deleted. A new font data can be created by shifting. That is, although the synthetic character is constructed in a completely different format, the character expansion means 17 shown in FIG. 1 reads the main body data from the reference location of the main body, expands it by the offset movement amount, and similarly processes the crown. As a result, data equivalent to the original font data can be obtained.

【0028】ここで、従来例と本実施例の違いについて
説明すると、従来の生成課程では図7(a)に示すよう
に、文字情報を1回参照場所へ移動することにより文字
を生成するが、本実施例では図7(b)に示すように、
合成文字の情報を3回移動することにより文字を生成す
る。
Here, the difference between the conventional example and this embodiment will be described. In the conventional generation process, as shown in FIG. 7A, a character is generated by moving character information once to a reference place. In this embodiment, as shown in FIG.
A character is generated by moving the information of the composite character three times.

【0029】つぎに、図8を参照して上記圧縮動作を説
明すると、まず、図8に示す合成文字のテーブルを作成
するルーチンにおいて、登録文字リストから合成可能と
思われる文字番号を抽出し(ステップS1)、合成文字
を構成する本体と冠の文字番号を抽出し(ステップS
2)、文字数N、合成文字PN、本体MN、冠CNの文
字番号テーブルを作成する(ステップS3)。
Next, the compression operation will be described with reference to FIG. 8. First, in the routine for creating the table of composite characters shown in FIG. 8, character numbers which are considered to be compositable are extracted from the registered character list ( In step S1), the character numbers of the main body and the crown forming the composite character are extracted (step S1).
2) Create a character number table for the number of characters N, the composite character PN, the main body MN, and the crown CN (step S3).

【0030】ついで、文字数Nを示すカウンタiをクリ
アした後(ステップS4,S5)、カウンタiが示す番
号の合成文字PNを図6に示すように展開して本体M
N、冠CNの基点を得(ステップS6)、本体MNを展
開してその基点を得(ステップS7)、また、冠CNを
展開してその基点を得る(ステップS8)。そして、数
2により本体MN、冠CNのオフセット値を算出し(ス
テップS9)、数3によりオフセットを補正する(ステ
ップS10)。
Then, after the counter i indicating the number of characters N is cleared (steps S4 and S5), the composite character PN of the number indicated by the counter i is expanded as shown in FIG.
The base points of N and the crown CN are obtained (step S6), the main body MN is expanded to obtain the base point (step S7), and the crown CN is expanded to obtain the base point (step S8). Then, the offset values of the main body MN and the crown CN are calculated by Equation 2 (step S9), and the offset is corrected by Equation 3 (step S10).

【0031】ついで、合成文字PNの本体MN、冠CN
の座標データが一致しているか否かを判別し(ステップ
S11)、一致している場合にはテーブルにオフセット
値を追加して格納し(ステップS12)、他方、一致し
ていない場合にはテーブルから削除する(ステップS1
3)。そして、カウンタiをインクリメントし(ステッ
プS14)、ステップS5に戻って次の文字について同
様な処理を行い、全ての文字の処理を完了すると、この
合成文字テーブル作成ルーチンを終了する(ステップS
15)。
Next, the main body MN of the composite character PN and the crown CN
It is determined whether or not the coordinate data of the two match (step S11), and if they match, the offset value is added and stored in the table (step S12). Deleted from (step S1
3). Then, the counter i is incremented (step S14), the process returns to step S5, the same process is performed for the next character, and when the process for all the characters is completed, this synthetic character table creation routine is ended (step S).
15).

【0032】図9に示す新規フォントファイル作成ルー
チンでは、まず、オリジナルファイルRFから非圧縮部
の文字索引情報を最後まで読み込み、また、登録文字数
Mを得た後(ステップS21)、その情報を新規ファイ
ルWFにコピーする(ステップS22)。そして、登録
文字数Mを示すカウンタiをクリアした後(ステップS
23,S24)、i番目の文字索引部から参照場所など
の情報を読み込み(ステップS25)、前述した合成文
字テーブル内にその文字が存在する場合(ステップS2
6)にはステップS28以下に進み、存在しない場合に
はオリジナルファイルRFのデータを新規ファイルWF
に書き込む(ステップS27)。
In the new font file creation routine shown in FIG. 9, first, the character index information of the uncompressed portion is read from the original file RF to the end, and after the number of registered characters M is obtained (step S21), that information is newly created. Copy to the file WF (step S22). Then, after clearing the counter i indicating the number of registered characters M (step S
23, S24), information such as a reference location is read from the i-th character index portion (step S25), and the character exists in the above-mentioned composite character table (step S2).
In step 6), the data of the original file RF is replaced with the new file WF if it does not exist.
(Step S27).

【0033】ステップS28以下ではオリジナルファイ
ルRFの残照場所から図5(b)に示すような固有デー
タを読み込み、新規ファイルWFにコピーし(ステップ
S29)、新規ファイルWFに数5に示すような新フォ
ーマットを作成して書き込み(ステップS30)、デー
タ長や参照番号等の変更データを書き込む(ステップS
31)。そして、カウンタiをインクリメントし(ステ
ップS32)、ステップS24に戻って次の文字につい
て同様な処理を行い、全ての文字の処理を完了すると、
ステップS33に分岐する。ステップS33以下では可
逆符号により文字毎の圧縮変換テーブルを作成し、参照
場所を書き換え(ステップS34)、この新規フォント
ファイル作成ルーチンを終了する(ステップS35)。
In step S28 and thereafter, the unique data as shown in FIG. 5B is read from the afterglow location of the original file RF, copied to the new file WF (step S29), and the new file WF is updated as shown in Formula 5. Create a format and write it (step S30), and write change data such as data length and reference number (step S30).
31). Then, the counter i is incremented (step S32), the process returns to step S24, the same process is performed for the next character, and when the process for all the characters is completed,
It branches to step S33. In step S33 and thereafter, a compression conversion table for each character is created by the reversible code, the reference location is rewritten (step S34), and this new font file creation routine is finished (step S35).

【0034】つぎに、図10を参照してこの圧縮フォン
トデータの復元動作を説明する。まず、新規ファイルW
Fにおける書体が指定され(ステップS41)、その書
体の指定文字iが入力すると(ステップS42)、文字
索引部から文字番号iのデータを読み込み(ステップS
43)、参照場所のデータを上記圧縮変換テーブルによ
り置換してバッファに書き込み(ステップS44)、固
有データを文字展開部に送出する(ステップS45)。
ついで、ステップS46でこの文字が特殊フォーマット
である場合にはステップS48以下に進み、特殊フォー
マットでない場合にはステップS47に分岐して残りの
データを文字展開部に送出し、処理を終了する。
Next, the restoring operation of the compressed font data will be described with reference to FIG. First, the new file W
When the typeface in F is designated (step S41) and the designated character i of the typeface is input (step S42), the data of the character number i is read from the character index portion (step S41).
43), the data at the reference location is replaced by the compression conversion table and written in the buffer (step S44), and the unique data is sent to the character expansion unit (step S45).
Then, in step S46, if this character is in the special format, the process proceeds to step S48 and below, and if it is not the special format, the process branches to step S47 to send the remaining data to the character expanding unit, and the process is ended.

【0035】ステップS48以下では、参照場所のデー
タを変換テーブルにより全置換してバッファに書き込
み、本体の座標データのオフセットを補正して文字展開
部に送出し(ステップS49)、ついで、参照場所のデ
ータを変換テーブルにより全置換してバッファに書き込
み(ステップS50)、冠の座標データのオフセットを
補正して文字展開部に送出し(ステップS51)、この
復元処理を終了する。
In step S48 and subsequent steps, the reference location data is completely replaced by the conversion table and written in the buffer, the offset of the coordinate data of the main body is corrected and sent to the character expanding section (step S49), and then the reference location data is stored. The data is completely replaced by the conversion table and written in the buffer (step S50), the offset of the coordinate data of the crown is corrected and sent to the character expansion unit (step S51), and this restoration processing is ended.

【0036】ここで、本実施例におけるアウトラインフ
ォントデータの圧縮は、復号化する場合に完全に復元す
る必要があるので、図1に示すように可逆符号化が用い
られている。この場合、圧縮データが現データとは全く
異なっていても、図11に示すようにアウトラインフォ
ントを展開する装置から図示矢印方向に見たデータが現
データと変わらなければ圧縮データを完全に復元するこ
とができる。また、図4(a)においてタイプフェース
情報や文字索引部を圧縮すると、この情報を全て復号化
しないと文字情報を検索できないので、この実施例では
文字情報のみを圧縮するように構成されている。
Here, since the outline font data compression in this embodiment needs to be completely restored when decoding, lossless encoding is used as shown in FIG. In this case, even if the compressed data is completely different from the current data, if the data seen in the direction of the arrow in the figure from the device for expanding the outline font as shown in FIG. 11 is not the current data, the compressed data is completely restored. be able to. Further, when the typeface information and the character index portion are compressed in FIG. 4A, the character information cannot be retrieved unless all of this information is decoded, so that in this embodiment only the character information is compressed. ..

【0037】ここで、複数の書体の文字が混ざって出力
する場合には展開時間が問題になり、この問題は特に、
登録文字数が多い日本語の場合に顕著となる。また、圧
縮された文字情報を1かたまりで取り出さなければなら
ないが、圧縮データが可変長で符号化されるので、1文
字の最後の1バイトに満たない符号はビットを付加して
バイト単位に変換しなければならない。
Here, when the characters of a plurality of typefaces are mixed and output, the development time becomes a problem, and this problem is
This becomes noticeable when Japanese has a large number of registered characters. In addition, the compressed character information must be extracted as one block, but since the compressed data is encoded in a variable length, the code that is less than the last 1 byte of one character is converted into byte units by adding bits. Must.

【0038】図12は全横が1バイト単位で構成されて
ビット単位に8個に分割された例を示し、全ての文字を
一度に符号化すると、図12上方に示すようにビット単
位で連続しなくなる。そこで、図12下方に示すように
バイト単位で切り出すことができるように構成すること
により、参照場所からデータ長に相当する文字情報を欠
落することなく読み込むことができる。
FIG. 12 shows an example in which all sides are composed of 1-byte units and divided into 8 bit units. When all characters are encoded at once, as shown in the upper part of FIG. Will not do. Therefore, as shown in the lower part of FIG. 12, the character unit corresponding to the data length can be read from the reference location without omission by arranging to be able to cut out in byte units.

【0039】つぎに、この1バイトを単位として符号化
する第2の実施例について説明する。図12は従来例と
第2の実施例におけるデータの違いを示す説明図、図1
3は第2の実施例を示すブロック図、図14はデータを
バイト単位で示す説明図、図15,16は第2の実施例
の圧縮動作を説明するためのフローチャート、図17は
復元動作を説明するためのフローチャートである。
Next, a description will be given of a second embodiment in which this 1 byte is encoded as a unit. FIG. 12 is an explanatory diagram showing a difference in data between the conventional example and the second embodiment, and FIG.
3 is a block diagram showing the second embodiment, FIG. 14 is an explanatory diagram showing data in byte units, FIGS. 15 and 16 are flow charts for explaining the compression operation of the second embodiment, and FIG. 17 is a decompression operation. It is a flow chart for explaining.

【0040】アウトラインフォントデータは一般に、
1,2,4バイト長を単位として記録されているが、フ
ォントを形成するためには、あるフォーマットに準じて
データを読み込むことが必要であるので、読み込み時点
のバイト長は既知である。そこで、もしフォントデータ
が全て1バイト単位であると仮定すると、その1バイト
は符号無しで0〜255のデータ幅を有するので、エン
トロピを小さくするためにデータ幅を狭める処理が必要
になる。すなわち、0〜255のデータ幅を横軸として
そのデータの出現頻度(個数)の分布を縦軸とした場
合、任意のデータに集中した正規分布を形成し、かつ分
布の広がりが小さいという条件、すなわち標準偏差が小
さいという条件を満足するほど圧縮効率を向上すること
ができる。
Outline font data is generally
The length is recorded in units of 1, 2, and 4 bytes, but in order to form a font, it is necessary to read data in accordance with a certain format, and therefore the byte length at the time of reading is known. Therefore, if all the font data is assumed to be in 1-byte units, the 1-byte has a data width of 0 to 255 without a code. Therefore, it is necessary to reduce the data width in order to reduce entropy. That is, when the horizontal axis is the data width of 0 to 255 and the vertical axis is the distribution of the appearance frequency (number) of the data, a condition that a normal distribution concentrated on arbitrary data is formed and the spread of the distribution is small, That is, the compression efficiency can be improved as the condition that the standard deviation is small is satisfied.

【0041】そこで、最小単位である1バイトの情報が
それ自体操作することができないので、この第2の実施
例は図13に示すように、文字のアウトラインフォント
データから1バイトを越えるデータを抽出するデータ抽
出手段21と、文字のデータ幅に対する出現頻度の分布
の広がりが小さくなるようなX進数を予め算出するX進
数算出手段22と、データ抽出手段21により抽出され
たデータをこのX進数で圧縮する圧縮手段23を有し、
1バイトより大きい単位の情報を操作することにより、
エントロピを軽減するように構成されている。また、こ
の圧縮データを可逆符号化手段24により更に圧縮して
媒体に記録し、出力の際に可逆復号化手段25により復
号し、文字展開手段26により元のアウトラインフォン
トデータに展開する。
Therefore, since the minimum unit of 1 byte of information cannot be manipulated by itself, the second embodiment extracts data exceeding 1 byte from the outline font data of a character as shown in FIG. Data extracting means 21, an X-adic number calculating means 22 for pre-calculating an X-adic number such that the spread of the distribution of the appearance frequency with respect to the data width of the character becomes small, and the data extracted by the data extracting means 21 with this X-adic number. Having compression means 23 for compressing,
By manipulating information in units larger than 1 byte,
It is configured to reduce entropy. Further, this compressed data is further compressed by the lossless encoding means 24 and recorded on the medium, and upon output, it is decoded by the lossless decoding means 25 and expanded by the character expanding means 26 into the original outline font data.

【0042】図14に示すように2バイトの情報は、符
号無しで0〜65535個の範囲であり、符号化の際に
上位、下位の各1バイトの個数がカウントされるので、
上位バイトと下位バイトの各値が同様な値に近づけるこ
とによりエントロピを軽減することができる。そこで、
1バイトを越える情報をX進数表現のデータに置換する
ために、まず最適なX進数値を求める。なお、任意の値
は式(8),(9)により表すことができる。
As shown in FIG. 14, the 2-byte information is in the range of 0 to 65535 without a code, and the number of each upper and lower 1 byte is counted at the time of encoding.
Entropy can be reduced by bringing the values of the upper byte and the lower byte close to similar values. Therefore,
In order to replace information exceeding 1 byte with X-adic data, the optimum X-adic value is first obtained. Note that any value can be expressed by equations (8) and (9).

【0043】 aX+b=c …(8) a<X,b<X …(9) (但し、a:上位バイト値、b:下位バイト値) ここで、アウトラインフォントの基本単位が「100
0」でありこの値より大きく逸脱する座標関係のデータ
が存在しないので、上記値a,bは符号無しで「100
0」前後が最大値となる。また、他のデータ長について
も同様に、1文字当たりの値は「1000」に満たな
い。座標データは数4により、相対値が負、または基点
が負から始まる場合にもフラグが正負情報を含むので、
符号無し情報として扱うことができる。
AX + b = c (8) a <X, b <X (9) (where a: upper byte value, b: lower byte value) Here, the basic unit of the outline font is "100".
Since there is no coordinate-related data that deviates significantly from this value, the above values a and b are set to "100" without a sign.
The maximum value is around "0". Similarly, for other data lengths, the value per character is less than "1000". According to equation 4, the coordinate data includes positive / negative information even if the relative value is negative or the base point starts from negative.
It can be handled as unsigned information.

【0044】なお、図5に示す文字情報中のごく一部に
負のデータが存在し、符号ありの場合には最上位ビット
が「1」になるのでデータ幅が広がる。そこで、X進数
値を求める前に、これら少数の負の情報を正の情報に置
換するために、負の情報の最小値を抽出してこの最小値
が「0」になるようにオフセットを加える。なお、実際
に圧縮を行う文字情報は、1,2バイト単位で表現さ
れ、4バイト単位のデータが圧縮領域内に存在しない。
Note that negative data exists in a small part of the character information shown in FIG. 5, and when there is a sign, the most significant bit becomes "1", so that the data width widens. Therefore, in order to replace these small numbers of negative information with positive information before obtaining the X-adic value, the minimum value of the negative information is extracted and an offset is added so that this minimum value becomes "0". .. The character information that is actually compressed is expressed in units of 1 and 2 bytes, and data in units of 4 bytes does not exist in the compression area.

【0045】つぎに、全てが符号無しの2バイト情報か
ら最大値を抽出する。この最大値を数6の値cとし、ま
た、a=b=X−1とすると、Xは式(10)を満足す
る最小値により求めることができる。
Next, the maximum value is extracted from the 2-byte information, all of which are unsigned. If this maximum value is set to the value c of Equation 6 and a = b = X−1, X can be obtained by the minimum value that satisfies the expression (10).

【0046】 (X−1)・(X+1)>c …(10) 式(10)において例えばc=1050とすると、X=
33となり、また、通常は256進数でa、bが最大値
「255」となるが、このX進数では最大がX−1であ
るので、分布の広がりを抑えることができる。
(X−1) · (X + 1)> c (10) If, for example, c = 1050 in the equation (10), X =
33, and normally a and b have a maximum value of "255" in a 256-ary number, but the maximum in this X-ary number is X-1, so the spread of the distribution can be suppressed.

【0047】つぎに、図15を参照してこの圧縮動作を
説明すると、まず、図15のようにして上記X値と負数
の補正値を算出する。すなわちオリジナルファイルから
登録文字数Nを得(ステップS61)、この登録文字数
Nを示すカウンタiをクリアする(ステップS62,S
63)。ついで、i番目の文字の索引情報を検索部から
読み込み(ステップS64)、参照場所へ移行して最大
負数と2バイトの最大値を得る(ステップS65)。そ
して、カウンタiをインクリメントし(ステップS6
6)、ステップS63に戻って各文字の最大負数と2バ
イトの最大値を算出し(ステップS67)、ついで、最
大負数の絶対値を正数変換値とし、また、2バイトの最
大値からX値を算出する(ステップS68)。
Next, the compression operation will be described with reference to FIG. 15. First, the X value and the negative correction value are calculated as shown in FIG. That is, the registered character number N is obtained from the original file (step S61), and the counter i indicating the registered character number N is cleared (steps S62, S).
63). Then, the index information of the i-th character is read from the search unit (step S64), and the process moves to the reference location to obtain the maximum negative number and the maximum value of 2 bytes (step S65). Then, the counter i is incremented (step S6
6) Return to step S63, calculate the maximum negative number of each character and the maximum value of 2 bytes (step S67), then use the absolute value of the maximum negative number as a positive conversion value, and convert the maximum value of 2 bytes to X. The value is calculated (step S68).

【0048】そして、図16においてオリジナルファイ
ルRFから非圧縮部の文字索引情報を最後まで読み込
み、また、登録文字数Nを得た後(ステップS71)、
その情報を新規ファイルWFにコピーする(ステップS
72)。ついで、カウンタiをクリアし(ステップS7
3,S74)、i番目の文字情報部から参照場所などの
情報を読み込み(ステップS75)、文字情報部内の2
バイトデータをX進数で置換する(ステップS76)。
そして、カウンタiをインクリメントし(ステップS7
7)、ステップS74に戻って各文字をX進数で置換
し、ついで、第1の実施例において説明した可逆符号に
より文字毎の圧縮変換テーブルを作成し(ステップS7
8)、参照場所を書き換え(ステップS79)、この新
規フォントファイル作成ルーチンを終了する(ステップ
S80)。
Then, in FIG. 16, the character index information of the non-compressed portion is read to the end from the original file RF, and after the registered character number N is obtained (step S71).
Copy that information to the new file WF (step S
72). Then, the counter i is cleared (step S7
3, S74), information such as a reference place is read from the i-th character information section (step S75), and 2 in the character information section is read.
The byte data is replaced with an X-adic number (step S76).
Then, the counter i is incremented (step S7
7) Returning to step S74, each character is replaced with an X-adic number, and then a compression conversion table for each character is created by the lossless code described in the first embodiment (step S7).
8) The reference location is rewritten (step S79), and the new font file creation routine is finished (step S80).

【0049】つぎに、図17を参照してこの圧縮フォン
トデータの復元動作を説明する。まず、図10に示す場
合と同様に、新規ファイルWFにおける書体が指定され
(ステップS81)、その書体の指定文字iが入力する
と(ステップS82)、文字索引部から文字番号iのデ
ータを読み込み(ステップS83)、参照場所のデータ
を上記圧縮変換テーブルにより置換してバッファに書き
込む(ステップS84)。ついで、フォーマットに準じ
てデータを取り込んで2バイトデータを256進数に変
換し(ステップS85)、全ての文字データの変換を完
了するとそのデータを文字展開部に送出する(ステップ
S86)。
Next, the operation of restoring the compressed font data will be described with reference to FIG. First, as in the case shown in FIG. 10, when the typeface in the new file WF is designated (step S81) and the designated character i of the typeface is input (step S82), the data of the character number i is read from the character index portion ( In step S83), the data at the reference location is replaced by the compression conversion table and written in the buffer (step S84). Then, the data is taken in according to the format, the 2-byte data is converted into a 256-ary number (step S85), and when the conversion of all the character data is completed, the data is sent to the character expansion section (step S86).

【0050】つぎに、第3の実施例を説明する。図18
は第3の実施例を示すブロック図、図19はアウトライ
ンフォントデータの出現頻度を示す説明図、図20はフ
ラグ階層の出現頻度を示す説明図、図21は第3の実施
例の圧縮動作を説明するためのフローチャート、図22
は復元動作を説明するためのフローチャートである。
Next, a third embodiment will be described. FIG.
Is a block diagram showing the third embodiment, FIG. 19 is an explanatory diagram showing the appearance frequency of outline font data, FIG. 20 is an explanatory diagram showing the appearance frequency of flag hierarchies, and FIG. 21 is the compression operation of the third embodiment. FIG. 22 is a flowchart for explaining.
Is a flow chart for explaining the restoration operation.

【0051】第1の実施例において説明した図5及び式
(6)を参照すると、圧縮領域は1)固有データ
「0」、2)固有データ「1」、3)フラグ、4)座
標、5)補正情報の5階層に分類することができる。こ
の5階層を分類しない出現頻度の分布は、図19に示す
ように正規分布状に減衰せず、逆に符号Tにより示すよ
うに増加するひげ状部分が見られる。このひげ状部分は
両側の出現頻度を比べて異常であるので、いずれかの階
層の特徴が現れていると考えられる。
Referring to FIG. 5 and the equation (6) described in the first embodiment, the compression area is 1) unique data “0”, 2) unique data “1”, 3) flag, 4) coordinates, 5 ) It can be classified into five layers of correction information. The distribution of the appearance frequencies in which the five layers are not classified does not attenuate like a normal distribution as shown in FIG. 19, and conversely there is a whisker-like portion that increases as indicated by the symbol T. Since the whiskers are abnormal in appearance frequency on both sides, it is considered that the feature of one of the layers appears.

【0052】したがって、この分布を利用して高圧縮率
を実現することができないので、この第3の実施例では
図18に示すように、階層化手段31が文字のアウトラ
インフォントデータをその情報ごとに階層化し、算出手
段32が階層化手段31により階層化された各階層のデ
ータの出現頻度を算出し、圧縮手段33が算出手段32
により算出された各階層の出現頻度により階層別の圧縮
用置換テーブルを作成して階層毎に圧縮するように構成
されている。そして、この圧縮データを可逆符号化手段
34により更に圧縮して媒体に記録し、出力の際に可逆
復号化手段35により復号し、文字展開手段36により
元のアウトラインフォントデータに展開する。
Therefore, since it is not possible to realize a high compression rate by utilizing this distribution, in the third embodiment, as shown in FIG. 18, the layering means 31 sets the outline font data of the character for each information. And the calculating means 32 calculates the appearance frequency of the data of each hierarchy hierarchized by the hierarchizing means 31, and the compressing means 33 calculates by the calculating means 32.
A compression substitution table for each layer is created based on the appearance frequency of each layer calculated by the above, and compression is performed for each layer. Then, the compressed data is further compressed by the lossless encoding means 34 and recorded on the medium, and when output, decoded by the lossless decoding means 35, and expanded by the character expanding means 36 into the original outline font data.

【0053】この階層は全文字について相関が強く、1
文字についての各分布は類似傾向を示すが、この5階層
の中でデータ数が多い文字の場合にひげ状部分Tに大き
な影響を与える。すなわち、階層自体が全体に占める割
合が小さい場合に、本実施例を適用しない方法も考えら
れるが、この実施例では5階層の全てに適用する。5階
層毎の分布を取ると、いずれかが必ず正規分布と全く異
なる異常分布を示すはずであるが、データの性質上、
3)フラグ、5)補正情報の階層が異常分布を示す。こ
の理由は、フラグの性質上派生し、ビット操作によりデ
ータを形成しているからである。
This layer has a strong correlation for all characters and is 1
Although the distributions of the characters show similar tendencies, the whiskers T have a great influence in the case of a character having a large amount of data in the five layers. That is, when the ratio of the hierarchy itself to the whole is small, a method in which this embodiment is not applied can be considered, but in this embodiment, it is applied to all five hierarchies. If you take the distribution for each of the five layers, one of them should show an abnormal distribution that is completely different from the normal distribution, but due to the nature of the data,
The hierarchy of 3) flags and 5) correction information indicates the abnormal distribution. The reason is that it is derived from the nature of the flag and forms data by bit manipulation.

【0054】これらのデータは図20(a)に示すよう
に、所々欠いた櫛のような分布となるので、本実施例で
は各階層の分布をソートして図20(b)に示すような
置換テーブルを作成し、この置換テーブルにより当該階
層のソースデータを書き換える。そして、この置換テー
ブルにより図19に示すひげ上部分Tを消滅させて正規
分布に近い分布に補正し、全階層の置換終了後に再度圧
縮対象範囲の全分布を取り、符号化する。
As shown in FIG. 20 (a), these data have a comb-like distribution that is missing in some places. Therefore, in this embodiment, the distribution of each layer is sorted and as shown in FIG. 20 (b). A replacement table is created, and the source data of the layer is rewritten by this replacement table. Then, by using this replacement table, the whiskers T shown in FIG. 19 are eliminated and corrected to a distribution close to a normal distribution, and after the replacement of all layers is completed, the entire distribution of the compression target range is taken again and encoded.

【0055】つぎに、図21を参照してこの圧縮動作を
説明する。まず、図21において図15の場合と同様
に、オリジナルファイルから登録文字数Nを得(ステッ
プS91)、この登録文字数Nを示すカウンタiをクリ
アし(ステップS92、S93)、i番目の文字の索引
情報を検索部から読み込む(ステップS94)。つい
で、フォーマットに準じてデータを読み込んで階層別に
データのヒストグラムをバイト単位で取り(ステップS
95)、この処理を各文字について行う(ステップS9
6→S93)。そして、各ヒストグラムを大きい順にソ
ートし、最大データを「0」に設定することにより(ス
テップS97)この階層別置換テーブルを作成する(ス
テップS98)。
Next, this compression operation will be described with reference to FIG. First, in FIG. 21, as in the case of FIG. 15, the number N of registered characters is obtained from the original file (step S91), the counter i indicating the number N of registered characters is cleared (steps S92, S93), and the index of the i-th character is obtained. Information is read from the search unit (step S94). Then, the data is read according to the format, and the histogram of the data is obtained byte by byte for each layer (step S
95), this process is performed for each character (step S9).
6 → S93). Then, the respective histograms are sorted in descending order, and the maximum data is set to "0" (step S97) to create this hierarchical replacement table (step S98).

【0056】そして、図22において図16に示す場合
と同様に、オリジナルファイルRFから非圧縮部の文字
索引情報を最後まで読み込み、また、登録文字数Nを得
た後(ステップS101)、その情報を新規ファイルW
Fにコピーし(ステップS102)、カウンタiをクリ
アし(ステップS103,S104)、i番目の文字情
報部から参照場所などの情報を読み込む(ステップS1
05)。ついで、フォーマットに準じてデータを読み込
んでその階層の置換テーブルにより置換し(ステップS
106)、この処理を各文字について行う(ステップS
107→S104)。そして、図16に示す場合と同様
に、可逆符号により文字毎の圧縮変換テーブルを作成し
(ステップS108)、参照場所を書き換え(ステップ
S109)、この新規フォントファイル作成ルーチンを
終了する(ステップS110)。
Then, in FIG. 22, as in the case shown in FIG. 16, the character index information of the non-compressed portion is read from the original file RF to the end, and after the registered character number N is obtained (step S101), that information is read. New file W
Copy to F (step S102), clear counter i (steps S103 and S104), and read information such as a reference location from the i-th character information section (step S1).
05). Then, the data is read according to the format and replaced by the replacement table of that layer (step S
106), this process is performed for each character (step S
107 → S104). Then, similarly to the case shown in FIG. 16, a compression conversion table for each character is created by the lossless code (step S108), the reference location is rewritten (step S109), and this new font file creation routine is finished (step S110). ..

【0057】つぎに、図23を参照してこの復元動作を
説明する。まず、図17に示す場合と同様に、新規ファ
イルWFにおける書体が指定され(ステップS11
1)、その書体の指定文字iが入力すると(ステップS
112)、文字索引部から文字番号iのデータを読み込
み(ステップS113)、参照場所のデータを上記圧縮
変換テーブルにより置換してバッファに書き込む(ステ
ップS114)。ついで、フォーマットに準じてデータ
を取り込んでその階層の置換テーブルにより元のデータ
に変換し(ステップS115)、全ての文字データの変
換を完了するとそのデータを文字展開部に送出する(ス
テップS116)。
Next, this restoration operation will be described with reference to FIG. First, as in the case shown in FIG. 17, the typeface in the new file WF is designated (step S11).
1) When the designated letter i of the typeface is input (step S
112), the data of the character number i is read from the character index portion (step S113), the data at the reference location is replaced by the compression conversion table and written in the buffer (step S114). Then, the data is taken in according to the format and converted into the original data by the replacement table of the layer (step S115), and when the conversion of all the character data is completed, the data is sent to the character expansion section (step S116).

【0058】また、図19に示すように第1〜第3の実
施例を組み合わせてブロック化、X進数化、階層別置換
化するように構成してもよい。なお、図24において、
階層別置換化した後X進数化すると、せっかくのソート
が無意味であり、また、破線で示すブロック化は、容易
にブロック化することができない書体で行わない方がよ
い。
Further, as shown in FIG. 19, the first to third embodiments may be combined to form a block, an X-adic number, or a hierarchical permutation. In addition, in FIG.
If it is converted into X-adic numbers after permutation according to hierarchy, it is meaningless to sort it, and the blocking shown by the broken line should not be performed with a typeface that cannot be easily blocked.

【0059】ここで、第3の実施例のように階層別にヒ
ストグラムをソーティングして置換すると、分布のエン
トロピが低下するが、圧縮効率を更に高めるために4)
座標データ部に着目すると、座標データが他の階層と異
なって異常分布を示さず、正規分布を示す。したがっ
て、座標データを予測し、予測誤差を符号化することに
より、座標データ量を縮小して高圧縮率を実現すること
ができる。
Here, if the histograms are sorted and replaced for each layer as in the third embodiment, the entropy of the distribution decreases, but in order to further improve the compression efficiency, 4).
Focusing on the coordinate data part, the coordinate data does not show an abnormal distribution unlike the other layers, but shows a normal distribution. Therefore, by predicting the coordinate data and encoding the prediction error, the amount of coordinate data can be reduced and a high compression rate can be realized.

【0060】つぎに、第4の実施例を説明する。図25
は第4の実施例を示すブロック図、図26はベゼー曲線
を示す説明図、図27は単位パターンを示す説明図、図
28は図27の各単位パターンを示す説明図、図29は
第1単位パターンを示す説明図、図30は第2単位パタ
ーンを示す説明図、図31は第3単位パターンを示す説
明図、図32は第1〜第3単位パターンの組み合わせ例
を示す説明図、図33は第4の実施例におけるパターン
統合化の第1段階を説明するためのフローチャート、図
34はパターン統合化の第2段階とパターンファイル作
成を説明するためのフローチャート、図35はソースフ
ォントファイルの書き換え動作を説明するためのフロー
チャート、図36は圧縮動作を説明するためのフローチ
ャート、図37は復号化プロセスを説明するためのフロ
ーチャート、図38は差分算出方法を示す説明図であ
る。
Next, a fourth embodiment will be described. Figure 25
26 is a block diagram showing a fourth embodiment, FIG. 26 is an explanatory diagram showing a Beze curve, FIG. 27 is an explanatory diagram showing a unit pattern, FIG. 28 is an explanatory diagram showing each unit pattern of FIG. 27, and FIG. 29 is a first diagram. 30 is an explanatory diagram showing a unit pattern, FIG. 30 is an explanatory diagram showing a second unit pattern, FIG. 31 is an explanatory diagram showing a third unit pattern, and FIG. 32 is an explanatory diagram showing a combination example of first to third unit patterns. 33 is a flow chart for explaining the first stage of pattern integration in the fourth embodiment, FIG. 34 is a flow chart for explaining the second stage of pattern integration and pattern file creation, and FIG. 35 is for the source font file. FIG. 36 is a flowchart for explaining a rewriting operation, FIG. 36 is a flowchart for explaining a compression operation, FIG. 37 is a flowchart for explaining a decoding process, and FIG. Is an explanatory diagram showing a difference calculation process.

【0061】この実施例では図25に示すように、グル
ープ化手段41により例えば明朝体、教科書体をそれぞ
れ第1、第2パターンとして各曲線に近いパターンを選
出し、誤差圧縮手段42により近似パターンとの差を符
号化するように構成されている。まず、ベゼー曲線は図
26に示すように点P0〜P3で決定され、この前点と
の差分dxi,dyi(i=0〜2)を符号化すると、
通常dxi*dyi=0とした場合に水平線と垂直線が
特異パターンとなり、したがって、この特異パターンを
考慮しないと情報量が増加する。すなわち、水平線の場
合(dy0=0)にx座標情報が1〜2バイト、y座標
情報が0バイトとなるので、y座標情報が増加する。
In this embodiment, as shown in FIG. 25, the grouping means 41 selects, for example, the Mincho font and the textbook font as the first and second patterns, and patterns close to the respective curves are selected. It is configured to encode the difference from the pattern. First, the Beze curve is determined at points P0 to P3 as shown in FIG. 26, and when the differences dxi and dyi (i = 0 to 2) from the previous points are encoded,
Normally, when dxi * dyi = 0, the horizontal line and the vertical line form a peculiar pattern. Therefore, if this peculiar pattern is not taken into consideration, the amount of information increases. That is, in the case of a horizontal line (dy0 = 0), the x coordinate information is 1 to 2 bytes and the y coordinate information is 0 bytes, so that the y coordinate information increases.

【0062】また、曲線をパターン化するためには、任
意の曲線においてそのパターンが既知でなければならな
いので、本実施例では1バイトのパターン情報のビット
「0」〜「5」をパターン番号とし、ビット「6」,
「7」をxy座標の第1〜第4象限の情報として用い
る。すなわち、ビット「0」〜「5」をパターン番号は
最大64種類となる。したがって、図33のステップS
120において説明するようにパターン統合化の第1段
階として曲線の特徴を踏まえてパターンの分類数を大き
くし、ついで、図34に示すようにパターン統合化の第
2段階として最大パターン数(=64)以下となるよう
にパターンを統合化する。例えば図27に示す単位パタ
ーンを用い、第1単位パターンをdx0>0,dy0=
0とし、第2単位パターンをdx1>0,dy1=0と
し、第3単位パターン群を10個のパターン (dy2<0,dx2=0) (dy2<0,dx2>0,|dy2|>dx2) (dy2<0,dx2>0,|dy2|=dx2) (dy2<0,dx2>0,|dy2|<dx2) (dy2=0,dx2>0) (dy2>0,dx2>0,dy2<dx2) (dy2>0,dx2>0,dy2=dx2) (dy2>0,dx2>0,dy2>dx2) (dy2>0,dx2=0) (上記以外のdx2,dy2) にグループ化する。
Further, in order to pattern a curve, the pattern must be known in an arbitrary curve, so in the present embodiment, bits "0" to "5" of 1-byte pattern information are set as pattern numbers. , Bit “6”,
"7" is used as information of the first to fourth quadrants of the xy coordinates. That is, the maximum number of pattern numbers of the bits "0" to "5" is 64. Therefore, step S in FIG.
As described in 120, as the first step of pattern integration, the number of pattern classifications is increased in consideration of the characteristics of the curve, and then, as shown in FIG. 34, the maximum number of patterns (= 64) is set as the second step of pattern integration. ) Integrate the patterns so that: For example, using the unit pattern shown in FIG. 27, the first unit pattern is dx0> 0, dy0 =
0, the second unit pattern is dx1> 0, dy1 = 0, and the third unit pattern group is 10 patterns (dy2 <0, dx2 = 0) (dy2 <0, dx2> 0, | dy2 |> dx2 ) (Dy2 <0, dx2> 0, | dy2 | = dx2) (dy2 <0, dx2> 0, | dy2 | <dx2) (dy2 = 0, dx2> 0) (dy2> 0, dx2> 0, dy2 <Dx2) (dy2> 0, dx2> 0, dy2 = dx2) (dy2> 0, dx2> 0, dy2> dx2) (dy2> 0, dx2 = 0) (dx2, dy2 other than the above) ..

【0063】また、書体で使用される曲線がグループに
存在し、かつ少数である場合には、グループ内の最大数
を有するパターンに統合する。この場合、少数の判定に
は片側検定(統計)を利用し、例えば分布に棄却域5%
のときに、少数判定の閾値th、総パターン数Tとして
th=0.05*T/0.95とする。そして、 1)この閾値th以上のパターンを登録し、 2)1)を満足しないが少数のパターンが存在するとき
にグループ内の最大パターンを示すパターンを登録し、 3)2)において登録数>64のときに2)を削除し、 4)3)において登録数>64のときに1)を再統合す
る。
If the curve used in the typeface exists in the group and is small in number, it is integrated into the pattern having the maximum number in the group. In this case, a one-sided test (statistics) is used for a small number of judgments, and for example, the rejection range is 5%.
At this time, the threshold value th for the small number determination and the total pattern number T are th = 0.05 * T / 0.95. Then, 1) register a pattern that is equal to or larger than the threshold th, 2) register a pattern that does not satisfy 1) but shows the maximum pattern in the group when a small number of patterns exist, and 3) register the number in 2)> 2) is deleted when 64, and 4) 1) is reintegrated when the number of registrations> 64 in 3).

【0064】この単位パターンについて詳細に説明する
と、本実施例では図28〜図31に示すように、1曲線
を3個の単位パターンの集合としてある条件を設定し、
曲線を適度の数に分類する。例えば図26に示す点P
0、P1から成る直線を第1単位パターンとして図29
に示すように0°≦ang<90°の第1象限にあると
仮定する。この理由は、第1単位パターンが図示fのよ
うに90°≦ang<180°の第2象限にあるときに
y軸対象位置とし、図示gのように180°≦ang<
°270の第3象限にあるときに原点対象位置とし、図
示hのように270°≦ang<°360の第4象限に
あるときにx軸対象位置とすることにより、配置情報に
より回転することができるからである。
This unit pattern will be described in detail. In this embodiment, as shown in FIGS. 28 to 31, one curve is set as a set of three unit patterns, and a certain condition is set.
Classify the curve into a reasonable number. For example, point P shown in FIG.
The straight line consisting of 0 and P1 is used as the first unit pattern in FIG.
It is assumed that 0 ° ≦ ang <90 ° in the first quadrant as shown in FIG. The reason for this is that when the first unit pattern is in the second quadrant of 90 ° ≦ ang <180 ° as shown in the figure f, the y-axis target position is set, and 180 ° ≦ ang <as in the figure g.
Rotate according to the placement information by setting the origin target position when in the third quadrant of ° 270 and the x-axis target position when in the fourth quadrant of 270 ° ≦ ang <° 360 as shown in FIG. Because you can.

【0065】つぎに、図26に示す点P1,P2から成
る直線を第2単位パターンとしてこの存在場所を図30
に示すように第1、第4象限に限定する。また、点P
2、P3から成る直線を第3単位パターンとし、この第
3単位パターンの存在予測範囲を第2単位パターンの角
度に依存させる。例えば図31に示す太線が第2単位パ
ターンである場合、第3単位パターンは第2単位パター
ンの入射角度に対して±90°の範囲に仮定する。
Next, the straight line formed by the points P1 and P2 shown in FIG. 26 is used as the second unit pattern, and its existing location is shown in FIG.
It is limited to the first and fourth quadrants as shown in. Also, point P
A straight line composed of 2 and P3 is used as a third unit pattern, and the existence prediction range of this third unit pattern is made to depend on the angle of the second unit pattern. For example, when the thick line shown in FIG. 31 is the second unit pattern, it is assumed that the third unit pattern is within a range of ± 90 ° with respect to the incident angle of the second unit pattern.

【0066】図32は単位パターンの組み合わせ例を示
し、上記ルールによれば360種類程度に分類すること
ができ、この場合に上記仮定を満足しない曲線を除外パ
ターンとする。また、分類を行う場合にパターンの分類
数、隣接2点間距離の総和、角度の総和を保持する(図
34のステップS121〜S128)。そして、1書体
において第1段階の終了後、該当パターン数が多いもの
からパターン化する。図32において線i、jが非常に
少数の場合、隣接する太線パターンに代表させる。この
処理をパターン数が64以下になるように行って番号を
付し(第2段階)、最終パターンの決定後に各単位パタ
ーンの平均距離、平均角度すなわち極座標データを算出
する(図34のステップ129〜S131)。ここで、
平均距離Li、平均角度angi、係数kとすると、単
位パターンの統計xy長dxi',dyi' は式(11)
により求めることができる。
FIG. 32 shows an example of a combination of unit patterns, which can be classified into about 360 types according to the above rule, and in this case, a curve that does not satisfy the above assumption is used as an exclusion pattern. Further, when the classification is performed, the number of pattern classifications, the sum of the distances between two adjacent points, and the sum of the angles are held (steps S121 to S128 in FIG. 34). Then, in the one typeface, after the completion of the first step, the pattern having the corresponding number of patterns is patterned. When the number of lines i and j is very small in FIG. 32, they are represented by adjacent thick line patterns. This process is performed so that the number of patterns is 64 or less and numbered (second step), and after the final pattern is determined, the average distance and average angle of each unit pattern, that is, polar coordinate data are calculated (step 129 in FIG. 34). ~ S131). here,
Assuming the average distance Li, the average angle angi, and the coefficient k, the statistical xy lengths dxi ′ and dyi ′ of the unit pattern are given by the equation (11).
Can be obtained by

【0067】 tan-1(angi)=dyi’/dxi’ …(11) dyi’=kdxi’ …(12) dxi'2+dyi'2=Li2 …(13) したがって、上記処理により、(第1単位パターンの
x,y値+第2単位パターンのx,y値+第3単位パタ
ーンのx,y値)*パターン数のパターンファイルを形
成することができる(ステップS132)。
Tan −1 (angi) = dyi ′ / dxi ′ (11) dyi ′ = kdxi ′ (12) dxi '2 + dyi ' 2 = Li 2 (13) Therefore, according to the above process, (first) It is possible to form a pattern file of (x, y values of unit pattern + x, y values of second unit pattern + x, y values of third unit pattern) * the number of patterns (step S132).

【0068】つぎに、図35を参照してオリジナルのソ
ースアウトラインフォントデータを展開する場合につい
て説明すると、まず、図23に示すように曲線フォーマ
ットは、点P0が、 1)movoto 2)curveto 3)lineto であり、点P1、P2が制御点であり、点P3がcur
vetoであるので、曲線のみデータを抽出することは
容易である。
Next, the case of expanding the original source outline font data will be described with reference to FIG. 35. First, as shown in FIG. 23, in the curve format, the point P0 is 1) motoro 2) curveto 3). lineto, points P1 and P2 are control points, and point P3 is cur
Since it is veto, it is easy to extract data only from the curve.

【0069】書き換え処理はまず、オリジナル曲線を展
開して点P0が原点になるように曲線を平行移動し(ス
テップS141〜S145)、dx0,dy0から第1
単位パターンの角度を算出して配置情報を決定して第1
パターンが第1象限になるように回転し(ステップS1
46)、第1〜第3単位パターンによりパターン番号を
決定する(ステップS147)。そして、オリジナルパ
ターンとのxy値の差を算出し、点P1のデータの前に
パターン情報を付加し(ステップS148)、オリジナ
ルとの差分を符号化し(ステップS149)文字データ
の先頭を表すポインタやデータ長等を書き換える(ステ
ップS150)。この処理を各文字について行うと、フ
ァイルをクローズし(ステップS151)、新ファイル
に書き換える(ステップS152)。
In the rewriting process, first, the original curve is expanded and the curve is translated so that the point P0 becomes the origin (steps S141 to S145), and the first from dx0, dy0.
First, the angle of the unit pattern is calculated to determine the placement information.
Rotate the pattern so that it is in the first quadrant (step S1
46), the pattern number is determined by the first to third unit patterns (step S147). Then, the difference between the xy value and the original pattern is calculated, the pattern information is added before the data of the point P1 (step S148), the difference from the original is encoded (step S149), a pointer indicating the beginning of the character data, The data length and the like are rewritten (step S150). When this process is performed for each character, the file is closed (step S151) and rewritten with a new file (step S152).

【0070】また、図36に示すように第3の実施例
(図21,図22)と同様に、階層ごとにグループ分け
して置換テーブルにより置換し(ステップS161、S
162)、可逆符号化することにより圧縮効率を向上す
ることができる。つぎに、図37を参照して復号化プロ
セスを簡単に説明すると、文字番号が指定されると(ス
テップS171)、可逆復号化し(ステップS17
2)、置換テーブルにより階層ごとに復号化した後(ス
テップS173〜S175)、付加情報を読み込み(ス
テップS176)、指定パターンを回転し(ステップS
177)、ソースデータのxy座標値を求めることによ
り(ステップS178)、新座標値におけるアウトライ
ンフォントデータに展開する(ステップS179)。
Further, as shown in FIG. 36, similarly to the third embodiment (FIGS. 21 and 22), the layers are grouped and replaced by the replacement table (steps S161, S).
162), the compression efficiency can be improved by the lossless encoding. Next, the decoding process will be briefly described with reference to FIG. 37. When a character number is designated (step S171), lossless decoding is performed (step S17).
2) After decoding for each layer by the replacement table (steps S173 to S175), the additional information is read (step S176) and the designated pattern is rotated (step S).
177), by obtaining the xy coordinate values of the source data (step S178), the data is expanded to outline font data at the new coordinate values (step S179).

【0071】ここで、差分の算出方法は、基準の取り方
により2通りがある。すなわち、図38に示すようにオ
リジナル曲線の開始点(細線)とパターン開始点(太
線)を一致させた後、図38(a)に示すように全体の
パターンで扱う方法と、図38(b)に示すように各点
ごとに基準点を移動して単位パターンで扱う方法が考え
られる。また、1つのパターンは3つの固有の距離L0
〜L2を有するので、オリジナルと大きく異なるおそれ
があるが、オリジナルの第1単位パターンの距離との比
により第2、第3単位パターンを変倍することにより、
この問題点を解決することができる。また、第3の実施
例とこの第4の実施例を組み合わせることにより、圧縮
効率を更に向上することができる。
Here, there are two methods of calculating the difference, depending on how the reference is taken. That is, as shown in FIG. 38, after the start point (thin line) of the original curve and the pattern start point (thick line) are made to coincide with each other, a method of handling the entire pattern as shown in FIG. It is conceivable to move the reference point for each point as shown in FIG. Further, one pattern has three unique distances L0.
Since it has ~ L2, it may differ greatly from the original, but by scaling the second and third unit patterns according to the ratio with the distance of the original first unit pattern,
This problem can be solved. In addition, the compression efficiency can be further improved by combining the third embodiment and the fourth embodiment.

【0072】[0072]

【発明の効果】以上説明したように、請求項1記載の発
明は、文字の一部を共有化可能な図形のアウトラインフ
ォントデータを抽出する図形抽出手段と、前記図形抽出
手段により抽出された図形により原文字を復元するため
の情報を算出する復元情報算出手段と、前記図形抽出手
段により抽出された図形により構成される文字であるこ
とを示す情報を付加する情報付加手段と、前記図形抽出
手段により抽出された図形と、前記復元情報算出手段に
より算出された復元情報と、前記情報付加手段により付
加された情報を所定のフォーマットに構成して圧縮する
圧縮手段とを備えたので、文字を分解して圧縮すること
ができ、したがって、アウトラインフォントデータを保
持するためのメモリの容量を低減することができる。
As described above, according to the first aspect of the invention, the figure extracting means for extracting the outline font data of the figure capable of sharing a part of the character, and the figure extracted by the figure extracting means. Restoration information calculating means for calculating information for restoring the original character by means of, information adding means for adding information indicating that the character is composed of the figure extracted by the figure extracting means, and the figure extracting means Since the graphic extracted by the above, the restoration information calculated by the restoration information calculation means, and the compression means for compressing the information added by the information adding means in a predetermined format are compressed, the character is decomposed. It is possible to reduce the amount of memory for holding the outline font data.

【0073】請求項2記載の発明は、文字のアウトライ
ンフォントデータから1バイトを越えるデータを抽出す
る抽出手段と、文字のデータ幅に対する出現頻度の分布
の広がりが小さくなるようなX進数を予め算出するX進
数算出手段と、前記抽出手段により抽出されたデータを
前記X進数で圧縮する圧縮手段とを備えたので、1バイ
トを越える分のデータがこのX進数で圧縮され、したが
って、圧縮効率を向上させることができる。
According to the second aspect of the invention, the extraction means for extracting the data exceeding 1 byte from the outline font data of the character, and the X-adic number which preliminarily calculates the spread of the distribution of the appearance frequency with respect to the data width of the character are calculated in advance. Since the X-adic number calculating means and the compressing means for compressing the data extracted by the extracting means with the X-adic number are provided, data exceeding 1 byte is compressed with the X-adic number, and therefore the compression efficiency is improved. Can be improved.

【0074】請求項3記載の発明は、文字のアウトライ
ンフォントデータをその情報ごとに階層化する階層化手
段と、前記階層化手段により階層化された各階層のデー
タの出現頻度を算出する算出手段と、前記算出手段によ
り算出された各階層の出現頻度により階層別の圧縮用置
換テーブルを作成して階層毎に圧縮する圧縮手段とを備
えたので、この各階層の出現頻度により階層別の圧縮用
置換テーブルにより階層毎に圧縮され、したがって、圧
縮効率を向上させることができる。
According to a third aspect of the present invention, a hierarchizing means for hierarchizing the character outline font data for each information, and a calculating means for calculating the appearance frequency of the data of each hierarchy hierarchized by the hierarchizing means. And a compression unit that creates a compression replacement table for each layer based on the appearance frequency of each layer calculated by the calculation unit and compresses each layer, compression based on the appearance frequency of each layer. The compression table is used to compress each layer, and thus the compression efficiency can be improved.

【0075】請求項4記載の発明は、予めオリジナルの
アウトラインフォントデータの曲線データを抽出してア
ウトラインフォントデータをグループ化するグループ化
手段と、オリジナルのアウトラインフォントデータと前
記グループ化されたアウトラインフォントデータの差を
算出して圧縮する圧縮手段とを備えたので、圧縮効率を
向上させることができる。
According to a fourth aspect of the invention, grouping means for extracting the curve data of the original outline font data in advance to group the outline font data, the original outline font data and the grouped outline font data. Since the compression means for calculating and compressing the difference is provided, the compression efficiency can be improved.

【0076】請求項5記載の発明は、請求項1ないし4
の圧縮手段により圧縮された符号を更に可逆符号化によ
り圧縮する手段を備えたので、可逆復号化により元のデ
ータに復号することができる。
The invention according to claim 5 is the invention according to claims 1 to 4.
Since the code compressed by the compression means is further provided by means of lossless encoding, the original data can be decoded by lossless decoding.

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

【図1】本発明に係るアウトラインフォントデータの圧
縮装置の一実施例を示すブロック図である。
FIG. 1 is a block diagram showing an embodiment of an outline font data compression apparatus according to the present invention.

【図2】文字の本体と冠を示す説明図である。FIG. 2 is an explanatory diagram showing a main body and a crown of a character.

【図3】アウトラインフォントデータのオフセットを示
す説明図である。
FIG. 3 is an explanatory diagram showing an offset of outline font data.

【図4】復元動作の概略を示す説明図である。FIG. 4 is an explanatory diagram showing an outline of a restoration operation.

【図5】アウトラインフォントデータの全体構成を示す
説明図である。
FIG. 5 is an explanatory diagram showing an overall configuration of outline font data.

【図6】アウトラインフォントデータの基点を示す説明
図である。
FIG. 6 is an explanatory diagram showing base points of outline font data.

【図7】従来例と第1の実施例のアウトラインフォント
データの違いを示す説明図である。
FIG. 7 is an explanatory diagram showing a difference in outline font data between the conventional example and the first embodiment.

【図8】第1の実施例の圧縮動作を説明するためのフロ
ーチャートである。
FIG. 8 is a flow chart for explaining a compression operation of the first embodiment.

【図9】第1の実施例の圧縮動作を説明するためのフロ
ーチャートである。
FIG. 9 is a flowchart for explaining a compression operation of the first embodiment.

【図10】第1の実施例の復元動作を説明するためのフ
ローチャートである。
FIG. 10 is a flow chart for explaining a restoration operation of the first embodiment.

【図11】可逆符号化を示す説明図である。FIG. 11 is an explanatory diagram showing lossless encoding.

【図12】従来例と第2の実施例におけるデータの違い
を示す説明図である。
FIG. 12 is an explanatory diagram showing a difference in data between the conventional example and the second example.

【図13】第2の実施例を示すブロック図である。FIG. 13 is a block diagram showing a second embodiment.

【図14】データをバイト単位で示す説明図である。FIG. 14 is an explanatory diagram showing data in units of bytes.

【図15】第2の実施例の圧縮動作を説明するためのフ
ローチャートである。
FIG. 15 is a flowchart for explaining a compression operation of the second embodiment.

【図16】第2の実施例の圧縮動作を説明するためのフ
ローチャートである。
FIG. 16 is a flowchart for explaining a compression operation of the second embodiment.

【図17】第2の実施例の復元動作を説明するためのフ
ローチャートである。
FIG. 17 is a flow chart for explaining a restoring operation of the second embodiment.

【図18】第3の実施例を示すブロック図である。FIG. 18 is a block diagram showing a third embodiment.

【図19】アウトラインフォントデータの出現頻度を示
す説明図である。
FIG. 19 is an explanatory diagram showing the appearance frequency of outline font data.

【図20】フラグ階層の出現頻度を示す説明図である。FIG. 20 is an explanatory diagram showing an appearance frequency of a flag hierarchy.

【図21】第3の実施例の圧縮動作を説明するためのフ
ローチャートである。
FIG. 21 is a flow chart for explaining a compression operation of the third embodiment.

【図22】第3の実施例の圧縮動作を説明するためのフ
ローチャートである。
FIG. 22 is a flow chart for explaining the compression operation of the third embodiment.

【図23】第3の実施例の復元動作を説明するためのフ
ローチャートである。
FIG. 23 is a flow chart for explaining a restoration operation of the third embodiment.

【図24】第1〜第3の実施例を組み合わせた例を示す
ブロック図である。
FIG. 24 is a block diagram showing an example in which the first to third embodiments are combined.

【図25】第4の実施例を示すブロック図であるFIG. 25 is a block diagram showing a fourth embodiment.

【図26】ベゼー曲線を示す説明図である。FIG. 26 is an explanatory diagram showing a Beze curve.

【図27】単位パターンを示す説明図であるFIG. 27 is an explanatory diagram showing a unit pattern.

【図28】図27の各単位パターンを示す説明図であ
る。
28 is an explanatory diagram showing each unit pattern of FIG. 27. FIG.

【図29】第1単位パターンを示す説明図である。FIG. 29 is an explanatory diagram showing a first unit pattern.

【図30】第2単位パターンを示す説明図である。FIG. 30 is an explanatory diagram showing a second unit pattern.

【図31】第3単位パターンを示す説明図である。FIG. 31 is an explanatory diagram showing a third unit pattern.

【図32】第1〜第3単位パターンの組み合わせ例を示
す説明図である。
FIG. 32 is an explanatory diagram showing an example of a combination of first to third unit patterns.

【図33】第4の実施例におけるパターン統合化の第1
段階を説明するためのフローチャートである。
FIG. 33 is a first diagram of pattern integration in the fourth embodiment.
6 is a flowchart for explaining steps.

【図34】第4の実施例におけるパターン統合化の第2
段階とパターンファイル作成を説明するためのフローチ
ャートである。
FIG. 34 is a second diagram of pattern integration in the fourth embodiment.
6 is a flowchart for explaining steps and pattern file creation.

【図35】第4の実施例におけるソースフォントファイ
ルの書き換え動作を説明するためのフローチャートであ
る。
FIG. 35 is a flow chart for explaining a source font file rewriting operation in the fourth embodiment.

【図36】第4の実施例における圧縮動作を説明するた
めのフローチャートである。
FIG. 36 is a flow chart for explaining a compression operation in the fourth embodiment.

【図37】第4の実施例における復号化動作を説明する
ためのフローチャートである。
FIG. 37 is a flow chart for explaining a decoding operation in the fourth embodiment.

【図38】差分算出方法を示す説明図である。FIG. 38 is an explanatory diagram showing a difference calculation method.

【図39】ベゼー曲線のポイントを示す説明図である。FIG. 39 is an explanatory diagram showing points of a Beze curve.

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

11 共有化図形抽出手段 12 復元情報算出手段 13 情報付加手段 14 圧縮手段 15 可逆符号化手段 21 データ抽出手段 22 X進数算出手段 23 X進数圧縮手段 31 階層化手段 32 出現頻度算出手段 33 階層別圧縮手段 41 曲線別グループ化手段 42 誤差圧縮手段 11 shared figure extracting means 12 restoration information calculating means 13 information adding means 14 compression means 15 lossless encoding means 21 data extracting means 22 X-adic number calculating means 23 X-adic number compressing means 31 layering means 32 appearance frequency calculating means 33 layer-wise compression Means 41 Curve grouping means 42 Error compression means

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 文字の一部を共有化可能な図形のアウト
ラインフォントデータを抽出する図形抽出手段と、 前記図形抽出手段により抽出された図形により原文字を
復元するための情報を算出する復元情報算出手段と、 前記図形抽出手段により抽出された図形により構成され
る文字であることを示す情報を付加する情報付加手段
と、 前記図形抽出手段により抽出された図形と、前記復元情
報算出手段により算出された復元情報と、前記情報付加
手段により付加された情報を所定のフォーマットに構成
して圧縮する圧縮手段と、を備えたアウトラインフォン
トデータの圧縮装置。
1. A figure extracting means for extracting outline font data of a figure capable of sharing a part of a character, and restoration information for calculating information for restoring an original character by the figure extracted by the figure extracting means. Calculating means, information adding means for adding information indicating that the character is composed of the graphic extracted by the graphic extracting means, graphic extracted by the graphic extracting means, and calculated by the restoring information calculating means An outline font data compression device comprising: the restored information and a compression unit configured to compress the information added by the information adding unit into a predetermined format.
【請求項2】 文字のアウトラインフォントデータから
1バイトを越えるデータを抽出する抽出手段と、 文字のデータ幅に対する出現頻度の分布の広がりが小さ
くなるようなX進数を予め算出するX進数算出手段と、 前記抽出手段により抽出されたデータを前記X進数で圧
縮する圧縮手段と、を備えたアウトラインフォントデー
タの圧縮装置。
2. Extraction means for extracting data exceeding 1 byte from character outline font data, and X-adic number calculation means for pre-calculating an X-adic number such that the spread of the distribution of appearance frequency with respect to the character data width is reduced. An outline font data compression apparatus comprising: a compression unit that compresses the data extracted by the extraction unit using the X-adic number.
【請求項3】 文字のアウトラインフォントデータをそ
の情報ごとに階層化する階層化手段と、 前記階層化手段により階層化された各階層のデータの出
現頻度を算出する算出手段と、 前記算出手段により算出された各階層の出現頻度により
階層別の圧縮用置換テーブルを作成して階層毎に圧縮す
る圧縮手段と、を備えたアウトラインフォントデータの
圧縮装置。
3. A hierarchizing means for hierarchizing the character outline font data for each information, a calculating means for calculating the appearance frequency of the data of each hierarchy hierarchized by the hierarchizing means, and the calculating means. An outline font data compression apparatus, comprising: a compression unit that creates a compression replacement table for each layer based on the calculated appearance frequency of each layer and compresses each layer.
【請求項4】 予めオリジナルのアウトラインフォント
データの曲線データを抽出してアウトラインフォントデ
ータをグループ化するグループ化手段と、 オリジナルのアウトラインフォントデータと前記グルー
プ化されたアウトラインフォントデータの差を算出して
圧縮する圧縮手段と、を備えたアウトラインフォントデ
ータの圧縮装置。
4. A grouping means for extracting curve data of original outline font data in advance to group the outline font data, and calculating a difference between the original outline font data and the grouped outline font data. A compressor for compressing outline font data, comprising: compression means for compressing.
【請求項5】 前記圧縮手段により圧縮された符号を更
に可逆符号化により圧縮する手段を備えたことを特徴と
する請求項1ないし4のいずれかに記載のアウトライン
フォントデータの圧縮装置。
5. The outline font data compression apparatus according to claim 1, further comprising means for further compressing the code compressed by said compression means by reversible encoding.
JP3313877A 1991-10-31 1991-10-31 Compression device for outline font data Pending JPH05127648A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3313877A JPH05127648A (en) 1991-10-31 1991-10-31 Compression device for outline font data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3313877A JPH05127648A (en) 1991-10-31 1991-10-31 Compression device for outline font data

Publications (1)

Publication Number Publication Date
JPH05127648A true JPH05127648A (en) 1993-05-25

Family

ID=18046586

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3313877A Pending JPH05127648A (en) 1991-10-31 1991-10-31 Compression device for outline font data

Country Status (1)

Country Link
JP (1) JPH05127648A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0735496A1 (en) * 1995-03-30 1996-10-02 Eastern Graphics Technology Co. Ltd. A storage compression process for structural character & graphics
JP2008276247A (en) * 1994-05-16 2008-11-13 Monotype Imaging Inc Method and apparatus for storing and retrieving font data
JP2010504559A (en) * 2006-09-20 2010-02-12 アドビ システムズ, インコーポレイテッド Glyph rendering and encoding
US7676104B2 (en) 2005-09-29 2010-03-09 Fujitsu Limited Outline font compression method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008276247A (en) * 1994-05-16 2008-11-13 Monotype Imaging Inc Method and apparatus for storing and retrieving font data
EP0735496A1 (en) * 1995-03-30 1996-10-02 Eastern Graphics Technology Co. Ltd. A storage compression process for structural character & graphics
US7676104B2 (en) 2005-09-29 2010-03-09 Fujitsu Limited Outline font compression method
JP2010504559A (en) * 2006-09-20 2010-02-12 アドビ システムズ, インコーポレイテッド Glyph rendering and encoding

Similar Documents

Publication Publication Date Title
US5832530A (en) Method and apparatus for identifying words described in a portable electronic document
JP2581903B2 (en) Byte aligned data compression method and apparatus
EP0293161B1 (en) Character processing system with spelling check function
US7358874B2 (en) Data compression using a stream selector with edit-in-place capability for compressed data
US8712977B2 (en) Computer product, information retrieval method, and information retrieval apparatus
US8193954B2 (en) Computer product, information processing apparatus, and information search apparatus
JPH07505024A (en) Image compression method and device
US20160321282A1 (en) Extracting method, information processing method, computer product, extracting apparatus, and information processing apparatus
US9916314B2 (en) File extraction method, computer product, file extracting apparatus, and file extracting system
JPH09134157A (en) Hinting method and font file constituting method
US20100085222A1 (en) Information processing apparatus, information processing method, and computer product
US6701022B2 (en) Pattern matching coding device and method thereof
JP2009075887A (en) Information processing device and encoding method
US20050228811A1 (en) Method of and system for compressing and decompressing hierarchical data structures
JPH0520500A (en) Document recognizing device
JPH05127648A (en) Compression device for outline font data
JPH09134156A (en) Method for making outline font into strokes and parts
JP3449338B2 (en) Data compression method, data decompression method, and information processing device
JP2993540B2 (en) Ascending integer sequence data compression and decoding system
de Carvalho et al. Neighborhood coding for bilevel image compression and shape recognition
JPH0773013A (en) Data compressing method, data restoring method, and information processor
US9036926B2 (en) Bitmap processing mechanism
CN111737388B (en) Geological map data storage processing method
JP2005165160A (en) Method of generating scalable font and method of displaying scalable font
JPH0830794A (en) Image compression method