JPH05298317A - Doucment forming device - Google Patents
Doucment forming deviceInfo
- Publication number
- JPH05298317A JPH05298317A JP4104171A JP10417192A JPH05298317A JP H05298317 A JPH05298317 A JP H05298317A JP 4104171 A JP4104171 A JP 4104171A JP 10417192 A JP10417192 A JP 10417192A JP H05298317 A JPH05298317 A JP H05298317A
- Authority
- JP
- Japan
- Prior art keywords
- word
- character
- output
- line
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Document Processing Apparatus (AREA)
- Record Information Processing For Printing (AREA)
Abstract
(57)【要約】
【目的】 行末で単語が分割されることなく、バランス
のよいきれいな欧文出力を得ることを目的とする。
【構成】 行末にかかる単語“morning”の行末
からはみ出す長さ(行末から単語の末尾までの長さ)
が、作業者が指定する追込み可能量以内であれば、この
単語より前のスペースを均等に縮小して単語を行内に追
込み、追込み可能量以上であれば、その単語の行末内に
入る長さ(“m”から行末までの長さ)を調べ、その長
さが作業者が指定する追出し可能量以内であればその単
語を次の行に追出すとともに、行内のスペースを均等に
拡大して、追出した単語より前の単語を行末揃えする。
(57) [Summary] [Purpose] The purpose is to obtain a well-balanced and beautiful European text output without dividing words at the end of lines. [Structure] The length of the word "morning" at the end of a line that extends beyond the end of the line (the length from the end of the line to the end of the word)
However, if it is within the fillable amount specified by the operator, the space before this word is evenly reduced to push the word into the line, and if it is equal to or more than the fillable amount, the length within the line end of the word Check (the length from "m" to the end of the line), and if the length is within the ejectable amount specified by the operator, the word is ejected to the next line, and the space in the line is expanded evenly. , Align the words before the word that was kicked out.
Description
【0001】[0001]
【産業上の利用分野】本発明は、文書データを書式デー
タに従ってディスプレイやプリンタ等の出力装置に出力
するワードプロセッサやデスクトップパブリッシングシ
ステム等の文書作成装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a document creation device such as a word processor or a desktop publishing system for outputting document data to an output device such as a display or a printer according to format data.
【0002】[0002]
【従来の技術】近年、アウトラインフォントの普及にも
見られるように、作成した文書をいかに美しく出力する
かという出力の高品質化が強く求められている。出力の
高品質化といっても、例えばアウトラインフォントを用
いるとか、画像の解像度を高めるといったような、フォ
ントや画像データ等、出力する個々のデータ自体に関す
ることや、レイアウトの美しい文書を作成できるような
機能に関すること等、様々な見方で検討が行われてい
る。後者の場合の一例として、欧文に関する処理が挙げ
られる。2. Description of the Related Art In recent years, as seen in the popularization of outline fonts, there has been a strong demand for high quality output of how beautifully a created document is output. Even if the quality of output is improved, it is possible to create a document with a beautiful layout such as using fonts or image data, such as using outline fonts or increasing the resolution of images, and individual data to be output. It is being examined from various perspectives, such as about various functions. An example of the latter case is processing relating to European languages.
【0003】従来の文書作成装置では、欧文の出力に際
して、単語が行末にかかってしまう場合には、一つの単
語内で不自然に分割がなされないように、先ず、音節等
その単語を分割しても問題ない部分で改行し、次行の文
頭(つまり、分割された単語の後ろ部分)にハイフン
(“−”)を付与したり(以下、このような機能をハイ
フネーションという)、どうしても分割ができない場合
に、その単語の先頭から、強制的に改行するといった処
理が行われていた。In a conventional document creation apparatus, when a word is output at the end of a line when it is output in a European language, the word is first divided into syllables so that the word is not unnaturally divided. Even if there is no problem, you can add a hyphen (“-”) to the beginning of the next line (that is, the part after the word that was divided) (hereinafter, such a function is called hyphenation). When it was not possible, the process of forcing a line break from the beginning of the word was performed.
【0004】[0004]
【発明が解決しようとする課題】しかしながら上記従来
の文書作成装置では、ハイフネーションが行われた部分
では、単語が分割され見辛くなり、又、強制的に改行が
行われた部分では、図19に示すように、行末に空白が
できてしまい、文書全体のレイアウトの品質を損なうと
いう問題点を有していた。However, in the above-described conventional document creating apparatus, the word is divided at the hyphenated portion to make it difficult to see, and the forcibly broken line is shown in FIG. As shown in the figure, there is a problem that a blank is formed at the end of a line, which impairs the quality of the layout of the entire document.
【0005】本発明は、上記問題点に鑑み、欧文の文書
を出力する際、単語が分割されることなく各行末がきれ
いに揃い、かつ、単語間のバランスもきれいに整えるこ
とができる文書作成装置を提供することを目的とする。In view of the above-mentioned problems, the present invention provides a document creation apparatus capable of neatly aligning the end of each line without dividing words and neatly balancing words when outputting a document in European languages. The purpose is to provide.
【0006】[0006]
【課題を解決するための手段】本発明は上記した問題点
を解決するために、文字コード等からなるテキストと書
式データとを有する文書ファイルを記憶する文書記憶手
段と、文書記憶手段に記憶された文書ファイルを、文字
コードとその文字コードに対応する文字の出力位置情報
を有する出力用データに変換するデータ変換手段と、デ
ータ変換手段により変換が行われた出力用データに基づ
いて文書を出力する出力手段とを有し、データ変換手段
は、データの変換に際して算出する文字の出力位置情報
が所定の範囲外であった場合に、その文字が含まれる単
語を、当該単語より前の単語の間隔を縮小することによ
って所定の範囲内に出力できるか否かを判別する判別手
段と、判別手段によって出力できると判別された場合に
は、当該単語より前の単語の間隔を縮小するとともに、
当該単語の直後の先頭の文字の出力位置情報を次の行の
先頭位置とし、判別手段によって出力できないと判別さ
れた場合には、当該単語より前の単語の間隔を拡大する
とともに、当該単語の線と文字の出力位置情報を次の行
の先頭の位置とする手段とを有する。SUMMARY OF THE INVENTION In order to solve the above problems, the present invention stores a document file having a text file including a text such as a character code and format data, and a document storage unit that stores the document file. A document file based on the output data converted by the data conversion means and the data conversion means for converting the document file into output data having the output position information of the character code and the character corresponding to the character code. When the output position information of the character to be calculated at the time of converting the data is out of the predetermined range, the data conversion unit changes the word including the character to the word before the word. A determination unit that determines whether or not the output can be performed within a predetermined range by reducing the interval, and if it is determined that the output can be performed by the determination unit, With to reduce the spacing of the word,
When the output position information of the first character immediately after the word is set as the start position of the next line and it is determined that the output cannot be performed by the determination unit, the interval between the words before the word is increased and the word And means for setting the output position information of the line and the character as the start position of the next line.
【0007】[0007]
【作用】本発明は上記手段により、行末の単語が行内に
入りきれない場合に、行末の単語よりも前の単語の間隔
を縮小すれば、行末の単語が行内に入りきれれば単語の
間隔の縮小を行い、それでも入りきれなければ行末の単
語を次の行に送り、当該単語よりも前の単語の間隔を拡
大して行末揃えを行う。According to the present invention, when the word at the end of a line cannot fit in a line by the above means, if the interval between words before the word at the end of the line is reduced, if the word at the end of the line fits within the line, the word spacing is reduced. If the size of the word is reduced and if it still does not fit, the word at the end of the line is sent to the next line, and the space between the words before the word is increased to perform line justification.
【0008】[0008]
【実施例】以下、本発明の一実施例における文書作成装
置について説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS A document creating apparatus according to an embodiment of the present invention will be described below.
【0009】図1は、本発明の一実施例における文書作
成装置のブロック図であって、1は装置の制御やデータ
の処理等を行う中央演算処理装置(以下、CPUとい
う)、2はCPU1が処理を行うためのプログラム等を
記憶する読みだし専用メモリ(以下、ROMという)、
3はデータを記憶するためのランダムアクセスメモリ
(以下、RAMという)、4は文字出力に用いるフォン
トデータを記憶するフォントメモリ、5は様々なデータ
やユーザからの指示が入力されるキーボードやマウス等
の入力部、6は出力用のビットマップデータを記憶する
イメージメモリ、7はイメージメモリ6内のビットマッ
プデータを表示するディスプレイ装置、8は同じくビッ
トマップデータを印字出力するプリンタである。FIG. 1 is a block diagram of a document creating apparatus according to an embodiment of the present invention. Reference numeral 1 is a central processing unit (hereinafter referred to as CPU) for controlling the apparatus and processing data, and 2 is a CPU 1. A read-only memory (hereinafter referred to as a ROM) that stores programs and the like for processing
3 is a random access memory (hereinafter referred to as RAM) for storing data, 4 is a font memory for storing font data used for character output, and 5 is a keyboard or mouse to which various data and instructions from the user are input. 1, an image memory 6 for storing output bitmap data, a display device 7 for displaying the bitmap data in the image memory 6, and a printer 8 for printing out the bitmap data.
【0010】以下、RAM3に記憶されるデータについ
て説明を行う。RAM3内には、図2に示すように、文
書ファイル、出力用データ、書体情報、スペース情報、
追込み可能量・追出し可能量、現在出力位置(xD,yD
)、次文字出力位置(x1, y1)、行カウンタl 、txt
_point 、out _point 、ch_start0、ch_start1、po
int0、point1、sp_count 、ch_start _x 等のデータ
が記憶される。The data stored in the RAM 3 will be described below. In the RAM 3, as shown in FIG. 2, a document file, output data, typeface information, space information,
Amount of drive-in / amount of drive-out, current output position (xD, yD
), Next character output position (x1, y1), line counter l, txt
_Point, out _point, ch_start0, ch_start1, po
Data such as int0, point1, sp_count, ch_start_x, etc. are stored.
【0011】文書ファイルは、図3に示すように、文書
を構成する文字の文字コード列からなるテキストと、テ
キストを出力する際の書式データを有する。又、書式デ
ータは、具体的には、文字サイズ、文字送り量、行送り
量、書体名、用紙サイズ、頁位置、頁幅、頁高等のデー
タを有する。ここでいう頁位置とは、用紙サイズによっ
て定まる出力用紙内に定義される頁(つまり、データが
出力される出力領域)の、用紙の左上の点を基準とした
位置を意味する。文字等の出力位置は、この頁位置に対
する相対座標で表され、実際の出力に際して、その座標
は用紙を基準とした座標に変換される。本実施例では、
以下、相対座標から用紙を基準とした座標への変換につ
いては説明を省略する。As shown in FIG. 3, the document file has a text consisting of character code strings of characters constituting the document and format data for outputting the text. Further, the format data specifically includes data such as character size, character feed amount, line feed amount, typeface name, paper size, page position, page width, and page height. The page position referred to here means a position of a page defined in the output paper defined by the paper size (that is, an output area in which data is output) with reference to the upper left point of the paper. The output position of a character or the like is represented by relative coordinates with respect to this page position, and in actual output, the coordinates are converted into coordinates with the paper as a reference. In this example,
Hereinafter, the description of the conversion from the relative coordinates to the coordinates based on the paper will be omitted.
【0012】出力用データは、上述した文書ファイルが
変換されるもので、図4に示すように、文字コード列か
らなる出力用テキスト、出力用書式データ、行管理情報
等から構成されている。出力用書式データは、出力用テ
キスト内の各文字に対する出力位置や書体名を有する。
出力用書式データ内における各文字ごとのデータ量は決
まっているので、ある文字が出力用テキスト内の何文字
目に記憶されているかがわかると、その文字に対する出
力用書式データは容易に取得される。又、行管理情報
は、出力用テキストデータ内の文字列が出力された場
合、各行の最終文字が、出力用テキストデータ内の何文
字目であるかを記憶する。この行管理情報には、第0行
目の最終文字位置として、“0”があらかじめ設定され
ている。The output data is obtained by converting the above-mentioned document file, and as shown in FIG. 4, is composed of output text consisting of character code strings, output format data, line management information and the like. The output format data has an output position and a typeface name for each character in the output text.
The amount of data for each character in the output format data is fixed, so if you know which character in the output text is stored in the output text, the output format data for that character can be easily obtained. It Further, the line management information stores the number of the character in the output text data, which is the last character of each line, when the character string in the output text data is output. In this line management information, "0" is preset as the last character position of the 0th line.
【0013】書体情報は、図5に示すように、英文字が
それぞれ固有に持つ文字幅と、文字高を書体名毎に記憶
している。英文の場合、書体によって文字幅が異なる。
又、同じ書体であっても、文字毎にその文字幅が異なっ
ている。例えば、“A”という文字と“I”という文字
では、“A”は文字幅が広く、“I”は“A”に比べて
文字幅が狭い。故にこのような書体情報が必要となる。As shown in FIG. 5, the typeface information stores a character width and a character height unique to each English character for each typeface name. In the case of English, the character width differs depending on the typeface.
In addition, even in the same typeface, the character width is different for each character. For example, in the characters "A" and "I", "A" has a wide character width, and "I" has a narrower character width than "A". Therefore, such typeface information is required.
【0014】スペース情報は、基本的な全角のスペース
の幅、1/2スペースの幅、1/3スペースの幅を有す
る。本実施例の文書作成装置では、スペースとして全
角、全角に対して1/2の文字幅を有する1/2スペー
ス、全角に対して1/3の文字幅を有する1/3スペー
スという3種類のスペースを処理可能とし、基本的な全
角スペースは、12ポイントの和文文字と同一の文字幅
を有するものとしている。このスペースは、本実施例の
場合のように3種類に限定されるものではなく、文字コ
ードを割り当てることができれば更に1/4スペース等
種類を増やすことも可能である。The space information has a basic full-width space width, a 1/2 space width, and a 1/3 space width. In the document creating apparatus of the present embodiment, there are three types of spaces: full-width, half-space having half the character width for the full-width, and one-third space having the width of 1/3 for the full-width. Spaces can be processed, and a basic full-width space has the same character width as a 12-point Japanese character. This space is not limited to three kinds as in the case of the present embodiment, and if the character code can be assigned, the number of kinds such as ¼ space can be further increased.
【0015】追込み可能量と追出し可能量は、ユーザに
よって指定される実変数である。ここでいう追込み・追
出しとは、欧文の出力に際して、単語が行末にかかった
場合に、その単語を行内の他の単語間を詰めてその行に
出力してしまう処理(追込み)と、その単語を次の行に
出力して、もとの行内の他の単語間を広げて行末揃えを
行う処理(追出し)のことをいう。追込み可能量とは、
行末にかかる単語の行末からはみ出す部分の長さがこの
量よりも小さければ追込みを行うという、追込み処理の
基準となる値であり、又、追出し可能量とは、行末にか
かる単語の行内に入る部分の長さがこの量よりも小さけ
れば追出しを行うという、追出し処理の基準となる値で
ある。本実施例のように追込み可能量と追出し可能量を
実変数とするのではなく、文字数で定義することも考え
られるが、英文字の場合には、文字によって文字幅のば
らつきが大きく、例えば“HAWAII”という単語
と、“TOKYO”という単語では、追込み可能量を2
文字と指定していれば、“II”の部分と“YO”の部
分で実際の幅がまったく異なるにもかかわらず、どちら
の単語も追込み処理が行われる。つまり、“TOKY
O”の場合の方が大きく字詰めを行う必要があるので、
その行は“HAWAII”の行よりも詰まった感じがし
て、全体として文書のバランスが損なわれる。本実施例
のように、追込み・追出し可能量を実変数で定義するこ
とにより、追込みや追出し処理を行った際の、各行間で
の欧文のバランスを損なうことなくきれいな出力を得る
ことができる。The reposable amount and the releasable amount are real variables designated by the user. The term "push-in / push-out" as used here means, when a word is output at the end of a line when it is output in a European language, the process of adding that word to other lines in the line and outputting it to that line Is output to the next line and the other words in the original line are expanded to perform line ending justification (exit). What is the amount that can be pushed in?
This is a value that is the reference value for the tracking process, that is, if the length of the part of the word at the end of the line that extends beyond the end of the line is smaller than this amount, it is the standard value for the add-in process. This is a reference value for the eviction process, in which eviction is performed if the length of the portion is smaller than this amount. Although it is possible to define the number of characters that can be driven in and the amount of characters that can be driven out as real variables as in the present embodiment, in the case of English characters, there is a large variation in the character width depending on the character. For the word "HAWAII" and the word "TOKYO", the amount
If a character is specified, the embedding process is performed for both words, although the actual widths of the "II" part and the "YO" part are completely different. In other words, "TOKY
In the case of "O", it is necessary to perform the letter packing larger, so
That line feels tighter than the "HAWAII" line, and overall the document is out of balance. As in the present embodiment, by defining the amount that can be pushed in and pushed out by a real variable, it is possible to obtain a clean output without impairing the balance of the Roman characters between the lines when performing the pushing in or pushing out process.
【0016】現在出力位置(x0,y0)は、文書ファ
イル内のテキストから読み出される文字を出力するため
の位置情報で、文字幅や行送り量にって1文字毎に計算
され、これをもとにして出力用書式データの出力位置が
設定される。又、次文字出力位置(x1,y1)は、現
在出力位置をもとに算出されるデータで、処理中の文字
の次の文字が出力されるべき位置を表す。文字の出力の
際には、指定された文字コード・書体名に応じたフォン
トデータが、フォントメモリ4から読み出され、図18
に示すように、フォントデータの左上の点を基準とし
て、その文書の式に従って算出された位置に出力され
る。The current output position (x0, y0) is position information for outputting the character read from the text in the document file, and is calculated for each character according to the character width and the line feed amount. Then, the output position of the output format data is set. The next character output position (x1, y1) is data calculated based on the current output position and represents the position where the character next to the character being processed should be output. When outputting characters, font data corresponding to the designated character code / typeface name is read from the font memory 4,
As shown in, the upper left point of the font data is used as a reference and is output at the position calculated according to the formula of the document.
【0017】行カウンタlは、文書中の何行目の処理が
行われているかを示すデータである。The line counter 1 is data indicating which line in the document is being processed.
【0018】txt _point は、文書ファイル中のテキス
ト内へのポインタ、又、out _point は、出力用データ
中の出力用テキスト内へのポインタである。これらの値
は、テキスト及び出力用テキストの先頭から何文字目か
を表すデータであって、テキスト及び出力用テキストへ
のアクセスは、これらのポインタと別途保持されるテキ
ストや出力用テキストの先頭アドレス(特に図示せず)
とを用いて行われる。Txt_point is a pointer into the text in the document file, and out_point is a pointer into the output text in the output data. These values are data indicating the number of characters from the beginning of the text and output text, and access to the text and output text is performed by using these pointers and the start address of the text or output text that is held separately. (Not specifically shown)
Is done using and.
【0019】ch_start0・ch_start1・point0・point1
は、特定の処理が行われた場合に、上記したtxt _poin
t 及びout _point を記憶しておく変数である。又、sp
_count は、行内のスペースの数を数えるためのカウン
タ、ch_start _x は、出力用データから読み出された
文字の出力位置情報を一時記憶する変数である。Ch_start0, ch_start1, point0, point1
Is the above txt_poin when a specific process is performed.
This is a variable that stores t and out_point. Also sp
_Count is a counter for counting the number of spaces in the line, and ch_start_x is a variable for temporarily storing the output position information of the character read from the output data.
【0020】RAM3内には、これらのデータ以外にも
様々なデータが記憶されるが、それについては、以下、
必要に応じて詳細に説明を行うこととする。Various data other than these data are stored in the RAM 3, which will be described below.
A detailed explanation will be given as necessary.
【0021】以上のように構成された本実施例の文書作
成装置について、以下、その動作を説明する。The operation of the document creating apparatus of this embodiment constructed as described above will be described below.
【0022】CPU1は、RAM3内の文書ファイルを
出力用データに変換し、出力用データから1文字ずつデ
ータを読み、その文字に対応するフォントをフォントメ
モリ4から読みだして、文字の出力位置に基づいて、イ
メージメモリ6内にフォントを書きこむ。イメージメモ
リ6内のデータは、ディスプレイ7又はプリンタ8へと
出力される。The CPU 1 converts the document file in the RAM 3 into output data, reads the data from the output data character by character, reads the font corresponding to the character from the font memory 4, and outputs the font to the character output position. Based on this, the font is written in the image memory 6. The data in the image memory 6 is output to the display 7 or the printer 8.
【0023】以下、図6から図13のフローチャートを
用いて詳細な動作説明を行う。 (1)追込み可能量・追出し可能量の指定 先ず、ステップ1において、CPU1は入力部5から追
込み可能量の入力が行われるのを待ち、入力が行われる
と、入力された値を追込み可能量としてRAM3に書き
込む。次に、ステップ3において、今度は追出し可能量
の入力待ち状態となり、入力が行われると、ステップ4
において、入力された値を追出し可能量としてRAM3
に書き込む。The detailed operation will be described below with reference to the flowcharts of FIGS. 6 to 13. (1) Designation of possible drive-in amount and drive-out possible amount First, in step 1, the CPU 1 waits for the input of the driveable amount from the input unit 5, and when the input is made, the input value is the driveable amount. Is written in RAM3. Next, in step 3, this time, the state of waiting for input of the ejectable amount is entered, and when input is performed, step 4
In the RAM3, the input value is set as the savable amount.
Write in.
【0024】本実施例では、追込み可能量と追出し可能
量は、ミリ単位で定義され、最少0.1間隔で設定可能
である。 (2)文書ファイルから出力用データへの変換 先ず、ステップ11において、現在出力位置(x0,y
0)が(0,0)に初期化される。続いて、ステップ1
2において、行カウンタlが1に初期化される。更に、
ステップ13及びステップ14において、txt _point
とout _pointがそれぞれ1に初期化される。In the present embodiment, the reposable amount and the releasable amount are defined in units of millimeters and can be set at a minimum interval of 0.1. (2) Conversion from Document File to Output Data First, in step 11, the current output position (x0, y
0) is initialized to (0,0). Then, step 1
At 2, the row counter 1 is initialized to 1. Furthermore,
In steps 13 and 14, txt_point
And out_point are initialized to 1.
【0025】所定の初期化が終わると、CPU1は、ス
テップ15において、文書ファイル内のテキストからtx
t _point が指示する文字コードを1文字分読み出す。
読み出した文字コードが改行コードであった場合には、
処理はステップ101へ、又、改行コードではなかった
場合には、処理はステップ17へと移行する。更にステ
ップ17において、読み取った文字コードがテキストの
終了を示すコード(EOF)かどうかが調べられ、EO
Fであれば処理は終了し、EOFでなければ処理はステ
ップ18へと移行する。When the predetermined initialization is completed, the CPU 1 determines in step 15 that the text in the document file is tx.
Reads the character code indicated by t_point for one character.
If the read character code is a line feed code,
The process proceeds to step 101, and when it is not the line feed code, the process proceeds to step 17. Further, in step 17, it is checked whether the read character code is a code (EOF) indicating the end of the text, and EO
If it is F, the process ends, and if it is not EOF, the process proceeds to step 18.
【0026】ステップ18において、CPU1は、次文
字出力位置x1を算出する。次文字出力位置x1は、現
在出力位置x0にステップ15で読み出した文字の文字
幅を加えることによって求まる。この時CPU1は、文
書ファイル中の書式データにおける書体名を調べ、RA
M3内の書体情報の、該当する書体名・文字コードに関
する文字幅を参照する。次文字出力位置x1が算出され
ると、ステップ19において、ステップ15で読み出さ
れた文字が行内(頁内)に入りきるかどうかが調べられ
る。実際には、x1と文書中の書式データに定義されて
いる頁幅との大小比較が行われ、x1の方が大き場合に
は、文字が行からはみ出すとして処理はステップ29へ
と移行し、x1の方が小さい場合には、文字が行内に入
るとして処理はステップ20へと移行する。このことを
図示してより具体的に説明すると、図14に示すよう
に、次文字出力位置x1は次に読み出される文字が出力
されるべき位置情報であると同時に、現在処理されてい
る文字の終端位置情報でもあることがわかる。即ち、こ
の次文字出力位置x1が行末よりも後ろにあれば(x1
>頁幅)、その文字は行内に入らないし、次文字出力位
置x1が行末よりも前にあれば(x1≦頁幅)、その文
字は行内に入る。In step 18, the CPU 1 calculates the next character output position x1. The next character output position x1 is obtained by adding the character width of the character read in step 15 to the current output position x0. At this time, the CPU 1 checks the typeface name in the format data in the document file,
Refer to the character width related to the corresponding typeface name and character code in the typeface information in M3. When the next character output position x1 is calculated, it is checked in step 19 whether or not the character read in step 15 can fit within the line (within the page). In reality, x1 and the page width defined in the format data in the document are compared in size, and if x1 is larger, it is determined that the character is out of the line, and the process proceeds to step 29. If x1 is smaller, it is determined that the character is in the line, and the process proceeds to step 20. This will be described in more detail with reference to FIG. 14. As shown in FIG. 14, the next character output position x1 is the position information at which the next read character should be output, and at the same time, the next character output position x1 indicates the character currently processed. It can be seen that this is also end position information. That is, if this next character output position x1 is after the end of line (x1
> Page width), the character does not fit in the line, and if the next character output position x1 is before the end of the line (x1 ≦ page width), the character fits in the line.
【0027】ステップ15で読み出された文字が行内に
入る場合には、ステップ20において、先ず、その文字
の文字コードが出力用データの出力用テキストに書き込
まれる(out _point 指示する位置)。次に、ステップ
21において、現在出力位置(x0,y0)が、ステッ
プ20で書き込まれた文字コードに対応付けられて、出
力用書式データに書き込まれる。更に、ステップ22に
おいて、文書ファイル内に定義されている書体名が、現
在出力位置(x0,y0)と同様に出力用書式データに
書き込まれる。ステップ20からステップ22の処理に
よって、1文字分のデータの変換が終了することにな
る。When the character read in step 15 falls within the line, in step 20, the character code of the character is first written in the output text of the output data (the position designated by out_point). Next, in step 21, the current output position (x0, y0) is associated with the character code written in step 20 and written in the output format data. Further, in step 22, the typeface name defined in the document file is written in the output format data in the same manner as the current output position (x0, y0). By the processing from step 20 to step 22, the conversion of the data for one character is completed.
【0028】1文字分のデータ変換が終わると、ステッ
プ23において、現在出力位置x0の値が、次文字出力
位置x1の値に書き換えられる。ここで、ステップ24
において、ステップ20で出力用テキストに書き込まれ
た文字コードがスペースコードであったかどうかが調べ
られ(out _point が用いられる)、スペースコードで
あったならば、ステップ25及びステップ26の処理が
行われ、スペースコードではなかったならば、それらの
処理は行われない。When the data conversion for one character is completed, in step 23, the value of the current output position x0 is rewritten to the value of the next character output position x1. Where step 24
In step 20, it is checked whether or not the character code written in the output text in step 20 is a space code (out_point is used), and if it is a space code, steps 25 and 26 are performed, If it is not a space code, those operations are not performed.
【0029】ステップ25においては、RAM3内のch
_start0へ、txt _point に1を加えた値が設定され、
ステップ26においては、RAM3内のch_start1へ、
out_point に1を加えた値が設定される。単語間は、
スペースによって区切られるため、文書作成装置におい
ては、スペースによって挟まれる英文字列を1つの単語
として認識する。従って、単語の始まりには、必ずスペ
ースが存在するものであり、ステップ25及びステップ
26の処理では、単語の開始位置を保持しておこうとす
るものである。In step 25, ch in the RAM 3
The value obtained by adding 1 to txt_point is set to _start0,
At step 26, to ch_start1 in RAM3,
The value obtained by adding 1 to out_point is set. Between words,
Since it is divided by spaces, the document creation device recognizes an English character string sandwiched by spaces as one word. Therefore, there is always a space at the beginning of the word, and in the processing of steps 25 and 26, the starting position of the word is held.
【0030】以上、ステップ15からステップ26まで
の処理を経た後に、ステップ27及びステップ28にお
いて、txt _point とout _point の値がそれぞれ+1
更新されて(次の文字を指示する)、処理はステップ1
5に戻る。After the above processing from step 15 to step 26, in steps 27 and 28, the values of txt_point and out_point are respectively +1.
Updated (indication of next character), the process is step 1
Return to 5.
【0031】ステップ15からステップ28までの処理
は、文字が行末にかかるまで繰り返されるわけだが、次
に、文字が行末にかかる場合の処理について説明する。The process from step 15 to step 28 is repeated until the character reaches the end of the line. Next, the process when the character reaches the end of the line will be described.
【0032】ステップ19において、ステップ15で文
書ファイル内のテキストから読み出した文字が行内に入
りきれないとされた場合(x1>頁幅である)、ステッ
プ29において、その文字が英文字であるかどうかが調
べられる。本実施例の文書作成装置では、欧文の入力を
対象としているため、英文字でないものは改行コードか
EOFか、又はスペース(全角・1/2・1/3の3種
類ある)のいづれかであり、改行コードとEOFの判断
は、ステップ16とステップ17で既に行われているの
で、ステップ29では実質的にはその文字がスペースで
あるかどうかが判断されることになる。If it is determined in step 19 that the characters read from the text in the document file in step 15 cannot fit within the line (x1> page width), in step 29, is the character an English character? I can investigate. Since the document creating apparatus of the present embodiment is intended for inputting European characters, non-English characters are either line feed codes, EOF, or spaces (there are three types of full-width, 1/2, and 1/3). Since the line feed code and EOF have already been determined in steps 16 and 17, it is determined in step 29 whether or not the character is a space.
【0033】対象文字が英文字であったならば、ステッ
プ20以下、上述したデータ変換の処理が行われる。つ
まり、次にスペースが来るまでは、ステップ15からス
テップ28までの処理がステップ29を経由して繰り返
される。ステップ29において、対象文字が英文字でな
いと判断された場合には、ステップ30において、RA
M3内のpoint0へtxt _point の値が、又、ステップ3
1において、RAM3内のpoint1へout _point の値が
それぞれ設定される。即ち、point0とpoint1は、行末か
らはみ出す単語の最終文字の次の文字が記憶されるテキ
スト及び出力用テキスト内のポインタ値を記憶すること
になる。If the target character is an English character, the above-described data conversion process is performed from step 20 onward. That is, the process from step 15 to step 28 is repeated via step 29 until the next space comes. If it is determined in step 29 that the target character is not an alphabetic character, in step 30, RA
The value of txt_point to point0 in M3 is also step 3
1, the value of out_point is set to point1 in the RAM3. That is, point0 and point1 store the pointer value in the text in which the character next to the last character of the word protruding from the end of the line and the output text are stored.
【0034】ステップ30及びステップ31の処理の
後、ステップ32において、追込み量が算出され、ステ
ップ33において、算出された追い込み量とRAM3内
に記憶されている追込み可能量との大小比較が行われ
る。追込み量は、(x0−頁幅)によって求まる。ステ
ップ33の時点では、txt _point はテキストから最後
に読み取った文字(スペース)の位置を、又、out _po
int は出力用テキストに最後に書き込みを行った位置の
次の書き込み位置(テキストから最後に読み取った文字
は、出力用テキストへは書き込まれていない)を指示し
ている。つまり、その時点での現在出力位置x0は最後
に読み取られた文字(スペース)が本来出力されるべき
位置であって、これは、その前の文字の終端位置、即
ち、行末からはみ出した単語の終端位置であって、この
値から頁幅をひけば単語がはみ出す量(=追込み量)が
求まるわけである。このことを具体的に図面を用いて説
明する。After the processing of steps 30 and 31, in step 32, the drive-in amount is calculated, and in step 33, the calculated drive-in amount and the drive-in possible amount stored in the RAM 3 are compared in magnitude. .. The amount of embedding is determined by (x0-page width). As of step 33, txt_point is the position of the last character (space) read from the text, and out_po
int points to the next write position after the last write to the output text (the last character read from the text was not written to the output text). In other words, the current output position x0 at that time is the position where the last read character (space) should be originally output, and this is the end position of the character before that, that is, the word that extends beyond the end of the line. At the end position, if the page width is subtracted from this value, the amount of the word protruding (= the amount of trailing) can be obtained. This will be specifically described with reference to the drawings.
【0035】図15において、今、morningとい
う単語が行末にかかり、この単語に続くスペースまで読
み出しが行われているものとする。この状態において、
RAM3内の文書ファイル内のテキスト、出力用データ
内の出力用テキスト・出力用書式、txt _point 、o ut
_point 、x0はそれぞれ図16に示すようになってい
る。即ち、x0は図15から明らかなように、スペース
が本来出力されるべき位置ch3 _x であり、この値から
頁幅をひいた値が、追込み量となる。In FIG. 15, it is assumed that the word "morning" is placed at the end of the line and the space following the word is read. In this state,
Text in the document file in RAM3, output text / output format in output data, txt_point, o ut
_Point and x0 are as shown in FIG. That is, x0 is the position ch3_x at which the space should be originally output, as is apparent from FIG. 15, and the value obtained by subtracting the page width from this value is the amount of padding.
【0036】ステップ33において、RAM3に記憶さ
れた追込み可能量と、ステップ32で算出した追込み量
との大小比較が行われた結果、追込み可能量の方が大き
かった場合(追込み量が追込み可能領内であった場
合)、図8に示す処理が行われる。In step 33, as a result of the size comparison of the reposable amount stored in the RAM 3 and the refillable amount calculated in step 32, if the refillable amount is larger (the drive-in amount is within the refillable region). If it is), the process shown in FIG. 8 is performed.
【0037】図8において、先ず、ステップ41で処理
中の行内における行末にかかる単語より前のスペースの
数がカウントされる。この結果をもとにしてステップ4
2において、実際にどのくらい追込みが可能なのかを示
す追込み可能最大量が求められ、ステップ43におい
て、追込み量と追込み最大可能量の大小比較によって、
本当に追込みが可能か否かが調べられる。即ち、追込み
量が追込み最大可能量よりも小さければ、ステップ43
において、追込み処理が行われ、大きければ、追込み処
理は行われずに処理はステップ51へと移行する。ステ
ップ44における追い込み処理の後には、ステップ45
において、txt _point にRAM3内に記憶されている
point0の値が設定されて、処理はステップ101へと移
行する。In FIG. 8, first, in step 41, the number of spaces before the word at the end of the line in the line being processed is counted. Step 4 based on this result
In 2, the maximum possible amount of drive-in indicating how much the drive-in is actually possible is obtained, and in step 43, by comparing the amount of drive-in and the maximum possible drive-in amount,
You can check whether it is really possible to drive in. That is, if the amount of drive-in is smaller than the maximum possible amount of drive-in, step 43
In step S31, the close-up process is performed, and if it is large, the process proceeds to step 51 without performing the close-up process. After the drive-in process in step 44, step 45
Is stored in RAM3 at txt_point
The value of point0 is set, and the process proceeds to step 101.
【0038】ここでは、先ず、ステップ41におけるス
ペースをカウントする処理について説明する。First, the process of counting the space in step 41 will be described.
【0039】スペースのカウント処理は、図10に示す
フローチャートの手順に従って行われる。この処理に当
たり、先ず、ステップ61において、txt _point にch
_start0から1を減じた値が設定され(これにより、tx
t _point は行内に入った最後のスペース、即ち行末か
らはみ出した単語の直前のスペースを指示することにな
る)、ステップ62において、RAM3内のスペースカ
ウンタsp_count が0に設定される。それから、ステッ
プ63において、文書ファイル内のテキストから1文字
読みだされて、ステップ64において、読み出された文
字がスペースかどうかの判断が行われて、スペースであ
ればステップ65において、sp_countの値が+1更新
される。ステップ63からステップ65の処理は、ステ
ップ66においてtxt _point の値が減じられながら、
txt _point の値が(l−1)行目最終文字位置と等し
くなるまで繰り返される。(l−1)行目の最終文字位
置は、出力用データ中の行管理情報を、行カウンタlの
値を用いて参照することによって得られる。もし、処理
中の行が第1行目であった場合には、第0行目の最終文
字位置“0”が得られることになる。The space counting process is performed according to the procedure of the flowchart shown in FIG. In this process, first, in step 61, ch is set to txt_point.
The value obtained by subtracting 1 from _start0 is set (this causes tx
(t_point indicates the last space entered in the line, that is, the space immediately before the word that extends beyond the end of the line). In step 62, the space counter sp_count in the RAM 3 is set to 0. Then, in step 63, one character is read from the text in the document file, and in step 64, it is determined whether the read character is a space. If it is a space, the value of sp_count is determined in step 65. Is updated by +1. In the processing from step 63 to step 65, while the value of txt_point is reduced in step 66,
This is repeated until the value of txt_point becomes equal to the last character position on the (l-1) th line. The final character position of the (l-1) th line is obtained by referring to the line management information in the output data by using the value of the line counter l. If the line being processed is the first line, the final character position "0" of the 0th line is obtained.
【0040】ステップ42においては、 (sp_count )×(全角スペースサイズ)×(1/12) という計算によって、追込み可能最大量が算出される。
欧文の文字(単語)詰めは、無条件に文字間のスペース
を詰めてよいわけではなく、最大でもスペースの1/4
までなら、文字間のバランスを損なうことがないと一般
的に言われている。本実施例では、3種類のスペースに
対応していることから、1つのスペースにおける最大の
詰め量を1/3スペースの1/4、即ち全角スペースの
1/12と定める。それぞれのスペースにたいして、そ
の1/12だけ詰め量を設定する方法も考えられるが、
その場合には、スペースの大きい部分では大きく詰めら
れ、又、スペースの小さい部分では比較的に少量しか詰
められず、結果的に各スペースの大きさに差異がなくな
ってしまい、文書の作成者が意図的に異ならせた文字間
のスペースの大きさのバランスが崩れてしまう。本実施
例のように、各スペースにおける詰め量を均等とし、し
かもその上限値を最少のスペースサイズを基準に定めて
いれば、文字間のバランスを損なうことなく、しかも、
部分的に詰まりすぎて文書が見づらくなるようなことも
ない。In step 42, the maximum amount that can be inserted is calculated by the calculation of (sp_count) × (full-width space size) × (1/12).
When filling characters (words) in European languages, it is not necessary to unconditionally fill spaces between characters, and at most 1/4 of the space
Until then, it is generally said that the balance between letters is not compromised. In the present embodiment, since three types of spaces are supported, the maximum packing amount in one space is set to 1/4 of the 1/3 space, that is, 1/12 of the full-width space. Although it is possible to set the filling amount to 1/12 of each space,
In that case, the space of the space is large, and the space of the space is relatively small. As a result, there is no difference in the size of each space. The balance of the size of the space between the characters that is intentionally changed is lost. As in the present embodiment, if the filling amount in each space is made uniform and the upper limit value is determined based on the minimum space size, the balance between characters is not impaired, and
It's not too clogged to make the document hard to read.
【0041】次に、ステップ44における追込み処理に
ついて、図11のフローチャートを用いて説明する。Next, the follow-up process in step 44 will be described with reference to the flowchart of FIG.
【0042】前述しているように、追込みは、行内にお
いて行末からはみ出す単語よりも前にあるスペースを均
等に縮小する(詰める)ことによって、行われる。As described above, the padding is performed by uniformly reducing (filling) the space in the line before the word that extends from the end of the line.
【0043】先ず、ステップ71において、縮小するス
ペース数へsp_count の値を設定する。次に、ステップ
72において、ステップ32で算出された追込み量を、
ステップ71で設定されたスペース数で割ることによっ
て各スペース毎の詰め量が算出される。続いて、ステッ
プ73において、out _point へ(l−1)行目の最終
文字位置に1を加えた値(その行の先頭文字を指示す
る)が設定され、ステップ74において、変数(自然
数)iが0に初期化される。First, at step 71, the value of sp_count is set to the number of spaces to be reduced. Next, in step 72, the drive-in amount calculated in step 32 is
The packing amount for each space is calculated by dividing by the number of spaces set in step 71. Subsequently, in step 73, a value obtained by adding 1 to the last character position of the (l-1) th line (indicating the first character of the line) is set to out_point, and in step 74, a variable (natural number) i Are initialized to 0.
【0044】out _point と変数iの設定が終わると、
ステップ75からステップ79の処理によって、出力用
データの内、その行内に出力される文字の出力位置(x
座標)が変更される。即ち、ステップ75において、C
PU1は、出力用データの出力用テキストから1文字読
み出し、ステップ76において、読み出した文字に対応
する出力用書式データ内の出力位置(x座標)を、(詰
め量×i)だけ減じて更新する。その後、ステップ77
において、ステップ75で読み出した文字がスペースで
あるか否かを調べて、スペースであった場合にのみ、ス
テップ78において、変数iを+1更新する。ステップ
75からステップ78の処理は、ステップ79におい
て、out _point の値を+1づつ更新しながら、out _
point の値がRAM3内に記憶されたpoint1の値に等し
くなるまで繰り返される。point 1は、行内からはみ出
す単語の次のスペースを指示しているので、ステップ7
5からステップ78の処理は、その行頭から追込みを行
う単語の末尾まで繰り返されることになる。After setting out_point and the variable i,
By the processing of steps 75 to 79, the output position (x
Coordinate) is changed. That is, in step 75, C
The PU 1 reads one character from the output text of the output data, and updates the output position (x coordinate) in the output format data corresponding to the read character by subtracting (padding amount × i) in step 76. .. Then step 77
In step 78, it is checked whether or not the character read in step 75 is a space, and only when it is a space, the variable i is updated by +1 in step 78. In the processing from step 75 to step 78, in step 79, the value of out_point is updated by +1 while
This is repeated until the value of point becomes equal to the value of point1 stored in RAM3. Since point 1 points to the space next to the word that runs off the line, step 7
The processing from 5 to step 78 is repeated from the beginning of the line to the end of the word to be added.
【0045】ここまでは、ステップ33において、ステ
ップ32で求めた追込み量が、追込み可能量内であるば
あいの処理について説明を行ったが、以下、追込み量が
追込み可能量内ではない場合の処理について説明を行
う。Up to this point, the process has been described in step 33 when the drive-in amount obtained in step 32 is within the drive-in amount, but the process in the case where the drive-in amount is not within the drive-in amount is described below. Will be described.
【0046】ステップ33で追込み量が追込み可能量内
ではないと判断された場合、図9に示す処理が行われ
る。When it is determined in step 33 that the amount of drive-in is not within the amount of drive-in, the process shown in FIG. 9 is performed.
【0047】先ず、ステップ51において、out _poin
t にRAM3内に記憶されているch_start1から1を減
じた値が設定され、ステップ52において、そのout _
point が指示する出力用テキスト内の文字に対応する出
力用書式データの出力位置(x座標)が取得され、RA
M3内にch_start _x として設定される。次に、ステ
ップ53において、追出し量が算出されて、その結果を
もとに、ステップ54において、求めた追出し量とRA
M3内に記憶されている追出し可能量との大小比較が行
われる。ここで追出し量が追出し可能量よりも小さい場
合には、ステップ55において、単語の追出し処理が行
われ、追出し量が追出し可能量よりも大きい場合には、
ステップ56において、ハーイフネーション処理が行わ
れた後、ステップ57において、txt _point にRAM
3内に記憶されているpoint 0 の値が設定されて、処理
はステップ101へと移行する。First, in step 51, out_poin
A value obtained by subtracting 1 from ch_start1 stored in the RAM 3 is set in t, and in step 52, the out_
The output position (x coordinate) of the output format data corresponding to the character in the output text designated by point is acquired, and RA
It is set as ch_start_x in M3. Next, in step 53, the ejection amount is calculated, and based on the result, the ejection amount and RA obtained in step 54 are calculated.
A comparison is made with the expellable amount stored in M3. If the ejection amount is smaller than the ejection possible amount, the word ejection process is performed in step 55, and if the ejection amount is larger than the ejection possible amount,
After the hyphenation process is performed in step 56, the RAM is stored in txt_point in step 57.
The value of point 0 stored in 3 is set, and the processing shifts to step 101.
【0048】ステップ51からステップ54の処理につ
いて、図17を用いて具体的に説明する。ステップ51
の時点において、ch_start1は、行末にかかる単語の先
頭文字の出力用テキスト内における位置を記憶してい
る。従って、ステップ51の処理によって、out _poin
t は、その単語の直前のスペースを指示することにな
る。即ちステップ52で取得されるch_start _x の値
は、そのスペースの開始位置として登録されている位置
の値である。追出し処理では、行末にかかる単語の直前
のスペース以降を次の行に送る必要があるので、図17
に示すように、頁幅からch_start _x の値をひいた値
が追出し量となる。ステップ54においては、この追出
し量と、RAM3内に記憶されている追出し可能量との
大小比較によって、追出し処理を行うか、ハイフネーシ
ョン処理を行うかが判断される。The processing of steps 51 to 54 will be specifically described with reference to FIG. Step 51
At the point of time, ch_start1 stores the position in the output text of the first character of the word at the end of the line. Therefore, by the processing of step 51, out_poin
t will indicate the space immediately preceding the word. That is, the value of ch_start_x acquired in step 52 is the value of the position registered as the start position of the space. In the eviction process, since it is necessary to send the space immediately before the word at the end of the line and the subsequent lines to the next line,
As shown in, the value obtained by subtracting the value of ch_start_x from the page width is the ejection amount. In step 54, it is determined whether to perform the ejection process or the hyphenation process by comparing the ejection amount with the ejection possible amount stored in the RAM 3.
【0049】次に、ステップ55における追出し処理に
ついて、図12のフローチャートを用いて説明する。Next, the eviction process in step 55 will be described with reference to the flowchart of FIG.
【0050】追出し処理は、行末にかかる単語の直前の
スペース以降をその行から追出し、それより前の単語に
ついて、単語間のスペースを均等に広げて行末揃えする
ことによって行われる。The eviction process is performed by erasing the space after the space immediately before the word at the end of the line from the line, and evenly expanding the space between the words and aligning the ends of the lines.
【0051】先ず、CPU1は、ステップ81におい
て、処理対象となっている行内のスペースの数をカウン
トする(スペースのカウント処理は、図10に示すフロ
ーチャートの手順で行われるが、これについての説明
は、ステップ41の説明で既に行っているので、ここで
は詳細な説明を省略する)。次に、ステップ82におい
て、スペース数として、sp_c ountの値から1を減じた
値を設定し、ステップ83において、ステップ53で算
出された追出し量を、ステップ82で設定されたスペー
ス数で割ることによって各スペースにおける送り量の算
出を行う。追出し処理に際してのスペース数は、sp_co
unt の値から1を減じた値が使用されるが、これは、追
出し処理において、行末にかかる単語の直前のスペース
は、その行から追いだされるためである。続いて、ステ
ップ84において、out _point へ(l−1)行目の最
終文字位置に1を加えた値(その行の先頭文字を指示す
る)が設定され、ステップ85において、変数(自然
数)iが0に初期化される。First, in step 81, the CPU 1 counts the number of spaces in the line to be processed (the space counting process is performed according to the procedure of the flow chart shown in FIG. 10. , Which has already been described in step 41, so detailed description will be omitted here). Next, in step 82, a value obtained by subtracting 1 from the value of sp_count is set as the number of spaces, and in step 83, the ejection amount calculated in step 53 is divided by the number of spaces set in step 82. The feed amount in each space is calculated by. The number of spaces for the ejection process is sp_co
The value obtained by subtracting 1 from the value of unt is used, because in the eviction process, the space immediately before the word at the end of the line is ejected from the line. Subsequently, in step 84, a value obtained by adding 1 to the last character position of the (l-1) th line (indicating the first character of the line) is set to out_point, and in step 85, a variable (natural number) i Are initialized to 0.
【0052】out _point と変数iの設定が終わると、
ステップ86からステップ90の処理によって、出力用
データの内、その行内に出力される文字の出力位置(x
座標)が変更される。即ち、ステップ86において、C
PU1は、出力用データの出力用テキストから1文字読
み出し、ステップ87において、読み出した文字に対応
する出力用書式データ内の出力位置(x座標)に、(送
り量×i)加えて更新する。その後、ステップ88にお
いて、ステップ86で読み出した文字がスペースである
か否かを調べて、スペースであった場合にのみ、ステッ
プ89において、変数iを+1更新する。ステップ86
からステップ89の処理は、ステップ90において、ou
t _point の値を+1づつ更新しながら、out _p oint
の値がRAM3内に記憶されたch_start1の値に1を加
えた値に等しくなるまで繰り返される。ch_start1は、
行内かかる単語の先頭文字を指示しているので、ステッ
プ86からステップ89の処理は、その行頭から、追出
しを行う単語の直前の単語の末尾まで繰り返されること
になる。When out_point and the variable i are set,
By the processing from step 86 to step 90, the output position (x
Coordinate) is changed. That is, in step 86, C
The PU 1 reads one character from the output text of the output data, and in step 87, updates the output position (x coordinate) in the output format data corresponding to the read character by adding (feed amount × i). Then, in step 88, it is checked whether or not the character read in step 86 is a space, and only when it is a space, the variable i is updated by +1 in step 89. Step 86
From step 89 to step 90,
out _point while updating the value of t _point by +1
Is repeated until the value of is equal to the value of ch_start1 stored in the RAM3 plus one. ch_start1 is
Since the leading character of the word in the line is designated, the processes of steps 86 to 89 are repeated from the beginning of the line to the end of the word immediately before the word to be scavenged.
【0053】尚、ステップ43において、追込み可能で
はないと判断された場合についても、上記した場合と同
様に処理が行われる。Even when it is determined in step 43 that it is not possible to add the data, the same processing as described above is performed.
【0054】以上の処理によって、追込み・追出し・ハ
イフネーションのいづれかの処理が行われた後、又は、
ステップ16において、ステップ15で読み出された文
字が改行コードであると判断された場合における改行処
理について、図13のフローチャートを用いて説明す
る。By the above process, after any of the process of adding, extruding and hyphenating, or
A line feed process in the case where it is determined in step 16 that the character read in step 15 is a line feed code will be described with reference to the flowchart of FIG.
【0055】先ず、ステップ101において、出力用デ
ータ内の行管理情報の第l行目の最終出力文字位置(l
_last)に、RAM3に記憶されているpoint1の値を設
定して、ステップ102において、行カウンタlを+1
更新する。次に、ステップ103において、txt _poin
t の値が+1更新される。更に、ステップ104におい
て、現在出力位置y0に文書ファイル内の書式データに
定義されている行送り量が加えられ、ステップ105に
おいて、現在出力位置x0に行頭の位置0が設定された
後、処理はステップ15へと戻る。First, in step 101, the final output character position (l
_Last) is set to the value of point1 stored in the RAM 3, and the row counter l is incremented by 1 in step 102.
Update. Next, in step 103, txt_poin
The value of t is updated by +1. Further, in step 104, the line feed amount defined in the format data in the document file is added to the current output position y0, and in step 105, the line start position 0 is set to the current output position x0. Return to step 15.
【0056】本実施例のステップ56に示したハイフネ
ーション処理は、例えば単語間の文節に関する情報を辞
書等に記憶させ、その辞書を参照して、ハイフネーショ
ンによって単語を区切る位置を決定すればよい。ハイフ
ネーションを行った後には、追出し処理と同様にして、
行内に単語間のスペースを均等に拡大して行末揃えを行
う。In the hyphenation process shown in step 56 of the present embodiment, for example, information about clauses between words may be stored in a dictionary or the like, and the dictionary may be referred to to determine the position where a word is delimited by hyphenation. After hyphenation, in the same way as the eviction process,
Aligns the ends of the line by expanding the space between words evenly.
【0057】尚、ハイフネーションの方法には、様々な
方法が考えられるが、本実施例では詳細な説明を省略す
る。Although various methods of hyphenation can be considered, detailed description thereof will be omitted in this embodiment.
【0058】以上のように本実施例は、単語が行末にか
かる場合には、状況に応じて追込み・追出し等の処理を
行った後、行末揃えを行うので、バランスのよい欧文出
力を得ることができる。As described above, according to the present embodiment, when a word occurs at the end of a line, line endings are aligned after processing such as padding / pushing out according to the situation, so that a well-balanced European output can be obtained. You can
【0059】又、追込みも追出しも不可と判断された場
合にのみ、ハイフネーションを行うこととしたため、単
語が分割されることを極力少なくすることができる。Further, since hyphenation is performed only when it is judged that neither entry nor exit is possible, it is possible to minimize word division.
【0060】更に、追込み・追出し量を、文字数ではな
く長さで直接指定できるために、単語中の文字の文字幅
に左右されない、適切な追込み・追出し可能量の指定を
行うことができる。Furthermore, since the amount of embedding / discharging can be directly specified by the length, not the number of characters, it is possible to specify an appropriate amount of embedding / discharging that is not affected by the character width of the characters in the word.
【0061】尚、本実施例では、文書データ全体を一旦
出力用データに変換してから出力を行っているが、一文
字語とにデータの変換(位置情報の算出等)を行って文
字を出力して行くことも可能である。In this embodiment, the entire document data is once converted into the output data and then output, but the data is converted into one character word (calculation of position information etc.) and the character is output. It is also possible to go.
【0062】[0062]
【発明の効果】以上のように、本発明は、行末の単語が
行内に入りきれない場合に、行末の単語よりも前の単語
の間隔を縮小すれば、行末の単語が行内に入りきれれば
単語の間隔の縮小を行い、それでも入りきれなければ行
末の単語を次の行に送り、当該単語よりも前の単語の間
隔を拡大して行末揃えを行うため、行末で単語が分割さ
れることなく、行末がきれいに揃った、バランスのよい
出力結果を得ることができる。As described above, according to the present invention, when the word at the end of a line cannot fit in the line, if the interval between words before the word at the end of the line is reduced, the word at the end of the line can fit in the line. Words are divided at the end of the line because the word spacing is reduced, and if it still does not fit, the word at the end of the line is sent to the next line, and the word spacing before the word is expanded to align the lines. It is possible to obtain a well-balanced output result with neat line ends.
【図1】本発明の一実施例における文書作成装置のブロ
ック図FIG. 1 is a block diagram of a document creation device according to an embodiment of the present invention.
【図2】同実施例におけるデータ構成図FIG. 2 is a data configuration diagram in the same embodiment.
【図3】同実施例におけるデータ構成図FIG. 3 is a data configuration diagram in the same embodiment.
【図4】同実施例におけるデータ構成図FIG. 4 is a data configuration diagram in the same embodiment.
【図5】同実施例におけるデータ構成図FIG. 5 is a data configuration diagram in the example.
【図6】同実施例のフローチャートFIG. 6 is a flowchart of the same embodiment.
【図7】同実施例のフローチャートFIG. 7 is a flowchart of the embodiment.
【図8】同実施例のフローチャートFIG. 8 is a flowchart of the embodiment.
【図9】同実施例のフローチャートFIG. 9 is a flowchart of the same embodiment.
【図10】同実施例のフローチャートFIG. 10 is a flowchart of the same embodiment.
【図11】同実施例のフローチャートFIG. 11 is a flowchart of the same embodiment.
【図12】同実施例のフローチャートFIG. 12 is a flowchart of the same embodiment.
【図13】同実施例のフローチャートFIG. 13 is a flowchart of the same embodiment.
【図14】同実施例の説明図FIG. 14 is an explanatory diagram of the embodiment.
【図15】同実施例の説明図FIG. 15 is an explanatory diagram of the embodiment.
【図16】同実施例の説明図FIG. 16 is an explanatory diagram of the embodiment.
【図17】同実施例の説明図FIG. 17 is an explanatory diagram of the same embodiment.
【図18】同実施例の説明図FIG. 18 is an explanatory diagram of the same embodiment.
【図19】従来の文書作成装置の説明図FIG. 19 is an explanatory diagram of a conventional document creation device.
1 CPU 2 ROM 3 RAM 4 フォントメモリ 5 入力部 6 イメージメモリ 7 ディスプレイ 8 プリンタ 1 CPU 2 ROM 3 RAM 4 Font memory 5 Input section 6 Image memory 7 Display 8 Printer
Claims (3)
タとを有する文書ファイルを記憶する文書記憶手段と、
前記文書記憶手段に記憶された文書ファイルを、文字コ
ードとその文字コードに対応する文字の出力位置情報を
有する出力用データに変換するデータ変換手段と、前記
データ変換手段により変換が行われた出力用データに基
づいて文書を出力する出力手段とを有する装置であっ
て、前記データ変換手段は、データの変換に際して算出
する文字の出力位置情報が所定の範囲外であった場合
に、その文字が含まれる単語を、当該単語より前の単語
の間隔を縮小することによって前記所定の範囲内に出力
できるか否かを判別する判別手段を有し、前記判別手段
によって出力できると判別された場合には、当該単語よ
り前の単語の間隔を縮小するとともに、当該単語の直後
の先頭の文字の出力位置情報を次の行の先頭位置とし、
前記判別手段によって出力できないと判別された場合に
は、当該単語より前の単語の間隔を拡大するとともに、
当該単語の線と文字の出力位置情報を次の行の先頭の位
置とすることを特徴とする文書作成装置。1. A document storage means for storing a document file having text including a character code and format data.
Data conversion means for converting the document file stored in the document storage means into output data having a character code and output position information of a character corresponding to the character code; and an output converted by the data conversion means. A device for outputting a document based on the data for use, wherein the data conversion means outputs the character when the output position information of the character calculated when converting the data is out of a predetermined range. When a word included is judged to be output by the judging means, it has a judging means for judging whether or not the word before the word can be output within the predetermined range by reducing the interval between the words before the word. Is to reduce the interval between the words before the word, the output position information of the first character immediately after the word as the start position of the next line,
If it is determined that the word cannot be output by the determination unit, the word interval before the word is increased, and
A document creating apparatus characterized in that the output position information of the line and the character of the word is set to the start position of the next line.
って出力できると判別された場合に、単語の間隔を所定
の条件に従って均等に縮小することを特徴とする請求項
1記載の文書作成装置。2. The document creating apparatus according to claim 1, wherein the data converting means uniformly reduces the word interval according to a predetermined condition when it is judged by the judging means that the data can be outputted.
定の条件を越えた場合には、出力できないと判別するこ
とを特徴とする請求項1記載の文書作成装置。3. The document creating apparatus according to claim 1, wherein the determining means determines that the output cannot be performed when the reduction amount of the word interval exceeds a predetermined condition.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4104171A JPH05298317A (en) | 1992-04-23 | 1992-04-23 | Doucment forming device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP4104171A JPH05298317A (en) | 1992-04-23 | 1992-04-23 | Doucment forming device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH05298317A true JPH05298317A (en) | 1993-11-12 |
Family
ID=14373593
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP4104171A Pending JPH05298317A (en) | 1992-04-23 | 1992-04-23 | Doucment forming device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH05298317A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2003038661A1 (en) * | 2001-10-29 | 2003-05-08 | Sharp Kabushiki Kaisha | Document display device, wording method, and word display method |
| JP2013080357A (en) * | 2011-10-03 | 2013-05-02 | Zenrin Datacom Co Ltd | Control method for displaying multiple phrases, electronic apparatus, and control program for displaying multiple phrases |
-
1992
- 1992-04-23 JP JP4104171A patent/JPH05298317A/en active Pending
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2003038661A1 (en) * | 2001-10-29 | 2003-05-08 | Sharp Kabushiki Kaisha | Document display device, wording method, and word display method |
| US7543230B2 (en) | 2001-10-29 | 2009-06-02 | Sharp Kabushiki Kaisha | Document display device, wording method, and word display method |
| US8234567B2 (en) | 2001-10-29 | 2012-07-31 | Sharp Kabushiki Kaisha | Document display device, word arrangement method, and document display method |
| JP2013080357A (en) * | 2011-10-03 | 2013-05-02 | Zenrin Datacom Co Ltd | Control method for displaying multiple phrases, electronic apparatus, and control program for displaying multiple phrases |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6678410B1 (en) | Generating a glyph | |
| EP1416394B1 (en) | Method for selecting a font | |
| US6533822B2 (en) | Creating summaries along with indicators, and automatically positioned tabs | |
| EP0117405A2 (en) | Automatically balancing and vertically justifying text and/or graphics | |
| EP0117406A2 (en) | Automatically balancing and vertically justifying text and/or graphics | |
| JPH0640257B2 (en) | Information output device | |
| US6701023B1 (en) | Reducing appearance differences between coded and noncoded units of text | |
| US5689723A (en) | Method for allowing single-byte character set and double-byte character set fonts in a double-byte character set code page | |
| JPH06149806A (en) | Document shaping output device and document shaping method | |
| JPH05298317A (en) | Doucment forming device | |
| US5867174A (en) | Character/symbol generating device for generating character/symbol with a desired line thickness | |
| JP2816181B2 (en) | Document processing device | |
| US4689764A (en) | Method and apparatus for formatting a line of text containing a complex character prior to text justification | |
| JP2763227B2 (en) | Format determination method | |
| JPH05303577A (en) | Document creation device | |
| JPH01229673A (en) | English and european writing printing control system | |
| JPH09185603A (en) | Document creating apparatus and character string form control method | |
| JP4919245B2 (en) | Line composition device, line composition program and recording medium recording the same | |
| JPH0666066B2 (en) | Document processor with furigana addition function | |
| JP3341048B2 (en) | Document printing device | |
| JP2728906B2 (en) | Character processor | |
| EP0077891B1 (en) | System for formatting justified lines of text containing complex characters | |
| EP0391706A2 (en) | A method encoding text | |
| JP3437293B2 (en) | Character output method and character processing device | |
| JPH0417059A (en) | Document preparing device |