JPH0732700A - Right-edge aligned printing method of proportional data - Google Patents
Right-edge aligned printing method of proportional dataInfo
- Publication number
- JPH0732700A JPH0732700A JP5199896A JP19989693A JPH0732700A JP H0732700 A JPH0732700 A JP H0732700A JP 5199896 A JP5199896 A JP 5199896A JP 19989693 A JP19989693 A JP 19989693A JP H0732700 A JPH0732700 A JP H0732700A
- Authority
- JP
- Japan
- Prior art keywords
- blank
- data
- text
- proportional
- line
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims description 51
- 230000015654 memory Effects 0.000 claims abstract description 37
- 230000001186 cumulative effect Effects 0.000 claims description 12
- 238000003780 insertion Methods 0.000 abstract 1
- 230000037431 insertion Effects 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 13
- 238000005034 decoration Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000001143 conditioned effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
Landscapes
- Document Processing Apparatus (AREA)
- Controls And Circuits For Display Device (AREA)
- Record Information Processing For Printing (AREA)
- Character Spaces And Line Spaces In Printers (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】この発明は、少なくとも1行分の
テキストを一括印刷するワードプロセッサやタイプライ
タ等において、プロポーショナルフォント使用時に、プ
ロポーショナルデータの右端を揃えて印刷するプロポー
ショナルデータの右端揃え印刷方法に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a right-edge aligned printing method of proportional data for aligning the right ends of proportional data when a proportional font is used in a word processor, typewriter or the like for collectively printing text for at least one line. .
【0002】[0002]
【従来の技術】一般に、ジャスティフィケーション機能
を備えたワードプロセッサやタイプライタにおいて、欧
文テキストの右端を揃える場合には、エディタによって
1行中の欧文テキストを解析して文字サイズで空白調整
を行うことにより、各行の右端を揃えるようにしてい
た。2. Description of the Related Art Generally, in a word processor or typewriter having a justification function, when aligning the right ends of European texts, an editor analyzes the Western texts in one line and adjusts the white space according to the character size. To align the right ends of the lines.
【0003】[0003]
【発明が解決しようとする課題】しかしながら、このよ
うなジャスティフィケーション機能によって単語間の空
白を調整するものにおいて、文字毎に文字幅が固有の値
を持つプロポーショナルフォントでは、右端を常に正確
に揃えることはできず、見た目の悪い印刷結果となる等
の欠点があった。この発明の課題は、プロポーショナル
フォント使用時でも1ドット単位で正確に各行の右端を
揃えて印刷できるようにすることである。However, in the case of adjusting the white space between words by such a justification function, in a proportional font having a unique character width for each character, the right end is always aligned exactly. However, there are drawbacks such as poor printing results. SUMMARY OF THE INVENTION An object of the present invention is to enable the right end of each line to be accurately aligned and printed in dot units even when a proportional font is used.
【0004】[0004]
【課題を解決するための手段およびその作用】この発明
の手段およびその作用は次の通りである。 (1)、少なくとも1行分のプロポーショナルデータを
印刷データとして展開メモリ(例えば、1行分の印字バ
ッファ)に配置する前に、先読み処理によって、単語間
の空白を除いた少なくとも1行分の各プロポーショナル
データの文字幅(フォントボディサイズ)をドット単位
で累積することによりプロポーショナルデータの累積ド
ット数ACDを求めると共に、単語間に存在する各空白
を半角単位で計数することにより半角単位の合計空白数
TSPを求める。 (2)、また、行の左の所定位置から右マージン位置ま
でのドットサイズをプロポーショナルデータを展開する
展開エリアサイズDVAとして求めると共に、この展開
エリアサイズDVAからプロポーショナルデータの累積
ドッド数ACDを減算してドット単位の空白割り当てサ
イズSALを求める。 (3)、テキストメモリの内容を順次読み出して展開メ
モリに配置する際に、プロポーショナルデータが読み出
された場合には、通常と同様に、このプロポーショナル
データを展開メモリに直接配置し、また、空白データが
読み出された場合には、現在読み出し中の空白データが
半角単位で何個分に相当するかを示す現在の空白数PS
Cを求めると共に、半角単位の合計空白数TSPを現在
の空白数PSCで除算し、その値に空白割り当てサイズ
SALを乗算してその値を、現在読み出し中の空白デー
タに対する空白ドッド数PSDとして求めてこのドット
数分の空白を展開メモリに配置し、かつ空白割り当てサ
イズSALから現在の空白ドット数PSDを減算してそ
の値を次回の空白計算用の空白割り当てサイズSALと
して求めておくと共に、半角単位の合計空白数TSPか
ら現在の空白数PSCを減算してその値を次回の空白計
算用の合計空白数TSPとして求めておく。このような
処理を1文字ずつテキストデータを読み出す毎に実行す
る。したがって、プロポーショナルフォント使用時でも
1ドット単位で正確に各行の右端を揃えて印刷すること
ができる。Means for Solving the Problem and Its Action The means of the present invention and its action are as follows. (1) Prior to arranging at least one line of proportional data as print data in the expansion memory (for example, one line of print buffer), each of the at least one line except for spaces between words is preliminarily read The cumulative number of dots of proportional data is calculated by accumulating the character width (font body size) of proportional data in dots, and the total number of spaces in half-width is calculated by counting the spaces between words in half-width units. Ask for TSP. (2) Further, the dot size from the predetermined position on the left side of the line to the right margin position is obtained as the expansion area size DVA for expanding the proportional data, and the cumulative dod count ACD of proportional data is subtracted from the expansion area size DVA. To obtain the blank allocation size SAL in dot units. (3) If proportional data is read when sequentially reading the contents of the text memory and arranging them in the expansion memory, the proportional data is directly arranged in the expansion memory as in the usual case, and is blank. When data is read, the current number of blanks PS indicating how many blank data is currently being read in half-width units
In addition to obtaining C, the total number of blanks in half-width units TSP is divided by the current number of blanks PSC, and the value is multiplied by the blank allocation size SAL to obtain the value as the number of blank dots PSD for the blank data currently being read. A blank for the number of levers is arranged in the expanded memory, and the current blank dot number PSD is subtracted from the blank allocation size SAL to obtain the value as the blank allocation size SAL for the next blank calculation. The current blank count PSC is subtracted from the unit total blank count TSP to obtain the value as the total blank count TSP for the next blank calculation. Such processing is executed each time the text data is read out character by character. Therefore, even when a proportional font is used, the right ends of the lines can be accurately aligned and printed in dot units.
【0005】[0005]
【実施例】以下、図1〜図16を参照して一実施例を説
明する。図1はワードプロセッサの全体構成を示したブ
ロック図である。CPU1はこのワードプロセッサの全
体動作を制御する中央演算処理装置であり、ROM2内
に格納されている入出力制御用のIOCSプログラムに
したがってその周辺デバイスであるキーボード3、CR
T表示装置4、ディスク5、プリンタ6に対して入出力
制御を行う。なお、ROM2はシステム立ち上げ時にオ
ペレーティングシステムをRAM7にロードする為のI
PLプログラムやIOCSプログラム等の他、文字フォ
ントデータ(プロポーショナルデータ)等を記憶する固
定メモリである。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment will be described below with reference to FIGS. FIG. 1 is a block diagram showing the overall configuration of a word processor. A CPU 1 is a central processing unit for controlling the overall operation of this word processor, and a keyboard 3 and a CR which are peripheral devices thereof according to an IOCS program for input / output control stored in a ROM 2.
Input / output control is performed for the T display device 4, the disk 5, and the printer 6. It should be noted that the ROM 2 is an I for loading the operating system into the RAM 7 when the system is started up.
It is a fixed memory that stores character font data (proportional data) and the like in addition to the PL program and the IOCS program.
【0006】キーボード3はテキストデータや各種のコ
マンドを入力するキー入力装置であり、CPU1はキー
ボード制御部8に保持されているキーコードをアクセス
し、それがテキストコードであれば、文書作成処理を行
い、RAM7内のテキストメモリ7−1に格納したり、
表示データに変換してビデオRAM(V・RAM)9に
書き込む。なお、CRT制御部10はV・RAM9をア
クセスし、V・RAM9内のテキストデータをCRT表
示装置4から表示出力させる。The keyboard 3 is a key input device for inputting text data and various commands, and the CPU 1 accesses the key code held in the keyboard control section 8, and if it is a text code, it executes a document creation process. And store it in the text memory 7-1 in RAM7,
It is converted into display data and written in the video RAM (V.RAM) 9. The CRT control unit 10 accesses the V.RAM 9 and causes the CRT display device 4 to display and output the text data in the V.RAM 9.
【0007】RAM7はテキストメモリ7−1、ワーク
メモリ7−2等を有し、キーボード3から印刷指令が与
えられると、CPU1はこのテキストメモリ7−1の内
容を読み出して印字バッファ11に与える。この印字バ
ッファ11は1行分のテキストデータが印刷データとし
て展開配置される1行バッファで、印刷制御部12はこ
の印字バッファ11の内容を一括して印刷出力させる。
ここで、CPU1はプロポーショナルデータの右端揃え
印刷を行う場合、所定の計算手順にしたがってRAM7
内の後述する各種のパラメータを算出しながら1行中の
単語間に存在する各空白のサイズをドット単位で調整す
るプロポーショナルデータのジャスティフィケーション
処理を行う。なお、CPU1はキーボード3から文書保
存指令が入力されると、テキストメモリ7−1の内容を
外部記憶制御部13に与え、フロッピーディスク5に登
録させる。The RAM 7 has a text memory 7-1, a work memory 7-2, etc. When a print command is given from the keyboard 3, the CPU 1 reads the contents of the text memory 7-1 and gives it to the print buffer 11. The print buffer 11 is a one-line buffer in which one line of text data is expanded and arranged as print data, and the print control unit 12 prints out the contents of the print buffer 11 in a batch.
Here, when the CPU 1 prints the right edge of proportional data, the RAM 7 follows a predetermined calculation procedure.
While calculating various parameters described later, proportionality data justification processing for adjusting the size of each blank existing between words in one line in dot units is performed. When a document save command is input from the keyboard 3, the CPU 1 gives the content of the text memory 7-1 to the external storage control unit 13 to register it in the floppy disk 5.
【0008】図2はRAM7の構成を詳細に示した図で
ある。RAM7はテキストメモリ7−1、ワークメモリ
7−2等を有する他に、プロポーショナルデータのジャ
スティフィケーション処理に必要な各種のパラメータを
記憶する構成となっている。ここで、各種パラメータは
以下の通り定義されたものである。 テキストアドレスTXA……テキストメモリ7−1をア
クセスする現在の読み出しアドレス。 桁カウントCCT……1行印刷処理時において、半角単
位で行頭から行末までの桁数を計数するカウンタ値。 プロポーショナルデータの累積ドッド数ACD……1行
分のプロポーショナルデータを印刷データとして印字バ
ッファ11に展開配置する前に、単語間の空白を除いた
1行分のプロポーショナルデータの文字幅(フォントボ
ディサイズ)をドット単位で累積することにより求めら
れる総ドット数。 文字数カウントONC……1行印刷処理時において、空
白を除いた1行中の文字数を半角単位で計数するカウン
タ値。 合計空白数TSP……1行印刷処理時において、1行中
の単語間に存在する各空白を半角単位で計数するカウン
タ値。 退避アドレスTSA……1行の最終単語における末尾の
文字のテキストアドレス。 展開エリアサイズDVA……行の所定位置から右マージ
ン位置までのドットサイズをプロポーショナルデータを
展開する為のエリアとして求められたドットサイズ。 空白割り当てサイズSAL……展開エリアサイズDVA
からプロポーショナルデータの累積ドッド数ACDを減
算することにより求められたドットサイズで、この空白
割り当てサイズSALは単語間の各空白に均一に割り当
てられる。 現在の空白数PSC……テキストメモリ7−1の内容を
順次読み出して印字バッファ11に配置する際に、空白
コードが読み出された場合にその空白コードが半角単位
で何個分に相当するかを示す現在読み出し中の空白数。 現在の空白ドット数PSD……空白割り当てサイズSA
L×半角単位の合計空白数TSP/現在の空白数PSC
の演算を実行することによって求められたドット数で、
現在読み出し中の空白データに対応して印字バッファ1
1に展開配置される空白ドット数。FIG. 2 is a diagram showing the configuration of the RAM 7 in detail. The RAM 7 has a text memory 7-1, a work memory 7-2, and the like, and is configured to store various parameters necessary for justification processing of proportional data. Here, various parameters are defined as follows. Text address TXA ... Current read address for accessing the text memory 7-1. Digit count CCT: A counter value that counts the number of digits from the beginning of the line to the end of the line in half-width units when printing one line. Cumulative number of proportional data ACD: Character width of one line of proportional data (font body size) before the space for one line of proportional data is expanded and arranged in the print buffer 11 as print data. The total number of dots obtained by accumulating in dot units. Character count ONC: A counter value that counts the number of characters in a line excluding blanks in half-width units when printing one line. Total number of blanks TSP: A counter value that counts each blank existing between words in one line in half-width units during one-line printing processing. Save address TSA: Text address of the last character in the last word of one line. Expansion area size DVA: The dot size from the specified position on the line to the right margin position is the dot size obtained as the area for expanding the proportional data. Blank allocation size SAL ... Development area size DVA
This space allocation size SAL is evenly allocated to each space between words with a dot size obtained by subtracting the cumulative number of proportional data ACD from ACD. Current number of blanks PSC ... When the blank code is read when sequentially reading the contents of the text memory 7-1 and arranging them in the print buffer 11, how many blank codes correspond to one half-width unit. Indicates the number of blanks currently being read. Current number of blank dots PSD ... Blank allocation size SA
L × total number of blanks in half-width units TSP / current number of blanks PSC
By the number of dots obtained by executing the operation of
Print buffer 1 corresponding to the blank data currently being read
The number of blank dots to be expanded and arranged in 1.
【0009】図3はプロポーショナルデータの具体例と
してアルファベット文字「J」を例に挙げたもので、一
般に、プロポーショナルデータは第1左サイドベアリン
グ情報a、第2左サイドベアリング情報b、フォントボ
ディサイズc、右サイドベアリング情報dを有し、プロ
ポーショナルデータを印刷データとして印字バッファ1
1に展開配置する際には、フォントボディサイズにした
がって文字配置が行われる。なお、各行の1文字目のプ
ロポーショナルデータはその左端が左マージン位置から
飛び出さない様に、左サイドベアリング情報として第1
左サイドベアリング情報aが使用される。FIG. 3 shows an example of the alphabetic character "J" as a specific example of proportional data. In general, proportional data includes first left side bearing information a, second left side bearing information b, and font body size c. , The right side bearing information d, and the print buffer 1 with proportional data as print data
When expanding and arranging to 1, the character arrangement is performed according to the font body size. Note that the first character of each line of the proportional data is the first left side bearing information so that the left end of the proportional data does not protrude from the left margin position.
The left side bearing information a is used.
【0010】次に、本実施例の動作を図4〜図8に示す
フローチャートにしたがって説明する。図4はプロポー
ショナルデータの右端揃え印刷を行う場合のフローチャ
ートで、1行印刷の毎に実行開始される。先ず、CPU
1は1行印刷の始めにRAM7内の桁カウントCCTや
プロポーショナルデータの累積ドッド数ACD等を初期
化するイニシャライズ処理を実行する(ステップA
1)、次に、1行分のプロポーショナルデータを印刷デ
ータとして印字バッファ11に配置する前の処理として
行われる先読み処理の開始条件が成立したか否かをチェ
ックする(ステップA2)。ここで、先読み処理の開始
は行頭の空白を除く最初の単語の先頭文字がテキストメ
モリ7−1から読み出された後、次の文字が読み出され
たことを条件とするもので、例えば図9に示す1行分の
テキスト列において、その行頭部分の空白を除き、その
先頭文字Aに続く文字Bがテキストメモリ7−1から読
み出されたことを条件に先読み処理を開始する。なお、
図9のテキスト例は、テキスト内容を模式的に示すと共
に、後述する図12等と相違する点は最後の文字位置か
ら右マージン位置までを空白コードで埋めた場合のテキ
スト例である。The operation of this embodiment will be described below with reference to the flow charts shown in FIGS. FIG. 4 is a flowchart in the case of performing right edge alignment printing of proportional data, which is started every time one line is printed. First, the CPU
1 executes an initialization process for initializing the digit count CCT in the RAM 7 and the cumulative number ACD of proportional data in the beginning of one-line printing (step A).
1) Next, it is checked whether or not the start condition of the prefetching process performed as a process before arranging the proportional data for one line as print data in the print buffer 11 is satisfied (step A2). Here, the start of the prefetch process is conditioned on the fact that the next character is read after the first character of the first word excluding the blank at the beginning of the line is read from the text memory 7-1. In the one-line text string shown in FIG. 9, the read-ahead processing is started on the condition that the character B following the leading character A is read from the text memory 7-1 except for the blank at the beginning of the line. In addition,
The text example of FIG. 9 schematically shows the text contents, and is different from FIG. 12 to be described later in that the text example is filled with a blank code from the last character position to the right margin position.
【0011】いま、先読み開始条件が成立しなければ、
ステップA3に進み、テキストメモリ7−1から読み出
したテキストコードを印刷データに展開して印字バッフ
ァ11に通常通りに文字配置を行う。この場合、上述し
た様に1文字目のプロポーショナルデータは左マージン
位置を飛び出さない様に第1左ベアリング情報aが使用
される。次に、RAM7内のテキストアドレスTXA、
桁カウントCCTを更新する(ステップA4)。そし
て、ステップA2に戻り、再び先読み処理の開始条件を
チェックする。If the prefetch start condition is not satisfied,
In step A3, the text code read from the text memory 7-1 is expanded into print data and characters are arranged in the print buffer 11 as usual. In this case, as described above, the first left bearing information a is used for the first character proportional data so as not to jump out of the left margin position. Next, the text address TXA in RAM7,
The digit count CCT is updated (step A4). Then, returning to step A2, the start condition of the prefetching process is checked again.
【0012】ここで、図9のテキスト例では先頭から2
文字目のBが読み出された際に、先読み処理の開始条件
が成立してステップA5に進み、現在のテキストアドレ
スTXA、桁カウントCCTをRAM7内の退避メモリ
(図示せず)に保存しておく。この場合、テキストアド
レスTXAとして「3」、桁カウントCCTとして
「3」を保存される。そして、プロポーショナルデータ
の積み上げ処理(ステップA6)を行う。Here, in the text example of FIG.
When the character B is read, the start condition of the prefetching process is satisfied and the process proceeds to step A5, and the current text address TXA and digit count CCT are saved in the save memory (not shown) in the RAM 7. deep. In this case, "3" is stored as the text address TXA and "3" is stored as the digit count CCT. Then, a process of accumulating proportional data (step A6) is performed.
【0013】図5はこのプロポーショナルデータの積み
上げ処理を示したフローチャートで、先ず、現在読み出
し中のテキストコードに対応するプロポーショナルデー
タを読み出し(ステップB1)、このテキストコードが
空白でない場合には(ステップB2)、読み出したプロ
ポーショナルデータのフォントボディサイズ(図3の
c)を取り出してRAM7内の累積ドット数ACDに今
回のフォントボディサイズcに相当するドットサイズ分
の値を累積する(ステップB3)。FIG. 5 is a flowchart showing the process of accumulating the proportional data. First, the proportional data corresponding to the text code currently being read is read (step B1). If the text code is not blank (step B2). ), The font body size (c in FIG. 3) of the read proportional data is taken out, and a value for the dot size corresponding to the current font body size c is accumulated in the cumulative dot number ACD in the RAM 7 (step B3).
【0014】このような積み上げ処理が終ると、図4の
ステップA7に進み、文字数・空白数の解析処理を行
う。この文字数・空白数解析処理は先読み処理の開始条
件の成立位置から1行分の文字数を半角単位で計数して
文字数の合計値を求めると共に、単語間に存在する各空
白を半角単位で計数して合計空白数を求める処理であ
る。When such a stacking process is completed, the process proceeds to step A7 in FIG. 4 to analyze the number of characters and the number of blanks. The number of characters / blanks analysis process counts the number of characters in one line in half-width units from the position where the pre-reading process start condition is satisfied to obtain the total number of characters, and also counts each space between words in half-width units. Is a process for obtaining the total number of blanks.
【0015】図6はこの文字数・空白数解析処理を示し
たフローチャートである。先ず、CPU1は現在読み出
し中のテキストコードが文字か、空白かをチェックする
(ステップC1)。いま、文字コードであれば、現在の
文字の大きさは半角単位で何個分に相当するかの計算を
行い、その値にしたがってRAM7内の文字数カウント
CNCをインクリメントする(ステップC2)。そし
て、現在のテキストアドレスTXAをRAM7内に退避
アドレスTSAとしてセットしておく。このような処理
はテキストメモリ7−1から文字コードが読み出される
毎に実行される結果、1行の最後の単語の末尾に位置す
る文字コードが読み出された際には、文字数カウントC
NCの値は1行中の半角単位での文字数となり、また、
退避アドレスTSAは最終単語の末尾の文字が読み出さ
れたときのテキストアドレスとなる。この場合、図9の
テキスト例では退避アドレスTSAは「9」となる。FIG. 6 is a flow chart showing this character number / blank number analysis processing. First, the CPU 1 checks whether the currently read text code is a character or a blank (step C1). If it is a character code, the number of half-width units of the current character is calculated, and the character number count CNC in the RAM 7 is incremented according to the calculated value (step C2). Then, the current text address TXA is set in the RAM 7 as the save address TSA. Such processing is executed every time the character code is read from the text memory 7-1. As a result, when the character code located at the end of the last word in one line is read, the character number count C
The value of NC is the number of characters in one-byte unit in one line, and
The save address TSA becomes a text address when the last character of the last word is read. In this case, the save address TSA is “9” in the text example of FIG.
【0016】一方、テキストメモリ7−1から空白コー
ドが読み出された場合には、ステップC4に進み、現在
の空白の大きさは半角単位で何個分に相当するかの計算
を行い、その値をRAM7内の一時退避バッファ(図示
せず)に累積する。なお、この一時退避バッファは単語
間の各空白数のみを半角単位で計数することによって合
計空白数TSPを求める為に、一時的な計数値を退避す
るためのものである。そして、次のテキストコードは文
字か、空白かをチェックする(ステップC5)。ここ
で、次のテキストコードが空白で空白が連続する場合に
はこの図6の解析処理から抜けるが、次のテキストコー
ドが文字である場合、つまり、次の単語の先頭文字であ
る場合には、一時退避バッファの内容に応じてRAM7
内の合計空白数TSPをインクリメントすると共に(ス
テップC6)、一時退避バッファの内容をクリアする
(ステップC7)。つまり、空白が連続する場合には一
時退避バッファの内容はそれに応じて累積されてゆく
が、次の単語の先頭文字が見つかった場合には、その内
容は初期化される。このような処理はテキストメモリ7
−1から空白コードが読み出される毎に実行される結
果、RAM7内の合計空白数TSPの値は単語間に存在
する各空白の半角単位での空白数となる。即ち、図9の
テキスト例に示す様に、最後の単語の末尾の文字位置か
ら右マージン位置までの行末部分に空白コードが挿入さ
れていても、この空白は合計空白数TSPには計上され
ずにそのまま切り捨てられる。したがって合計空白数T
SPの値は単語間に存在する各空白を半角単位で計数し
た合計値となる。On the other hand, when the blank code is read from the text memory 7-1, the process proceeds to step C4, the number of half-width units of the current blank is calculated, and the calculated blank space is calculated. The value is accumulated in the temporary save buffer (not shown) in the RAM 7. The temporary save buffer is for saving a temporary count value in order to obtain the total number of blank spaces TSP by counting only the number of blank spaces between words in half-width units. Then, it is checked whether the next text code is a character or a blank (step C5). Here, when the next text code is a blank and the blanks are continuous, the analysis processing of FIG. 6 is skipped, but when the next text code is a character, that is, when it is the first character of the next word, , RAM7 according to the contents of the temporary save buffer
The total number of blank spaces TSP is incremented (step C6) and the contents of the temporary save buffer are cleared (step C7). That is, the contents of the temporary save buffer are accumulated accordingly when the blanks are continuous, but when the first character of the next word is found, the contents are initialized. Text memory 7
As a result of being executed each time a blank code is read from -1, the value of the total number of blanks TSP in the RAM 7 becomes the number of blanks in half-width units of each blank existing between words. That is, as shown in the text example of FIG. 9, even if a blank code is inserted at the end of the line from the character position at the end of the last word to the right margin position, this blank is not counted in the total number of blank spaces TSP. It is cut off as it is. Therefore, the total number of blanks T
The value of SP is a total value obtained by counting each blank existing between words in half-width units.
【0017】このような文字数・空白数解析処理が終る
と、図4のステップA8に進み、先読み処理の終了条件
が成立したかをチェックする。ここで、先読み処理の終
了条件は (1)、現在の桁カウントCCTの値が右マージン位置
と等しくなったとき。 (2)、現在のテキストアドレスTXAがその行のエン
ドアドレスと等しくなったとき。 (3)、改行コードがテキストメモリ7−1から読み出
されたとき。 (4)、印刷対象のテキストが終了したとき。 等である。ここで、終了条件成立が検出されなければ、
ステップA9に進み、RAM7内のテキストアドレスT
XA、桁カウントCCTを更新したのちステップA6に
進み、次のテキストコードが文字であれば、そのプロポ
ーショナルデータの積み上げ処理を行う。以下、同様の
処理(プロポーショナルデータの積み上げ処理および文
字数・空白数解析処理)を1文字毎に実行する。When the character number / blank count analysis process is completed, the process proceeds to step A8 in FIG. 4 to check whether the prefetch process termination condition is satisfied. Here, the prefetch process end condition is (1) when the current digit count CCT value becomes equal to the right margin position. (2) When the current text address TXA becomes equal to the end address of the line. (3) When the line feed code is read from the text memory 7-1. (4) When the text to be printed is finished. Etc. Here, if the satisfaction of the termination condition is not detected,
The process proceeds to step A9 and the text address T in the RAM 7
After updating the XA and digit count CCT, the process proceeds to step A6, and if the next text code is a character, the proportional data is accumulated. Thereafter, similar processing (proportional data stacking processing and character count / blank count analysis processing) is executed for each character.
【0018】ここで、先読み処理の終了条件が検出され
ると、その後処理が行われる。即ち、ステップA5でR
AM7内の退避メモリに保存しておいたテキストアドレ
スと桁カウントを読み出してそれをRAM7内にテキス
トアドレスTXA、桁カウントCCTとして戻しておく
(ステップA10)。次に、改行コードで終了した場合
か、単語間に空白が存在しなかった場合かをチェックす
る(ステップA11)。ここで、改行コードで終了した
り、単語間に空白が存在しない場合にはプロポーショナ
ルデータの右端揃えて行わないようにする為に、ステッ
プA13に進み、テキストアドレスTXA、桁カウント
CCTを更新しながらテキストメモリ7−1から1文字
ずつテキストコードを読み出し、それを印刷データに展
開して印字バッファ11に配置する。つまり、上述の様
な場合には、1行分のテキストを通常通りに展開配置し
てゆく。そして、右端揃えに必要となるプロポーショナ
ルデータの累積ドット数ACD、文字数カウントCN
C、合計空白数TSP等を初期化しておく(ステップA
14)。When the end condition of the prefetching process is detected, the process is performed thereafter. That is, R in step A5
The text address and digit count stored in the save memory in AM7 are read out and returned in RAM7 as text address TXA and digit count CCT (step A10). Next, it is checked whether it ends with a line feed code or there is no space between words (step A11). Here, in order not to end with a line feed code or to align the right end of the proportional data when there is no space between words, the process proceeds to step A13, while updating the text address TXA and the digit count CCT. The text code is read from the text memory 7-1 one character at a time, developed into print data, and placed in the print buffer 11. That is, in the above case, one line of text is expanded and arranged as usual. Then, the cumulative dot number ACD and the character number count CN of proportional data required for right edge alignment
C, the total number of blanks TSP, etc. are initialized (step A
14).
【0019】一方、ステップA11で示した条件で終了
しなかった場合にはステップA12に進み、空白割り当
てサイズ算出処理を行う。この空白割り当てサイズ算出
処理は行の左の所定位置から右マージン位置までのドッ
トサイズをプロポーショナルデータを展開する展開エリ
アサイズDVAとして求めたのち、この展開エリアサイ
ズDVAからプロポーショナルデータの累積ドット数A
CDを減算することにより空白割り当てサイズSALを
求める処理である。On the other hand, if the processing is not completed under the conditions shown in step A11, the process proceeds to step A12 to perform a blank allocation size calculation process. In this blank allocation size calculation processing, the dot size from the predetermined position on the left side of the line to the right margin position is obtained as the expanded area size DVA for expanding the proportional data, and then the accumulated dot number A of the proportional data is calculated from the expanded area size DVA.
This is a process of obtaining the blank allocation size SAL by subtracting CD.
【0020】図7はこの空白割り当てサイズ算出処理を
示したフローチャートである。先ず、予め設定されてい
る設定書式から右マージン桁位置を読み出し、この右マ
ージン桁位置から現在の桁カウントCCTの値を減算す
ることによって展開エリア桁サイズを求めておく(ステ
ップD1)。例えば、図9に示す様に、右マージン位置
をX、展開エリア桁サイズをYとすると、「Y=X−桁
カウントCCT」の演算が行われる。ここで、右マージ
ン位置を「14」、桁カウントCCTを「3」とする
と、展開エリア桁サイズYは「11」となる。このよう
にして求めた展開エリア桁サイズYを用いて次のステッ
プD2では仮想的な展開エリアドットサイズを求める。
ここで、仮想的な展開エリアドットサイズをZとする
と、 Z=Y+(先読みに入る直前の文字の半角単位数)×半
角桁ピッチのドットサイズ の演算を行って仮想的な展開エリアドットサイズZを求
める(図9参照)。なお、先読みに入る直前の文字とは
図9のテキスト例では最初の文字Aであり、この文字の
半角単位数とは半角単位で何個分に相当するかを示すも
ので、図9のテキスト例では「1」となる。FIG. 7 is a flow chart showing this blank allocation size calculation processing. First, the right margin digit position is read from the preset setting format, and the expansion area digit size is obtained by subtracting the value of the current digit count CCT from this right margin digit position (step D1). For example, as shown in FIG. 9, when the right margin position is X and the expanded area digit size is Y, the operation of "Y = X-digit count CCT" is performed. Here, when the right margin position is "14" and the digit count CCT is "3", the expanded area digit size Y is "11". In the next step D2, a virtual development area dot size is obtained using the development area digit size Y thus obtained.
Here, assuming that the virtual expansion area dot size is Z, the virtual expansion area dot size Z is calculated by performing the following operation: Z = Y + (number of half-width unit of character just before starting prefetching) × half-width digit pitch dot size (See FIG. 9). It should be noted that the character just before starting prefetching is the first character A in the text example of FIG. 9, and the number of half-width units of this character indicates how many half-width units it corresponds to. In the example, it is “1”.
【0021】このようにして仮想的な展開エリアのドッ
トサイズZを算出したら、これを用いて次のステップD
3では実質的な展開エリアのドットサイズを求める。こ
こで、先読みに入る直前の文字のプロポーショナルデー
タにおけるフォントボディサイズCを求め、「展開エリ
アサイズDVA=Z−C」の演算を行うことにより実質
的な展開エリアのドットサイズDVAを求め、RAM7
に記憶させる(ステップD4)。次に、空白割り当てサ
イズSALの算出を行う(ステップD5)。この場合、 空白割り当てサイズSAL=展開エリアサイズDVA−
プロポーショナルデータの累積ドット数ACD の演算によって空白割り当てサイズSALを求め、これ
をRAM7に記憶させる(ステップD6)。このように
空白割り当てサイズSALを求める場合には、先ず、展
開エリア桁サイズYを求め、これを用いて仮想的な展開
エリアのドットサイズZを求める。次に、この仮想的な
展開エリアドットサイズZから実質的な展開エリアサイ
ズDVAを求める。更に、この展開エリアサイズDVA
からプロポーショナルデータの累積ドット数ACDを減
算することにより空白割り当てサイズSALを求める。After the dot size Z of the virtual development area is calculated in this way, it is used in the next step D.
In 3, the actual dot size of the development area is obtained. Here, the font body size C in the proportional data of the character just before the prefetch is obtained, and the "expansion area size DVA = Z-C" is calculated to obtain the substantial expansion area dot size DVA.
(Step D4). Next, the blank allocation size SAL is calculated (step D5). In this case, blank allocation size SAL = expanded area size DVA−
The blank allocation size SAL is obtained by calculating the cumulative dot number ACD of the proportional data, and this is stored in the RAM 7 (step D6). When the blank allocation size SAL is calculated in this way, first, the expansion area digit size Y is calculated, and the dot size Z of the virtual expansion area is calculated using this. Next, the substantial development area size DVA is obtained from the virtual development area dot size Z. Furthermore, this development area size DVA
The blank allocation size SAL is obtained by subtracting the cumulative dot number ACD of the proportional data from.
【0022】そして、図4のステップA15に進み、先
読み文字配置処理を行う。図8はこの先読み文字配置処
理を示したフローチャートである。先ず、テキストアド
レスTXAにしたがってテキストメモリ7−1をアクセ
スし、これによって現在読み出し中のテキストコードは
空白かをチェックする(ステップE1)。いま、文字コ
ードが読み出された場合には通常と同様にそのプロポー
ショナルデータを印字バッファ11に展開配置する(ス
テップE2)。そして、次の文字の印字オフセットを求
めておく(ステップE3)。Then, the process proceeds to step A15 in FIG. 4, and the look-ahead character arrangement process is performed. FIG. 8 is a flow chart showing this prefetching character arrangement processing. First, the text memory 7-1 is accessed according to the text address TXA, whereby it is checked whether the text code currently being read is blank (step E1). When the character code is read out, the proportional data is expanded and arranged in the print buffer 11 as usual (step E2). Then, the print offset of the next character is obtained (step E3).
【0023】一方、現在読み出し中のテキストコードが
空白コードであれば、ステップE4に進み、現在の空白
数PSCを算出する。つまり、現在読み出し中の空白が
半角単位で何個分に相当するかを示す現在の空白数PS
Cを求め、これを用いて次のステップE5では現在の空
白ドット数PSDを求める。ここで、現在の空白ドット
数PSDは 現在の空白ドット数PSD=空白割り当てサイズSAL
×(合計空白数TSP/現在の空白数PSC) の演算によって求める。次に、次回の空白計算用の空白
割り当てサイズSALを次式にしたがって算出してRA
M7に保持しておく。 空白割り当てサイズSAL=空白割り当てサイズSAL
−現在の空白ドット数PSD 更に、次回の空白計算用の合計空白数TSPを次式にし
たがって算出してRAM7に保持しておく(ステップE
7)。 合計空白数TSP=合計空白数TSP−現在の空白数P
SC 次に、上述の様にして求めた現在の空白ドット数PSD
分の空白を生成して印字バッファ11に展開配置する
(ステップE8)。そして次の文字の印字オフセットを
求めておく(ステップE9)。On the other hand, if the text code currently being read is a blank code, the process proceeds to step E4 to calculate the current blank number PSC. That is, the current number of blanks PS, which indicates how many blanks are currently being read in half-width units
C is obtained, and using this, the present number of blank dots PSD is obtained in the next step E5. Here, the current blank dot number PSD is the current blank dot number PSD = blank allocation size SAL
Calculated by the calculation of × (total number of blanks TSP / current number of blanks PSC). Next, the space allocation size SAL for the next space calculation is calculated according to the following formula and RA
Keep at M7. Blank allocation size SAL = Blank allocation size SAL
-Current blank dot number PSD Further, the total blank number TSP for the next blank calculation is calculated according to the following equation and stored in the RAM 7 (step E
7). Total number of blanks TSP = Total number of blanks TSP-Current number of blanks P
SC Next, the present number of blank dots PSD obtained as described above
A minute blank is generated and developed and arranged in the print buffer 11 (step E8). Then, the print offset of the next character is obtained (step E9).
【0024】このように印字バッファ11に空白を展開
配置する際には、上述の計算手順にしたがって現在の空
白ドット数PSDを求めて空白配置する為に、各単語間
の空白は均一となる。例えば、図9のテキスト例では文
字B、C間の空白コードが読み出された場合には「空白
割り当てサイズSAL×1/2=現在の空白ドット数P
SD」の演算が行われ、また次の文字D、E間の空白コ
ードが読み出された場合には「空白割り当てサイズSA
L×1/1=現在の空白ドット数PSD」の演算が行わ
れる。As described above, when the blanks are developed and arranged in the print buffer 11, the current blank dot number PSD is obtained according to the above-described calculation procedure and the blanks are arranged, so that the spaces between the words are uniform. For example, in the text example of FIG. 9, when the blank code between the characters B and C is read, “blank allocation size SAL × 1/2 = current blank dot number P
"SD" is performed, and when a blank code between the following characters D and E is read, "blank allocation size SA
L × 1/1 = current number of blank dots PSD ”is calculated.
【0025】同様に図10に示すテキスト例では最初の
単語間の空白は全角、半角、次の単語間の空白は半角、
全角と成っているので、合計空白数TSPは「6」とな
る。この場合、最初の全角の空白コードが読み出された
ときには、「空白割り当てサイズSAL×2/6=現在
の空白ドット数PSD」の演算が行われる。また次の半
角の空白コードが読み出された場合には、「空白割り当
てサイズSAL×1/4=現在の空白ドット数PSD」
の演算が行われ、……最後の全角空白が読み出された場
合には「空白割り当てサイズSAL×2/2=現在の空
白ドット数PSD」の演算が行われる。Similarly, in the text example shown in FIG. 10, the space between the first word is full-width, half-width, and the space between the next words is half-width,
Since it is full-width, the total number of blanks TSP is "6". In this case, when the first full-width blank code is read, the calculation of "blank allocation size SAL x 2/6 = current blank dot number PSD" is performed. When the next half-width blank code is read, "blank allocation size SAL x 1/4 = current blank dot number PSD"
When the last full-width blank is read, the calculation of "blank allocation size SAL x 2/2 = current blank dot number PSD" is performed.
【0026】次に、図4のステップA16に進み、現在
のテキストアドレスTXAと退避アドレスTSAとを比
較し、両者が一致するかをチェックする。ここで、退避
アドレスTSAは図6のステップC3で退避されたテキ
ストアドレスであり、このテキストアドレスは先読み処
理が終了した段階で最後の単語の末尾の文字を読み出し
たときのテキストアドレスである。いま、テキストに網
かけやアンダーライン等の修飾が施されている場合にお
いて、1行分のテキストを印字バッファ11に全て展開
配置したのちであってもテキストの行末部分に網かけ等
が施されていると、その行末部分の網かけ等も展開配置
されてしまう。これを防止する為に、ステップA16で
はテキストアドレスTXAが退避アドレスTSAに達し
たときに文字配置を強制的に終了させる。即ち、図11
に示す様に、1行分のテキスト全体に網かけが施されて
いる場合(最後の単語の末尾の文字位置から右マージン
位置までの空白にも網かけが施されている場合)にはこ
の行末の網かけを印字バッファ11に展開配置させない
為に、テキストアドレスTXAが退避アドレスTSAに
達したときに文字配置を強制的に終了させる。この為、
テキスト入力時において網かけやアンダーライン等が行
末部分の空白にかかってしまうか否かを気にすることな
く、文字修飾の指定が可能となる。Next, in step A16 of FIG. 4, the current text address TXA is compared with the save address TSA to check whether they match. Here, the save address TSA is the text address saved in step C3 of FIG. 6, and this text address is the text address when the last character of the last word is read at the stage when the prefetching process is completed. Now, in the case where the text is modified by shading or underlining, even after all the text for one line is expanded and arranged in the print buffer 11, the line end portion of the text is shaded. If you do, the shaded parts at the end of the line will be expanded and arranged. In order to prevent this, in step A16, the character arrangement is forcibly ended when the text address TXA reaches the save address TSA. That is, FIG.
As shown in, if the whole text for one line is shaded (the blank from the character position at the end of the last word to the right margin position is also shaded), In order to prevent the shaded lines at the end of the line from being expanded and arranged in the print buffer 11, the character arrangement is forcibly terminated when the text address TXA reaches the save address TSA. Therefore,
It is possible to specify the character decoration without worrying about whether the half-tone or the underline will be applied to the white space at the end of the line when entering the text.
【0027】いま、ステップA16でテキストアドレス
TXAが退避アドレスTSAに達していないことが検出
されると、ステップA17に進み、テキストアドレスT
XA、桁カウントCCTの更新を行ってからステップA
15に戻り、以下、同様に先読み文字の配置処理を繰り
返す。ここで、テキストアドレスTXAが退避アドレス
TSAと一致すると、1行印字終了と判断し、ステップ
A18に進み、RAM7内の行カウント(図示せず)を
更新する。これによって、1行印刷処理は終了する。以
下、印刷対象のテキストメモリ7−1の内容を全て印刷
し終るまで上述の1行印刷処理を繰り返す。これによっ
てプロポーショナルフォント使用時でも1ドット単位で
正確に各行の右端を揃えて印刷することができる。When it is detected in step A16 that the text address TXA has not reached the save address TSA, the process proceeds to step A17, where the text address TA is reached.
Step A after updating XA and digit count CCT
Returning to step 15, the look-ahead character arrangement process is repeated in the same manner. Here, when the text address TXA matches the save address TSA, it is determined that the printing of one line is completed, the process proceeds to step A18, and the line count (not shown) in the RAM 7 is updated. This completes the one-line printing process. Hereinafter, the above-described one-line printing process is repeated until all the contents of the text memory 7-1 to be printed are printed. As a result, even when a proportional font is used, the right ends of the lines can be accurately aligned and printed in dot units.
【0028】図9は最後の文字位置から右マージン位置
までを空白コードで埋めた場合のテキスト例を示した
が、図12の様に最後の文字位置から右マージン位置ま
でが未入力のテキストであっても図9の場合と同様に処
理される。つまり、行末部分に空白コードが挿入されて
いても未入力であってもプロポーショナルデータの右端
揃えを行うジャスティフィケーション処理には何ら影響
を与えず、各行の右端を正確に揃えることができる。FIG. 9 shows an example of the text when the space from the last character position to the right margin position is filled with a blank code. As shown in FIG. 12, the text from the last character position to the right margin position is a blank text. Even if there is, it is processed in the same manner as in the case of FIG. In other words, even if a blank code is inserted at the end of a line or no blank code is input, the justification process for aligning the right edge of proportional data is not affected at all, and the right edge of each line can be aligned exactly.
【0029】図13は拡大文字が存在する場合のテキス
ト例で、拡大率の異なる文字が混在していてもプロポー
ショナルデータの累積ドット数ACDを求める場合に
は、文字の倍率をプロポーショナルデータのフォントボ
ディサイズに累算する。また、半角単位で桁数をカウン
トする桁カウントCCTには拡大文字の場合に半角単位
で何個分に相当するかを示す半角数分の値が累積され
る。この為、拡大文字が混在していてもプロポーショナ
ルデータのジャスティフィケーション処理には何ら影響
を与えず、各行の右端を上述の場合と同様に正確に揃え
ることができる。FIG. 13 shows an example of text in the case where enlarged characters exist. Even when characters having different enlargement ratios are mixed, when the cumulative dot number ACD of proportional data is obtained, the magnification of the characters is set to the font body of proportional data. Accumulate to size. Further, in the digit count CCT that counts the number of digits in half-width units, a value for half-width numbers indicating the number of half-width units in the case of enlarged characters is accumulated. Therefore, even if the enlarged characters are mixed, it does not affect the justification process of proportional data, and the right ends of the lines can be aligned exactly as in the case described above.
【0030】図14は実際の印刷例を示し、(A)はプ
ロポーショナルデータの右端揃えを行わない場合の印刷
例、(B)は右端揃えを行った場合の印刷例を示し、本
実施例においては図14の(B)に示す様に、各行の右
端は正確に揃えられ、全くバラツキが生じない状態で印
刷することが可能となる。この場合、図14の(A)の
中に便宜上付した改行マーク位置についてはジャスティ
フィケーション処理は行われない為、その行の右端は改
行位置となる。また、右端が揃えられた文字の最終ドッ
ト位置はそのプロポーショナルデータのフォントボディ
サイズの最終位置と等しくなる。FIG. 14 shows an actual printing example, FIG. 14A shows a printing example when the right edge alignment of proportional data is not performed, and FIG. 14B shows a print example when the right edge alignment is performed. As shown in FIG. 14B, the right ends of the lines are accurately aligned, and printing can be performed without any variation. In this case, since the justification process is not performed for the line feed mark position added for convenience in FIG. 14A, the right end of the line is the line feed position. The final dot position of the character whose right ends are aligned is equal to the final position of the font body size of the proportional data.
【0031】図15はテキストに網かけ、アンダーライ
ンが付されたテキストの印刷例である。ここで、図15
の(A)に示す様に、テキストの1行目、2行目の行末
部分において、その最後の文字位置の後にも網かけが施
されていても、本実施例においては、図15の(B)に
示す様に、プロポーショナルデータの右端揃え印刷を行
うと、その部分の修飾は右端揃え位置でカットされ、そ
の位置から大きくはみ出して印刷されることはない。な
お、網かけやアンダーライン等の右端位置はプロポーシ
ョナルデータの右サイドベアリング位置となる。FIG. 15 is a print example of text in which text is shaded and underlined. Here, FIG.
As shown in FIG. 15A, in the first line and the second line of the text, even if the last character position is shaded at the end of the line, in the present embodiment, as shown in FIG. As shown in B), when the right edge alignment printing of the proportional data is performed, the decoration of that portion is cut at the right edge alignment position, and the print does not largely extend from that position. In addition, the right end position such as shading and underline is the right side bearing position of proportional data.
【0032】図16は拡大文字が含まれている場合のテ
キスト印刷例を示し、テキスト中に拡大率の異なる文字
が混在していても各行の右端位置は正確に揃えられるこ
とは上述の場合と同様である。これは拡大文字を半角単
位で処理する為である。FIG. 16 shows an example of text printing in the case where enlarged characters are included. Even if the characters having different enlargement ratios are mixed in the text, the right end positions of the lines are correctly aligned as in the case described above. It is the same. This is because enlarged characters are processed in half-width units.
【0033】以上の様に本実施例においては、1行分の
テキスト印刷の際、最後の文字位置から右マージン位置
までの行末部分に空白コードが挿入されているか、その
行末部分が未入力であるか、あるいはその行末部分にも
網かけやアンダーライン等の修飾が施されているか、更
にはテキスト中に拡大文字が含まれているかに関係な
く、プロポーショナルデータの各行をドット単位で正確
に揃えることが可能となる。As described above, in this embodiment, when printing one line of text, a blank code is inserted at the end of the line from the last character position to the right margin position, or the end of the line is not entered. Exactly, each line of proportional data is aligned in dot units, regardless of whether there is a decoration such as shading or underlining at the end of the line, or whether the text contains enlarged characters. It becomes possible.
【0034】なお、上記実施例は印字バッファ11に1
行分のプロポーショナルデータを展開配置するようにし
たが、印字バッファ11としてページメモリを使用して
1ページ分のプロポーショナルデータを展開配置するよ
うにしてもよい。また、上記実施例においてはプロポー
ショナルデータを印刷データとして印字バッファ11に
展開配置する前に行われる先読み処理の開始条件として
行頭部分の最初の文字を除いて2文字目から開始するよ
うにしたが、1文字目の最初の文字から先読み処理を開
始してもよい。In the above embodiment, the print buffer 11 has one
Although the proportional data for the line is expanded and arranged, the page memory may be used as the print buffer 11 and the proportional data for one page may be expanded and arranged. Further, in the above embodiment, the pre-reading process performed before expanding and arranging the proportional data as the print data in the print buffer 11 is started from the second character except the first character at the beginning of the line. The look-ahead process may be started from the first character of the first character.
【0035】[0035]
【発明の効果】この発明によれば、少なくとも1行分の
プロポーショナルデータを展開メモリに配置する前に、
プロポーショナルデータの右端揃えに必要な各種パラメ
ータを算出しておき、テキストメモリの内容を順次読み
出して展開メモリに配置する際に、各種パラメータに基
づいて空白ドット数を求め単語間に挿入配置するように
したから、プロポーショナルフォント使用時でも1ドッ
ト単位で正確に各行の右端を揃えて印刷することが可能
となる。According to the present invention, before arranging at least one row of proportional data in the expansion memory,
When calculating various parameters required for right edge alignment of proportional data and sequentially reading the contents of the text memory and arranging them in the expansion memory, calculate the number of blank dots based on various parameters and insert them between words. Therefore, even when the proportional font is used, the right ends of the lines can be accurately aligned and printed in units of one dot.
【図1】実施例に係るワードプロセッサの全体構成を示
したブロック図。FIG. 1 is a block diagram showing an overall configuration of a word processor according to an embodiment.
【図2】図1に示すRAM7の内容を示した図。FIG. 2 is a diagram showing the contents of a RAM 7 shown in FIG.
【図3】プロポーショナルデータを説明する為の図。FIG. 3 is a diagram for explaining proportional data.
【図4】1行印刷処理を示したフローチャート。FIG. 4 is a flowchart showing a one-line printing process.
【図5】図4のステップA6(プロポーショナルデータ
積み上げ処理)を詳細に示したフローチャート。FIG. 5 is a flowchart showing in detail step A6 (proportional data accumulation processing) in FIG.
【図6】図4のステップA7(文字数・空白数解析処
理)を詳細に示したフローチャート。FIG. 6 is a flowchart showing in detail step A7 (character count / blank count analysis process) in FIG. 4;
【図7】図4のステップA12(空白割り当てサイズ算
出処理)を詳細に示したフローチャート。FIG. 7 is a flowchart showing in detail step A12 (blank allocation size calculation processing) in FIG.
【図8】図4のステップA15(先読み文字配置処理)
を詳細に示したフローチャート。FIG. 8 is a step A15 in FIG. 4 (look-ahead character arrangement process).
Is a flow chart showing in detail.
【図9】最後の文字位置から右マージン位置までの行末
部分に空白コードが挿入されている場合のテキスト例を
示した図。FIG. 9 is a diagram showing an example of text when a blank code is inserted at the end of a line from the last character position to the right margin position.
【図10】先読み文字配置処理を説明する為のテキスト
例を示した図。FIG. 10 is a diagram showing an example of text for explaining a prefetching character arrangement process.
【図11】最後の文字位置から右マージン位置までの行
末部分に網かけが施されている場合のテキスト例を示し
た図。FIG. 11 is a diagram showing an example of text in a case where a line end portion from the last character position to the right margin position is shaded.
【図12】最後の文字位置から右マージン位置までの行
末部分が未入力の場合のテキスト例を示した図。FIG. 12 is a diagram showing an example of text when the line end portion from the last character position to the right margin position has not been input.
【図13】拡大文字が含まれている場合のテキスト例を
示した図。FIG. 13 is a diagram showing an example of a text when an enlarged character is included.
【図14】欧文テキストの印刷例で、(A)はプロポー
ショナルデータの右端揃えを行わない場合、(B)は右
端揃えを行った場合の印刷例を示した図。FIG. 14 is a diagram showing a printing example of a European text, in which (A) shows a case where right edge alignment of proportional data is not performed, and (B) shows a print example when right edge alignment is performed.
【図15】網かけ、アンダーラインが施されているテキ
スト印刷例で、(A)はプロポーショナルデータの右端
揃えを行わない場合、(B)は右端揃えを行った場合の
印刷例を示した図。FIG. 15 is a diagram showing a text printing example in which half-shading and underlining are applied, (A) shows a printing example in which the right edge of proportional data is not aligned, and (B) shows a print example in which the right edge is aligned. .
【図16】拡大文字が含まれている場合のテキスト印刷
例を示した図。FIG. 16 is a diagram showing an example of text printing when enlarged characters are included.
1 CPU 2 ROM 6 プリンタ 7 RAM 11 印字バッファ 12 印刷制御部 TXA テキストアドレス CCT 桁カウント ACD プロポーショナルデータの累積ドット数 TSP 合計空白数 DVA 展開エリアサイズ SAL 空白割り当てサイズ PSC 現在の空白数 PSD 現在の空白ドット数 1 CPU 2 ROM 6 Printer 7 RAM 11 Print buffer 12 Print control unit TXA Text address CCT Digit count ACD Cumulative number of proportional data dots TSP Total number of blank spaces DVA Expansion area size SAL Current number of blank spaces PSD Number of current blank dots number
───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 G06F 17/21 G09G 5/00 510 P 9471−5G ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical display location G06F 17/21 G09G 5/00 510 P 9471-5G
Claims (1)
タを印刷データとして展開メモリに配置する前に、単語
間の空白を除いた少なくとも1行分の各プロポーショナ
ルデータの文字幅をドット単位で累積することによりプ
ロポーショナルデータの累積ドット数ACDを求めると
共に、単語間に存在する各空白を半角単位で計数するこ
とにより半角単位の合計空白数TSPを求め、 行の左の所定位置から右マージン位置までのドットサイ
ズをプロポーショナルデータを展開する展開エリアサイ
ズDVAとして求めると共に、この展開エリアサイズD
VAからプロポーショナルデータの累積ドッド数ACD
を減算して空白割り当てサイズSALを求め、 テキストメモリの内容を順次読み出して展開メモリに配
置する際に、プロポーショナルデータが読み出された場
合には、このプロポーショナルデータを展開メモリに直
接配置し、また、空白データが読み出された場合には、
現在読み出し中の空白データが半角単位で何個分に相当
するかを示す現在の空白数PSCを求めると共に、半角
単位の合計空白数TSPを現在の空白数PSCで除算
し、その値に空白割り当てサイズSALを乗算してその
値を、現在読み出し中の空白データに対する空白ドッド
数PSDとして求めてこのドット数分の空白を展開メモ
リに配置し、かつ空白割り当てサイズSALから現在の
空白ドット数PSDを減算してその値を次回の空白計算
用の空白割り当てサイズSALとして求めておくと共
に、半角単位の合計空白数TSPから現在の空白数PS
Cを減算してその値を次回の空白計算用の合計空白数T
SPとして求めておく、 ようにしたことを特徴とするプロポーショナルデータの
右端揃え印刷方法。1. The character width of each proportional data for at least one line excluding the space between words is accumulated in dot units before arranging the proportional data for at least one line as print data in a development memory. The cumulative number of dots ACD of proportional data is calculated, and the total number of blanks TSP in half-width units is calculated by counting each space existing between words in half-width units. The dot size from the left predetermined position of the line to the right margin position Is calculated as the expansion area size DVA for expanding the proportional data, and the expansion area size D
Accumulated number of proportional data from VA ACD
Is subtracted to obtain the space allocation size SAL, and when proportional data is read when sequentially reading the contents of the text memory and arranging them in the expansion memory, the proportional data is directly allocated in the expansion memory, and , If blank data is read,
The current blank number PSC indicating the number of blank data currently read in half-width units is calculated, and the total blank number TSP in half-width units is divided by the current blank number PSC, and the value is assigned to the blank space. The size SAL is multiplied and the value is obtained as the number of blank dots PSD for the blank data currently being read, the blank for the number of dots is arranged in the expansion memory, and the current number of blank dots PSD is calculated from the blank allocation size SAL. The value is subtracted to obtain the space allocation size SAL for the next space calculation, and the current number of spaces PS is calculated from the total number of spaces TSP in half-width units.
C is subtracted and the value is calculated as the total number of blanks T for the next blank calculation T
A right edge aligned printing method for proportional data, characterized in that it is obtained as SP.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5199896A JPH0732700A (en) | 1993-07-20 | 1993-07-20 | Right-edge aligned printing method of proportional data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP5199896A JPH0732700A (en) | 1993-07-20 | 1993-07-20 | Right-edge aligned printing method of proportional data |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH0732700A true JPH0732700A (en) | 1995-02-03 |
Family
ID=16415411
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP5199896A Pending JPH0732700A (en) | 1993-07-20 | 1993-07-20 | Right-edge aligned printing method of proportional data |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH0732700A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012053264A (en) * | 2010-09-01 | 2012-03-15 | Nec Infrontia Corp | Font conversion device and method, and private branch exchange system using the same |
-
1993
- 1993-07-20 JP JP5199896A patent/JPH0732700A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012053264A (en) * | 2010-09-01 | 2012-03-15 | Nec Infrontia Corp | Font conversion device and method, and private branch exchange system using the same |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US4417322A (en) | Report generation control system for text processing machines | |
KR860001071B1 (en) | How to edit document | |
US4650349A (en) | Speed typing apparatus and method | |
US4393463A (en) | Insertion of character set change codes in an altered text stream | |
US4462701A (en) | Printing system wherein justification determination is shared between a host processor and a printer | |
CA1175578A (en) | Word processing system having a formatting bidirectional printer | |
EP0313399B1 (en) | Text processing apparatus | |
EP0449322B1 (en) | Text processing apparatus with formatting of text | |
JPH0732700A (en) | Right-edge aligned printing method of proportional data | |
JPS6017487A (en) | How to automatically set the line pitch of a document creation device | |
EP0119396B1 (en) | Apparatus for and methods of presenting or displaying data represented as electric signals | |
JP2816181B2 (en) | Document processing device | |
US4402058A (en) | Keyboard mismatch correction | |
CA1146104A (en) | Destination referenced tab operations for typewriters that store text | |
EP0094546B1 (en) | Footnote management for display and printing | |
EP0052711B1 (en) | Method of processing text by insertion of a block of text in a text processing system | |
JP2763227B2 (en) | Format determination method | |
JPH05298317A (en) | Doucment forming device | |
US5162993A (en) | Word processing apparatus | |
JPS6137671B2 (en) | ||
JP2535059B2 (en) | Character processor | |
CA1172373A (en) | Method of justification for a line of text containing complex characters | |
KR900005769B1 (en) | Ribbon Saving Method by Character Analysis in Electronic Typewriter | |
JPH0666066B2 (en) | Document processor with furigana addition function | |
JP3282647B2 (en) | Overlay printing system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070413 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080408 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080704 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20080801 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Effective date: 20080828 Free format text: JAPANESE INTERMEDIATE CODE: A61 |
|
R150 | Certificate of patent (=grant) or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110905 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Year of fee payment: 3 Free format text: PAYMENT UNTIL: 20110905 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Year of fee payment: 4 Free format text: PAYMENT UNTIL: 20120905 |
|
FPAY | Renewal fee payment (prs date is renewal date of database) |
Year of fee payment: 5 Free format text: PAYMENT UNTIL: 20130905 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |