JP2629098B2 - Character arrangement correction method - Google Patents

Character arrangement correction method

Info

Publication number
JP2629098B2
JP2629098B2 JP3283412A JP28341291A JP2629098B2 JP 2629098 B2 JP2629098 B2 JP 2629098B2 JP 3283412 A JP3283412 A JP 3283412A JP 28341291 A JP28341291 A JP 28341291A JP 2629098 B2 JP2629098 B2 JP 2629098B2
Authority
JP
Japan
Prior art keywords
character
dot
page buffer
frame
host
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.)
Expired - Lifetime
Application number
JP3283412A
Other languages
Japanese (ja)
Other versions
JPH05119761A (en
Inventor
義和 村山
美貴子 吉田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP3283412A priority Critical patent/JP2629098B2/en
Publication of JPH05119761A publication Critical patent/JPH05119761A/en
Application granted granted Critical
Publication of JP2629098B2 publication Critical patent/JP2629098B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)
  • Document Processing Apparatus (AREA)
  • Digital Computer Display Output (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、ホストから送られてき
た文字列データの文字配置を補正する文字配置補正方式
であって、物理的な装置に依存しない仮想的な座標系で
作成した文字列データを、実際の紙に印刷などする装置
座標系で出力するときの文字配置を補正する文字配置補
正方式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character arrangement correction system for correcting the character arrangement of character string data sent from a host, and a character created in a virtual coordinate system independent of a physical device. The present invention relates to a character arrangement correction method for correcting a character arrangement when column data is output in an apparatus coordinate system for printing on actual paper.

【0002】[0002]

【従来の技術】文字列を描画する場合、ホストから送ら
れてくる文字列データ(物理的な装置に依存しない仮想
的なVDC座標系で作成された文字列データ)の各先頭
座標を、実際の紙に印刷などするVP座標系にそれぞれ
変換する必要がある。従来、この際に、ホストから送ら
れてくる大きさの違いからスケーリング(所定の比率で
例えば縮小する)を行う必要があり、実際の装置で印刷
する文字の1ドット以下の小数点が生じる。このため、
図6の(イ)に示すように、実際の装置のVP座標系で
示す文字枠サイズ(文字の描画対象域)は、ホストから
送られてくるVDC座標系の文字列データからスケーリ
ングした後の文字枠サイズの小数点以下を切り捨て、ペ
ージバッファコントロールテーブルPBCTに設定して
いた。また、実際の装置のVP座標系で表わす文字展開
座標は、ホストから送られてくるVPC座標系の文字列
データからスケーリングした後の文字移動量を四捨五入
して、1文字毎にページバッファPBに設定していた。
そして、これら設定したページバッファコントロールテ
ーブルPBCTおよびページバッファPBをもとに文字
を文字枠内の指定された座標に描画するようにしてい
た。
2. Description of the Related Art When rendering a character string, each head coordinate of character string data (character string data created in a virtual VDC coordinate system independent of a physical device) sent from a host is actually used. Needs to be converted into VP coordinate systems for printing on paper. Conventionally, at this time, it is necessary to perform scaling (for example, reducing at a predetermined ratio) based on a difference in size sent from the host, and a decimal point of 1 dot or less of a character to be printed by an actual device occurs. For this reason,
As shown in FIG. 6A, the character frame size (character drawing target area) shown in the VP coordinate system of the actual device is obtained by scaling the character string data in the VDC coordinate system sent from the host. The character frame size is rounded down to the decimal point and set in the page buffer control table PBCT. The character development coordinates represented by the VP coordinate system of the actual device are obtained by rounding the character movement amount after scaling from the character string data of the VPC coordinate system sent from the host, and storing the characters in the page buffer PB for each character. Was set.
Then, based on the set page buffer control table PBCT and page buffer PB, the character is drawn at the designated coordinates in the character frame.

【0003】[0003]

【発明が解決しようとする課題】従って、文字枠サイズ
は文字列の先頭で設定した属性に従い意識する。また、
文字の先頭の展開座標は、1文字づつ文字移動量を四捨
五入して設定していくため、文字枠サイズと、文字移動
量の差から、文字枠と文字枠の間に、図6の(ロ)の
に示すように、1ドットのすき間が生じてしまい、罫線
やアンダーラインが接続されないなどの問題が発生し
た。
Therefore, the size of the character frame is determined according to the attribute set at the head of the character string. Also,
Since the development coordinates at the beginning of a character are set by rounding off the character movement amount for each character, the difference between the character frame size and the character movement amount is set between the character frames in FIG. As shown in (1), a gap of one dot is generated, which causes a problem that a ruled line or an underline is not connected.

【0004】本発明は、ページバッファPBに文字情報
フラグを設け、文字枠と文字移動量とにドット差が生じ
たときに当該文字情報フラグをセットしておき、描画時
にこの文字情報フラグがセットされた文字枠を該ドット
差分拡張して描画し、文字枠と文字移動量の差によるド
ットのすき間の発生を無くし、罫線やアンダラインの接
続を可能にすることを目的としている。
According to the present invention, a character information flag is provided in the page buffer PB, the character information flag is set when a dot difference occurs between the character frame and the character movement amount, and the character information flag is set at the time of drawing. It is an object of the present invention to draw the drawn character frame by extending the dot difference, to eliminate the occurrence of a dot gap due to the difference between the character frame and the character movement amount, and to enable connection of ruled lines and underlines.

【0005】[0005]

【課題を解決するための手段】図1を参照して課題を解
決するための手段を説明する。図1において、ページバ
ッファコントロールテーブルPBCTは、ホストから送
られてきた文字列データについて、予め指定されたスケ
ーリングした文字枠サイズをドット単位で設定するもの
である。
Means for solving the problem will be described with reference to FIG. In FIG. 1, the page buffer control table PBCT sets a pre-designated scaled character frame size in units of dots for character string data sent from the host.

【0006】ページバッファPBは、ホストから送られ
てきた文字列データについて、予め指定されたスケーリ
ングした文字毎の移動量からドット単位で求めた展開座
標を設定および文字情報フラグ3を設けたものである。
The page buffer PB sets expansion coordinates obtained in units of dots from character string data sent from the host from a previously specified scaled movement amount for each character, and has a character information flag 3 provided. is there.

【0007】[0007]

【作用】本発明は、図1に示すように、ホストから送ら
れてきた文字列データについて、予め指定されたスケー
リングした文字毎にドット単位に求めた移動量と文字枠
サイズとにドット差が生じたときに文字情報フラグ3を
セットし、描画時にこの文字情報フラグ3がセットされ
ていた文字のときに、ページバッファコントロールテー
ブルPBCTに設定されている文字枠を該ドット差分拡
張して当該文字を描画し、文字枠と文字枠との間にすき
間が生じないようにしている。
According to the present invention, as shown in FIG. 1, for a character string data sent from a host, a dot difference between a movement amount and a character frame size obtained for each predetermined scaled character in dot units. When the character information flag 3 is set, the character frame set in the page buffer control table PBCT is expanded by the dot difference when the character has the character information flag 3 set at the time of drawing. Is drawn so that no gap is generated between the character frames.

【0008】この際、ホストから送られてきた文字列デ
ータについて、予め指定されたスケーリングした文字枠
サイズの小数点以下を切り捨ててドット単位とした文字
枠サイズを求めると共に、ホストから送られてきた文字
列データについて、予め指定されたスケーリングした文
字の移動量の小数点以下を四捨五入してドット単位で移
動量を求めるようにしている。
At this time, with respect to the character string data sent from the host, the character frame size in dot units is obtained by truncating the decimal portion of the scaled character frame size specified in advance, and the character frame data sent from the host is obtained. With respect to the column data, the amount of movement of the scaled character specified in advance is rounded off to the decimal point to obtain the amount of movement in dot units.

【0009】従って、ページバッファPBに文字情報フ
ラグ3を設け、文字毎に文字枠と文字移動量とにドット
差が生じたときに文字情報フラグ3をセットしておき、
描画時に文字情報フラグ3がセットされた文字枠を該ド
ット差分拡張して描画することにより、スケーリングに
伴う文字枠と文字移動量の差によるドットのすき間の発
生を無くし、罫線やアンダラインの接続を行うことが可
能となる。
Therefore, the character information flag 3 is provided in the page buffer PB, and the character information flag 3 is set when a dot difference occurs between the character frame and the character movement amount for each character.
The character frame in which the character information flag 3 is set at the time of drawing is drawn by extending the dot difference, thereby eliminating the occurrence of a dot gap due to the difference between the character frame and the character movement amount due to scaling, and connecting ruled lines and underlines. Can be performed.

【0010】[0010]

【実施例】次に、図1から図5を用いて本発明の実施例
の構成および動作を順次詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The construction and operation of an embodiment of the present invention will be described in order with reference to FIGS.

【0011】図1は、本発明の1実施例構成図を示す。
これは、ホストから文字列データの転送を受けた装置
(例えばプリンタ装置)が指定されたスケーリングをも
とに文字枠サイズおよび展開座標X、Yなどを求めてペ
ージバッファコントロールテーブルPBCTおよびペー
ジバッファPBに設定し、描画する場合の実施例構成図
である。
FIG. 1 is a block diagram showing one embodiment of the present invention.
This is because a device (for example, a printer) that has received the transfer of the character string data from the host obtains the character frame size and the development coordinates X, Y, etc. based on the designated scaling, and obtains the page buffer control table PBCT and the page buffer PB. FIG. 4 is a diagram illustrating an example of a configuration when drawing is performed.

【0012】図1において、文字列データは、ホストか
ら装置(例えばプリンタ装置)に送られてきた文字列デ
ータであって、文字列先頭座標X、文字列先頭座標Y、
文字コード/n個(文字の個数)から構成されるもので
ある。
In FIG. 1, character string data is character string data sent from a host to a device (for example, a printer), and includes character string head coordinates X, character string head coordinates Y,
It consists of character code / n (number of characters).

【0013】PBCTは、ページバッファコントロール
テーブルであって、文字枠サイズ、色、字体などの文字
属性情報を設定するものである。ここでは、右下に模式
的に示すように、指定されたスケーリングを行った後の
文字枠サイズX、Yを設定するものである(図2から図
5を用いて後述する)。
The PBCT is a page buffer control table for setting character attribute information such as character frame size, color, and font. Here, as schematically shown at the lower right, the character frame sizes X and Y after the designated scaling are set (described later with reference to FIGS. 2 to 5).

【0014】PBは、ページバッファであって、文字毎
の文字情報アドレス、スケーリングを行った後の展開座
標X、Y、文字枠オフセットX、Y、文字情報フラグ3
などを設定するものである。ここで、文字情報アドレス
は文字コードが格納されている先頭アドレスである。展
開座標X、Yは右下に模式的に示したように、文字を展
開する例えば左上の座標X、Yである。文字枠オフセッ
トX、Yは右下に示すように、文字枠から文字を描画す
る位置までのオフセットである。文字情報フラグ3は、
文字枠サイズを1ドット分拡張して描画するなどの情報
を設定するフラグである(図2を用いて後述する)。
PB is a page buffer, which is a character information address for each character, expanded coordinates X and Y after scaling, a character frame offset X and Y, a character information flag 3
And so on. Here, the character information address is the head address where the character code is stored. The development coordinates X and Y are, for example, upper left coordinates X and Y at which characters are developed, as schematically shown at the lower right. The character frame offsets X and Y are offsets from the character frame to the position where the character is drawn, as shown at the lower right. The character information flag 3 is
This is a flag for setting information such as drawing by expanding the character frame size by one dot (described later with reference to FIG. 2).

【0015】装置内データ解析部1は、ホストから転送
されてきた文字列データについて解析し、ページバッフ
ァコントロールテーブルPBCTに文字枠サイズを設定
したり、ページバッファPBに文字情報アドレス、展開
座標X、Y、文字枠オフセットX、Y、文字情報フラグ
3を設定したりなどするものである(図5のフローチャ
ート参照)。
The in-device data analysis unit 1 analyzes character string data transferred from the host, sets a character frame size in the page buffer control table PBCT, and stores character information addresses, development coordinates X, Y, the character frame offsets X and Y, and the character information flag 3 are set (see the flowchart in FIG. 5).

【0016】装置内描画部2は、装置内データ解析部1
によって設定されたページバッファコントロールテーブ
ルPBCTおよびページバッファPBをもとに文字を文
字枠に描画するものである(図5のフローチャート参
照)。
The in-apparatus drawing section 2 includes an in-apparatus data analysis section 1
The character is drawn in the character frame based on the page buffer control table PBCT and the page buffer PB set by (1) (see the flowchart of FIG. 5).

【0017】ページバッファコントロールテーブルPB
CTは、ホストから送られてきた文字列データについ
て、予め指定されたスケーリングしたドット単位の文字
枠サイズを設定するものである。
The page buffer control table PB
The CT sets a pre-designated scaled character frame size in dot units for character string data sent from the host.

【0018】ページバッファPBは、ホストから送られ
てきた文字列データについて、予め指定されたスケーリ
ングした文字毎の移動量からドット単位で求めた展開座
標を設定および文字情報フラグ3を設けたものである。
The page buffer PB is provided with character string data sent from the host and sets expansion coordinates obtained in dot units from the movement amount of each scaled character specified in advance, and is provided with a character information flag 3. is there.

【0019】右下の模式図は、装置内データ解析部1が
ホストから転送を受けた文字列データについて、予め指
定されたスケーリングを行って文字枠サイズ、文字移動
量を求めて展開座標X、Yを求めるときの様子を模式的
に表わしたものである。ここで、文字枠サイズは文字を
印刷などする枠であり、文字移動量はある文字から次の
文字までの移動量であり、文字枠オフセットは文字枠か
ら文字を描画する位置までのオフセットである。展開座
標X、Yは矢印を用いて示すように、文字枠内で文字を
展開する座標(例えば左上の座標)である。
The schematic diagram at the lower right shows that the in-device data analysis unit 1 performs a pre-specified scaling on the character string data transferred from the host, obtains a character frame size and a character movement amount, and obtains development coordinates X, This is a schematic representation of how to determine Y. Here, the character frame size is a frame for printing a character, the character movement amount is a movement amount from one character to the next character, and the character frame offset is an offset from the character frame to a position where a character is drawn. . The development coordinates X and Y are coordinates (for example, upper left coordinates) at which the characters are developed in the character frame as indicated by arrows.

【0020】図2は、本発明の文字情報フラグを示す。
これは、図1のページバッファPB内に設けた文字情報
フラグ3の例であって、図示のようなフラグを持ち、補
正時(フラグ4、フラグ6に“1”を設定した時)に当
該設定した文字枠の幅を1ドット分拡張したり、元の文
字枠サイズに戻したりするフラグである。
FIG. 2 shows a character information flag according to the present invention.
This is an example of the character information flag 3 provided in the page buffer PB of FIG. 1, and has a flag as shown in FIG. 1 and is set at the time of correction (when “1” is set to the flag 4 and the flag 6). This flag is used to extend the width of the set character frame by one dot or to return to the original character frame size.

【0021】フラグ4は、文字枠高さ補正(文字列方向
=上下) フラグ5は、文字枠高さを元に戻す(文字列方向=上
下) フラグ6は、文字枠幅補正(文字列方向=右、左) フラグ7は、文字枠幅を元に戻す(文字列方向=右、
左) 例えば後述する図3の(イ)の文字“C”のときに文字
情報フラグ3として“フラグ6”を設定し、次の文字
“D”のときの文字情報フラグ3として“フラグ7”を
設定する。これにより、描画時に、文字“C”のときに
文字枠サイズを1ドット分拡張して当該文字“C”を描
画し、次の文字“D”のときの文字枠サイズをもとの文
字枠サイズに戻して当該文字“D”を描画する。
Flag 4 is for correcting the character frame height (character string direction = up / down) Flag 5 is for returning the character frame height to the original (character string direction = up / down) Flag 6 is for correcting the character frame width (character string direction) = Right, left) The flag 7 returns the character frame width to the original (character string direction = right,
Left) For example, “flag 6” is set as the character information flag 3 for the character “C” in FIG. 3A (described later), and “flag 7” is set as the character information flag 3 for the next character “D”. Set. Thus, at the time of drawing, the character frame size is extended by one dot for the character "C" and the character "C" is drawn, and the character frame size for the next character "D" is changed to the original character frame size. Return to the size and draw the character "D".

【0022】まず、図3を用いて文字枠拡張時の概念を
説明する。図3の(イ)は、文字列=右の場合を示す。
これは、文字を順次右側に配置する場合のものであっ
て、次の文字の配置位置が現在の文字の配置位置に文字
枠サイズを加えた値よりも大きい時、現在の文字枠サイ
ズを1ドット分補正するものである。具体的に言えば、
左側に示すように次の文字“D”の配置位置が、現在の
文字“C”の文字枠サイズを加えた値よりも大きく(1
ドット分大きく)、すき間があくので、右側に示すよう
に現在の文字“C”の文字枠サイズを1ドット分拡張し
て補正し、すき間を無くする。
First, the concept of expanding the character frame will be described with reference to FIG. FIG. 3A shows the case where the character string = right.
This is a case in which characters are sequentially arranged on the right side, and when the position of the next character is larger than the value obtained by adding the character frame size to the current character arrangement position, the current character frame size is set to 1 This is to correct for the dots. Specifically,
As shown on the left side, the arrangement position of the next character "D" is larger than the value obtained by adding the character frame size of the current character "C" (1
Since there is a gap, the character frame size of the current character "C" is extended by one dot and corrected as shown on the right side to eliminate the gap.

【0023】図3の(ロ)は、文字列=左の場合を示
す。これは、文字を順次左側に配置する場合のものであ
って、次の文字の配置位置が現在の文字の配置位置に文
字枠サイズを加えた値よりも大きい時、次の文字枠サイ
ズを1ドット分補正するものである。具体的に言えば、
左側に示すように次の文字“D”の配置位置が、現在の
文字“C”の文字枠サイズを加えた値よりも大きく(1
ドット分大きく)、すき間があくので、右側に示すよう
に次の文字“D”の文字枠サイズを1ドット分拡張して
補正し、すき間を無くする。
FIG. 3B shows the case where the character string = left. This is a case where the characters are sequentially arranged on the left side. When the arrangement position of the next character is larger than the value obtained by adding the character frame size to the current character arrangement position, the next character frame size is set to 1 This is to correct for the dots. Specifically,
As shown on the left side, the arrangement position of the next character "D" is larger than the value obtained by adding the character frame size of the current character "C" (1
Since there is a gap, the character frame size of the next character "D" is extended by one dot and corrected as shown on the right side to eliminate the gap.

【0024】図3の(ハ)は、文字列=下の場合を示
す。これは、文字を順次下側に配置する場合のものであ
って、次の文字の配置位置が現在の文字の配置位置に文
字枠サイズを加えた値よりも大きい時、現在の文字枠サ
イズを1ドット分補正するものである。具体的に言え
ば、左側に示すように次の文字“D”の配置位置が、現
在の文字“C”の文字枠サイズを加えた値よりも大きく
(1ドット分大きく)、すき間があくので、右側に示す
ように現在の文字“C”の文字枠サイズを1ドット分拡
張して補正し、すき間を無くする。
FIG. 3C shows the case where the character string is lower. This is the case where characters are sequentially arranged on the lower side, and when the position of the next character is larger than the value obtained by adding the character frame size to the current character position, the current character frame size is changed. The correction is performed for one dot. Specifically, as shown on the left side, the arrangement position of the next character "D" is larger than the value obtained by adding the character frame size of the current character "C" (larger by one dot), and there is a gap. As shown on the right, the character frame size of the current character "C" is extended and corrected by one dot to eliminate the gap.

【0025】図3の(ニ)は、文字列=上の場合を示
す。これは、文字を順次上側に配置する場合のものであ
って、次の文字の配置位置が現在の文字の配置位置に文
字枠サイズを加えた値よりも大きい時、次の文字枠サイ
ズを1ドット分補正するものである。具体的に言えば、
左側に示すように次の文字“D”の配置位置が、現在の
文字“C”の文字枠サイズを加えた値よりも大きく(1
ドット分大きく)、すき間があくので、右側に示すよう
に次の文字“D”の文字枠サイズを1ドット分拡張して
補正し、すき間を無くする。
FIG. 3D shows the case where the character string = above. This is a case in which the characters are sequentially arranged on the upper side, and when the position of the next character is larger than the value obtained by adding the character frame size to the current character arrangement position, the next character frame size is set to 1 This is to correct for the dots. Specifically,
As shown on the left side, the arrangement position of the next character "D" is larger than the value obtained by adding the character frame size of the current character "C" (1
Since there is a gap, the character frame size of the next character "D" is extended by one dot and corrected as shown on the right side to eliminate the gap.

【0026】以上のように、次の文字の配置位置が現在
の文字の配置位置の文字枠サイズを加えた値よりも大き
くてすき間があくときに、現在の文字枠サイズあるいは
次の文字枠サイズを補正(例えば1ドット分拡張して補
正)する。これにより、スケーリングに伴う小数点の切
り捨ておよび四捨五入して文字の配置位置(展開位置)
や文字枠を設定したときに生じる文字枠と文字枠との間
のすき間を無くし、罫線やアンダーラインの接続を行う
ことが可能となる。
As described above, when the next character layout position is larger than the value obtained by adding the character frame size of the current character layout position and there is a gap, the current character frame size or the next character frame size is set. (For example, extended by one dot and corrected). As a result, the decimal point is truncated and rounded off due to scaling, and the character placement position (expansion position)
It is possible to eliminate gaps between character frames generated when character frames and character frames are set, and to connect ruled lines and underlines.

【0027】次に、図4のフローチャートに示す順序に
従い、図1の構成の動作を具体的に説明する。図4にお
いて、S1は、文字列データを受け取る。これは、図1
のホストから装置が文字列データを受け取る。
Next, the operation of the configuration of FIG. 1 will be specifically described according to the order shown in the flowchart of FIG. In FIG. 4, S1 receives character string data. This is shown in FIG.
The device receives character string data from the host.

【0028】S2は、PBCTを作成する。これは、図
1の装置内データ解析部1がS1で受け取った文字列デ
ータを解析し、予め指定されたスケーリング(例えばス
ケーリング率0.1でスケーリング)した文字枠サイズ
を求めてこの文字枠サイズや、更に文字属性決定(色、
フォントなど)してこれらをページバッファコントロー
ルテーブルPBCTに設定して作成する。
In step S2, a PBCT is created. This is because the in-device data analysis unit 1 in FIG. 1 analyzes the character string data received in S1, obtains a character frame size that has been previously scaled (for example, scaled at a scaling rate of 0.1), and determines the character frame size. And furthermore, character attribute determination (color,
Fonts, etc.) and set them in the page buffer control table PBCT.

【0029】S3は、文字が有るか判別する。これは、
S1で受け取った文字列データについて先頭から順次1
文字づつ取り出し、全て終了したか判別する。YESの
場合には、文字列データについて文字毎にページバッフ
ァPBの作成を全て終了したので、S7に進む。一方、
NOの場合には、S4からS6によって文字毎にページ
バッファPBを順次作成する。
A step S3 decides whether or not there is a character. this is,
1 for the character string data received in S1 sequentially from the top
Characters are taken out one by one, and it is determined whether or not all the operations are completed. In the case of YES, the creation of the page buffer PB has been completed for each character in the character string data. on the other hand,
In the case of NO, the page buffer PB is sequentially created for each character in S4 to S6.

【0030】S4は、差が1か判別する。これは、既述
したように次の文字の配置位置と現在の文字の配置位置
に文字枠サイズを加えた値との差が1か、即ち次の文字
の文字枠と現在の文字の文字枠との間に1ドット分のす
き間が生じるか判別する(図5の(ロ)、(ハ)を用い
て後述する)。YESの場合には、差が1であって文字
枠と文字枠との間に1ドットのすき間があくので、S5
で文字情報フラグ3を該当文字にセットし(すき間があ
かないように図3の(イ)ないし(ハ)のいずれかに対
応した文字のページバッファPBの文字情報フラグ3を
1ドット拡張するようにセットし)、S6に進む。一
方、NOの場合には、差が1でなく文字枠と文字枠との
間にすき間が生じないのでそのままS6に進む。
A step S4 decides whether or not the difference is one. This is because, as described above, the difference between the position of the next character and the value obtained by adding the character frame size to the position of the current character is 1, that is, the character frame of the next character and the character frame of the current character. It is determined whether there is a gap of one dot between the two (see (b) and (c) of FIG. 5). In the case of YES, the difference is 1 and there is a one-dot gap between the character frames, so that S5
To set the character information flag 3 to the corresponding character (to extend the character information flag 3 of the page buffer PB of the character corresponding to any of (a) to (c) in FIG. 3 by one dot so that there is no gap. ) And proceeds to S6. On the other hand, in the case of NO, since the difference is not 1 and there is no gap between the character frames, the process proceeds directly to S6.

【0031】S6は、PB作成する。これは、図1に示
すように、文字毎にページバッファPBに、文字情報ア
ドレス、文字の展開座標X、Y、文字枠オフセットX、
Y、文字情報フラグ3をセットする。そして、S3以降
を繰り返し、文字列データの全ての文字について順序ペ
ージバッファPBを作成する。
In step S6, a PB is created. As shown in FIG. 1, the character information address, the character development coordinates X and Y, the character frame offset X, and the character information address are stored in the page buffer PB for each character.
Y, the character information flag 3 is set. Then, S3 and subsequent steps are repeated to create the sequential page buffer PB for all the characters of the character string data.

【0032】以上によって、ホストから受け取った文字
列データについて、ページバッファコントロールテーブ
ルPBCTを作成すると共にこの文字列データの各文字
毎にページバッファPBを作成し、この際に文字枠サイ
ズを1ドット分拡張して補正する文字のページバッファ
PBの文字情報フラグ3をセットして記憶しておく。
As described above, for the character string data received from the host, a page buffer control table PBCT is created, and a page buffer PB is created for each character of the character string data. The character information flag 3 of the page buffer PB of the character to be extended and corrected is set and stored.

【0033】次に、描画について説明する。図4におい
て、S7は、PBが作成されたか判別する。YESの場
合には、S8からS10によって描画する。NOの場合
には、ページバッファPBが作成されていないので描画
することなく終わる。
Next, drawing will be described. In FIG. 4, S7 determines whether a PB has been created. In the case of YES, drawing is performed from S8 to S10. In the case of NO, since the page buffer PB has not been created, the processing ends without drawing.

【0034】S8は、文字情報フラグがセットされてい
るか判別する。これは、S5で該当する文字のページバ
ッファPBの文字情報フラグ3がセットされていたか判
別する。YESの場合には、S9で文字枠を1ドット増
やし、S10でこの1ドット増やした文字枠内に文字を
描画する。これにより、文字情報フラグ3がセットされ
ていた文字枠を1ドット分拡張して隣接する文字枠との
間のすき間が無くなるので、特に罫線やアンダラインを
描画したときに隣接する文字枠との間で完全に接続さ
れ、すき間が生じることがない。NOの場合には、文字
枠を増やすことなく、S10で文字を描画する。
In step S8, it is determined whether the character information flag has been set. This is to determine whether the character information flag 3 of the page buffer PB of the corresponding character has been set in S5. In the case of YES, the character frame is increased by one dot in S9, and the character is drawn in the character frame increased by one dot in S10. As a result, the character frame in which the character information flag 3 has been set is extended by one dot to eliminate the gap between the character frame and the adjacent character frame. There is no gap between them. In the case of NO, a character is drawn in S10 without increasing the number of character frames.

【0035】図5は、本発明の具体例説明図を示す。図
5の(イ)は、構成図を示す。ここで、ホスト側(VD
C区域:仮想的な座標系)の文字枠は、図示のように4
83ドット×483ドットとする。そして、スケール率
0.1とすると、装置側(VP:実際の例えば紙に印刷
する座標系)の文字枠は、483×0.1=48.3ド
ットの文字枠となるが、ドット以下は描画できないの
で、これの小数点以下を切り捨てた48ドットを文字枠
と決定し、図1のページバッファコントロールテーブル
PBCTに設定する。また、文字の展開位置の移動量
は、四捨五入して最初は右下に示すように48ドットと
決定し、これをもとに図1のページテーブルPBの展開
座標X、Yを求めて設定する。以下、ページバッファP
Bへ設定する値の計算例を図5の(ロ)、(ハ)を用い
て説明する。
FIG. 5 is a diagram illustrating a specific example of the present invention. FIG. 5A shows a configuration diagram. Here, the host side (VD
The character frame of area C: virtual coordinate system) is 4 as shown in the figure.
83 dots x 483 dots. If the scale ratio is 0.1, the character frame on the device side (VP: actual coordinate system for printing on paper, for example) is a character frame of 483 × 0.1 = 48.3 dots. Since drawing cannot be performed, 48 dots obtained by truncating the decimal portion are determined as a character frame, and set in the page buffer control table PBCT in FIG. The moving amount of the character development position is first rounded off and determined to be 48 dots as shown at the lower right, and based on this, the development coordinates X and Y of the page table PB in FIG. 1 are obtained and set. . Hereinafter, the page buffer P
A calculation example of the value to be set to B will be described with reference to FIGS.

【0036】図5の(ロ)は、計算例を示す。これは、
図5の(イ)の例について、1文字目、2文字目・・・
の文字枠、移動量、移動量差の累積値を計算した例を示
す。ここで、□で囲んだ数値を記憶し、次の文字の計算
を行う。
FIG. 5B shows a calculation example. this is,
In the example of FIG. 5A, the first character, the second character,...
8 shows an example of calculating a character frame, a moving amount, and a cumulative value of a moving amount difference. Here, the numerical value enclosed by □ is stored, and the next character is calculated.

【0037】1文字目:文字枠→48ドット(切り捨
て)/これは、図5の(イ)でホストの文字枠483×
スケール率0.1=48.3ドットの小数点以下を切り
捨てたものである。
First character: character frame → 48 dots (discarded) / This is the character frame 483 × of the host in FIG.
The scale ratio of 0.1 = 48.3 dots is rounded down to the decimal point.

【0038】:移動量→48ドット(四捨五入)/これ
は、図5の(イ)でホストの文字枠483×スケール率
0.1=48.3ドットの小数点以下を四捨五入したも
のである。
Moving amount → 48 dots (rounded) / This is obtained by rounding off the decimal part of the character frame 483 of the host × scale ratio 0.1 = 48.3 dots in FIG. 5A.

【0039】:移動量差の累積値→48−48.3=−
0.3ドット/これは、上記移動量48ドットから本来
移動すべき48.3ドットとの差を−0.3として求め
たものである。
: Cumulative value of movement amount difference → 48−48.3 = −
0.3 dot / this is obtained by taking the difference between the above-mentioned movement amount of 48 dots and 48.3 dots to be moved as −0.3.

【0040】2文字目:文字枠→48ドット(切り捨
て)/これは、図5の(イ)でホストの文字枠483×
スケール率0.1=48.3ドットの小数点以下を切り
捨てたものである。
Second character: character frame → 48 dots (discarded) / This is the character frame 483 × of the host in FIG.
The scale ratio of 0.1 = 48.3 dots is rounded down to the decimal point.

【0041】:移動量→48.3+0.3=48.6ド
ット→49ドット(四捨五入)/これは、1文字目の本
来の移動量48.3に移動量差の累積値0.3を加えた
48.6を得、これを四捨五入したものである。この移
動量が49ドットと、48ドットに1ドット加算された
場合は、既述したページバッファPBの文字情報フラグ
3をセットして1ドット分文字枠を、描画時に拡張する
旨を記憶しておく。
Moving amount → 48.3 + 0.3 = 48.6 dots → 49 dots (rounded) / This is obtained by adding the cumulative value 0.3 of the moving amount difference to the original moving amount 48.3 of the first character. 48.6 which was rounded off. If the moving amount is 49 dots and 1 dot is added to the 48 dots, the character information flag 3 of the page buffer PB is set and the fact that the character frame for one dot is extended at the time of drawing is stored. deep.

【0042】:移動量差の累積値→49−48.6=
0.4ドット/これは、上記移動量49ドットから本来
移動すべき48.6ドットとの差を0.4として求めた
ものである。
: Cumulative value of movement amount difference → 49−48.6 =
0.4 dots / this is obtained by assuming that the difference between the movement amount of 49 dots and 48.6 dots to be moved is 0.4.

【0043】以下同様に、文字枠は48ドットとしたま
まで、本来の移動量と実際の移動量との差が1ドット差
となったときに当該文字のページバッファPBの文字情
報フラグ3をセットして1ドット分、文字枠を拡張した
旨を記憶し、描画時にこの1ドット分を拡張して描画す
る(図4のS8のYES、S9、S10)。
Similarly, when the difference between the original movement amount and the actual movement amount becomes 1 dot while the character frame is kept at 48 dots, the character information flag 3 of the page buffer PB of the character is set. The fact that the character frame has been extended by one dot by setting is stored, and this one dot is extended and rendered at the time of rendering (YES in S8, S9, S10 in FIG. 4).

【0044】図5の(ハ)は、上記計算結果を示す。こ
れは、図5の(ロ)の1文字目、2文字目と同様にして
5文字目まで計算した結果をテーブルにしたものであ
る。ここで、文字枠は48ドットで図1のページバッフ
ァコントロールテーブルPBCTに設定する。移動量は
図1の右下に記載した現在の文字の展開座標と次の文字
の展開座標との移動量を表す。文字枠と移動量との差
は、上段の文字枠と移動量との差を求めたものであっ
て、斜線を引いた文字が1ドット差があり、このときの
文字のページバッファPBの文字情報フラグ3をセット
する。
FIG. 5C shows the result of the above calculation. This is a table in which the results calculated up to the fifth character in the same manner as the first and second characters in FIG. Here, the character frame is 48 dots and is set in the page buffer control table PBCT of FIG. The movement amount indicates the movement amount between the development coordinates of the current character and the development coordinates of the next character described in the lower right of FIG. The difference between the character frame and the movement amount is obtained by calculating the difference between the upper character frame and the movement amount, and the hatched character has a one-dot difference, and the character of the character in the page buffer PB at this time. Information flag 3 is set.

【0045】[0045]

【発明の効果】以上説明したように、本発明によれば、
ページバッファPBに文字情報フラグ3を設け、文字毎
に文字枠と文字移動量とにドット差が生じたときに文字
情報フラグ3をセットしておき、描画時に文字情報フラ
グ3がセットされた文字枠を該ドット差分拡張して描画
する構成を採用しているため、ホストから受け取った文
字列データのスケーリングに伴う文字枠と文字移動量の
差によるドットのすき間の発生を無くし、罫線やアンダ
ラインの接続を行うことができる。
As described above, according to the present invention,
A character information flag 3 is provided in the page buffer PB, and the character information flag 3 is set when a dot difference occurs between the character frame and the character movement amount for each character. The adoption of a configuration in which the frame is extended by the dot difference to draw the image eliminates the occurrence of a dot gap due to the difference between the character frame and the character movement amount due to the scaling of the character string data received from the host. Connection can be made.

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

【図1】本発明の1実施例構成図である。FIG. 1 is a configuration diagram of one embodiment of the present invention.

【図2】本発明の文字情報フラグである。FIG. 2 shows a character information flag according to the present invention.

【図3】本発明の概念説明図である。FIG. 3 is a conceptual explanatory diagram of the present invention.

【図4】本発明の動作説明フローチャートである。FIG. 4 is a flowchart illustrating the operation of the present invention.

【図5】本発明の具体例説明図である。FIG. 5 is an explanatory diagram of a specific example of the present invention.

【図6】従来技術の説明図である。FIG. 6 is an explanatory diagram of a conventional technique.

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

1:装置内データ解析部 2:装置内描画部 3:文字情報フラグ PBCT:ページバッファコントロールテーブル PB:ページバッファ 1: In-device data analysis unit 2: In-device drawing unit 3: Character information flag PBCT: Page buffer control table PB: Page buffer

フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06F 15/20 566N B41J 3/12 U (56)参考文献 特開 昭57−122489(JP,A) 特開 平1−269552(JP,A) 特開 平2−37391(JP,A) 特開 昭63−71357(JP,A) 特開 昭62−25064(JP,A) 特開 平1−113259(JP,A)Continuation of the front page (51) Int.Cl. 6 Identification code Agency reference number FI Technical indication location G06F 15/20 566N B41J 3/12 U (56) Reference JP-A-57-122489 (JP, A) JP-A JP-A-1-269552 (JP, A) JP-A-2-37391 (JP, A) JP-A-63-71357 (JP, A) JP-A-62-25064 (JP, A) JP-A-1-113259 (JP) , A)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 ホストから送られてきた文字列データの
文字配置を補正する文字配置補正方式において、 ホストから送られてきた文字列データについて、スケー
リングした文字枠サイズをドット単位で設定するページ
バッファコントロールテーブルPBCTと、 ホストから送られてきた文字列データについて、スケー
リングした文字毎の移動量をドット単位で求めた展開座
標を設定および文字情報フラグ(3)を設けたページバ
ッファPBとを備え、 上記ホストから送られてきた文字列データについて、ス
ケーリングした文字毎にドット単位に求めた移動量と上
記文字枠サイズとにドット差が生じたときに上記文字情
報フラグ(3)をセットし、この文字情報フラグ(3)
がセットされていた文字の描画時に、上記ページバッフ
ァコントロールテーブルPBCTに設定されている文字
枠を該ドット差分拡張して当該文字を描画し、文字枠と
文字枠との間にすき間が生じないように構成したことを
特徴とする文字配置補正方式。
In a character arrangement correction method for correcting the character arrangement of character string data sent from a host, a page buffer for setting a scaled character frame size in dot units for character string data sent from a host. A control table PBCT, and a page buffer PB provided with character string data sent from the host, set expansion coordinates obtained by calculating the amount of movement for each scaled character in dot units, and provided with a character information flag (3); For the character string data sent from the host, the character information flag (3) is set when a dot difference occurs between the movement amount calculated for each scaled character in dot units and the character frame size. Character information flag (3)
When drawing a character in which is set, the character frame set in the page buffer control table PBCT is expanded by the dot difference to draw the character, so that there is no gap between the character frame and the character frame. A character arrangement correction method characterized in that:
【請求項2】 上記ホストから送られてきた文字列デー
タについて、スケーリングした文字枠サイズの小数点以
下を切り捨ててドット単位とした文字枠サイズを求める
と共に、上記ホストから送られてきた文字列データにつ
いて、スケーリングした文字の移動量の小数点以下を四
捨五入してドット単位で移動量を求めるように構成した
ことを特徴とする請求項第1項記載の文字配置補正方
式。
2. The character string data sent from the host is obtained by cutting off the decimal point of the scaled character frame size to obtain a character frame size in dot units. 2. The character arrangement correction method according to claim 1, wherein the movement amount of the scaled character is rounded off to the decimal point to obtain the movement amount in dot units.
JP3283412A 1991-10-30 1991-10-30 Character arrangement correction method Expired - Lifetime JP2629098B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3283412A JP2629098B2 (en) 1991-10-30 1991-10-30 Character arrangement correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3283412A JP2629098B2 (en) 1991-10-30 1991-10-30 Character arrangement correction method

Publications (2)

Publication Number Publication Date
JPH05119761A JPH05119761A (en) 1993-05-18
JP2629098B2 true JP2629098B2 (en) 1997-07-09

Family

ID=17665200

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3283412A Expired - Lifetime JP2629098B2 (en) 1991-10-30 1991-10-30 Character arrangement correction method

Country Status (1)

Country Link
JP (1) JP2629098B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7472348B2 (en) 1998-11-05 2008-12-30 Canon Kabushiki Kaisha Image processing apparatus, image processing method and storage medium using character size and width for magnification

Also Published As

Publication number Publication date
JPH05119761A (en) 1993-05-18

Similar Documents

Publication Publication Date Title
JP3474037B2 (en) Character pattern generator
US5537131A (en) Character generating method and apparatus
JP2629098B2 (en) Character arrangement correction method
JP3226734B2 (en) Data conversion device and method
US5542050A (en) Font information transfer system
JP3029135B2 (en) Character processing apparatus and method
JPH11109943A (en) Font processor and recording medium recorded with font processing program
JPH0263762A (en) Output apparatus
JP2618528B2 (en) Character drawing device, character output correction method, and character output device
JP3344538B2 (en) Character generator
JP2856235B2 (en) Character processing device and character output method
JP2782752B2 (en) Character pattern output device
JP2525333B2 (en) Output device
JP3347756B2 (en) Character generation method and device
JPH0630927B2 (en) Pattern output method
JPH04104296A (en) Character/graphic plotter
JP2861127B2 (en) Data converter
JP2771629B2 (en) Character processor
JPH06100905B2 (en) Pattern output method
JP3119094B2 (en) Character output device
JP3191954B2 (en) Contour data processing device
JP2962564B2 (en) Printer print control method
JPH0511736A (en) Character pattern output device
JPH1031471A (en) Method and device for printing and displaying foreign languages including english script and arabic using computer
JPH08290626A (en) Printer and character-disposing method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19970218