JPH0247080A - Character processor - Google Patents

Character processor

Info

Publication number
JPH0247080A
JPH0247080A JP63198532A JP19853288A JPH0247080A JP H0247080 A JPH0247080 A JP H0247080A JP 63198532 A JP63198532 A JP 63198532A JP 19853288 A JP19853288 A JP 19853288A JP H0247080 A JPH0247080 A JP H0247080A
Authority
JP
Japan
Prior art keywords
character
spaces
dots
space
remaining
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.)
Granted
Application number
JP63198532A
Other languages
Japanese (ja)
Other versions
JP2535059B2 (en
Inventor
Katsuhiko Toida
勝彦 樋田
Noriko Asada
浅田 詔子
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
KANSAI PANAFUAKOMU KK
PFU Ltd
Original Assignee
KANSAI PANAFUAKOMU KK
PFU Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by KANSAI PANAFUAKOMU KK, PFU Ltd filed Critical KANSAI PANAFUAKOMU KK
Priority to JP63198532A priority Critical patent/JP2535059B2/en
Publication of JPH0247080A publication Critical patent/JPH0247080A/en
Application granted granted Critical
Publication of JP2535059B2 publication Critical patent/JP2535059B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Character Spaces And Line Spaces In Printers (AREA)

Abstract

PURPOSE:To space-print arbitrary number of dots by converting the remainder to the number of dots when the number of spaces of a character row is divided by the number of character spaces, and feeding the number of dots of the result obtained by dividing the number of the converted dots by the number of charac ter spaces in the format of image data to a printer. CONSTITUTION:Uniformly divided space calculating means 12 divides the number of spaces (SP) to be uniformly divided by the number of character spaces (MK) to obtain the number of spaces to be disposed at character intervals, the value of its quotient is stored as the number of uniformly divided spaces (MS) in a register 18, and the number of remaining spaces (SPD) is stored in a register 19. Further, remaining space dot conversion means 13 calculates to convert the number of the spaces (SPD) into the actual number of printing dots in the printer. The number of the dots of the remaining space (dot) is divided by the number (MK), its quotient is stored as the number of the remaining dots (MD2) in a register 22.

Description

【発明の詳細な説明】 [概要] 一行の文章中の各文字を任意の区間内に均等に印刷する
均等割付印刷のための文字処理装置に関し、 均等割付の開始位置と終了位置が指定されると文字間に
厳密に均等な間隔を開けた均等割付印刷を実現する文字
処理装置を提供することを目的とし、 文字、数字、記号等の各種の文字コードからなる−行の
文字列について均等割付印刷を行うための文字処理装置
において、処理部は、均等割付範囲内の印刷すべき文字
とスペースとを識別して文字数とスペース数を計数する
文字識別手段と、前記文字数から文字間数を算出する文
字間数算出手段と、前記スペース数と文字間数に基づい
て均等割付スペース数と余りスペース数を求める均等割
スペース算出手段と、前記余りスペース数に基づいて余
りドツト数を算出する余りスペースのドツト換算手段と
、前記余りドツト数を均等割付スペース数に加算する余
りドツト数割付手段とを備え、さらに、処理部の印字デ
ータ発生手段は、文字データの間に前記均等割スペース
数分のスペースデータと、前記均等割ドツト数に余りド
ツト数に応じたドツトが加算された数のドツト分のスペ
ースを表すイメージデータを付加したデータ列を発生す
る印字データ発生手段を備えるよう構成する。
[Detailed Description of the Invention] [Summary] Regarding a character processing device for uniform layout printing that prints each character in a line of text evenly within an arbitrary section, the start position and end position of the uniform layout are specified. The purpose is to provide a character processing device that realizes evenly spaced printing with strictly equal spacing between characters. In a character processing device for printing, a processing unit includes a character identification means for identifying characters and spaces to be printed within an even allocation range and counting the number of characters and spaces, and calculating a character spacing from the number of characters. a means for calculating the number of spaces between characters, a means for calculating the number of evenly allocated spaces and a number of remaining spaces based on the number of spaces and the number of spaces between characters, a means for calculating the number of evenly allocated spaces and a number of remaining spaces, and a remaining space that calculates the number of remaining dots based on the number of remaining spaces. a dot conversion means, and a remainder dot number allocation means for adding the number of remaining dots to the number of evenly allocated spaces; The print data generating means is provided with a print data generating means for generating a data string in which space data and image data representing a space corresponding to the number of dots obtained by adding dots corresponding to the number of surplus dots to the number of evenly divided dots are added.

[産業上の利用分野] 本発明は、−行の文章中の各文字を任意の区間内に均等
に印刷する均等割付印刷のための文字処理装置に関する
[Industrial Field of Application] The present invention relates to a character processing device for uniform layout printing that evenly prints each character in a - line of text within an arbitrary interval.

近年、ワードプロセッサや文字処理機能を備えるワーク
ステーションが広く利用されるようになった。そのよう
な装置では、表示装置を見ながらキーボードを操作して
文字や記号等を入力して、各種の制御キーを用いて種々
の編集を行い、文字の大きさも全角、半角、拡大等の種
々の表現を使用することができる。
In recent years, workstations equipped with word processors and character processing functions have become widely used. In such devices, characters and symbols are entered by operating the keyboard while looking at the display device, and various editing operations are performed using various control keys. expressions can be used.

そのように作成した文章の一部(−行中)に対して、均
等割付の指定を行って、印刷することが行われている。
A part of the text created in this way (in the - line) is specified to be evenly distributed and then printed.

ところが、均等割付を指定しても各文字を印字するため
の処理はキャラクタ単位で処理が行われるため、割付の
ために利用可能なスペースの総数が文字の間隔数(これ
を文字間数という)の整数倍あればよいが、実際は小数
を含む倍数になるため、キャラクタ単位のスペースの配
分によって実質的に均等割付の印刷ができないという問
題があり、その解決が望まれている。
However, even if equal allocation is specified, the processing for printing each character is performed character by character, so the total number of spaces available for allocation is the number of character intervals (this is called the character spacing). Although it is sufficient to use an integer multiple of , in reality, it is a multiple that includes decimals, so there is a problem in that it is virtually impossible to print evenly allocated spaces due to the allocation of spaces in units of characters, and a solution to this problem is desired.

[従来の技術1 第9図に従来例の説明図を示す。[Conventional technology 1 FIG. 9 shows an explanatory diagram of a conventional example.

イ、に示すような、全角文字″1”の後に半角文字“2
°゛、次に全角文字°°3”、半角文字゛4”、全角文
字“5″と配置され、最後にスペースが2文字続いた文
章の両端が、割付開始位置と割付終了位置に指定された
場合、スペースの数は半角スペースに換算して6個(全
角スペース3個)であり、文字間数が4であるから、各
文字間に本来なら1.5個の半角のスペースが割付られ
るはずであるが、従来例ではキャラクタ単位(半角のス
ペースは半角文字と組み合わせて1個のキャラクタとし
て扱う)で処理されるため、口、に示すように“1”の
後に半角のスペースと半角文字の“2n、2つの半角の
スペース、全角文字の°“3″・・というように印刷が
行われる。
A, the half-width character “2” is followed by the full-width character “1” as shown in
°゛, followed by the full-width character °°3", the half-width character "4", and the full-width character "5", and the two ends of the sentence with two spaces at the end are specified as the allocation start and end positions. In this case, the number of spaces is 6 half-width spaces (3 full-width spaces), and the number of spaces between characters is 4, so 1.5 half-width spaces are originally allocated between each character. However, in the conventional example, it is processed in character units (a half-width space is treated as a single character in combination with a half-width character), so a half-width space and a half-width character are added after "1" as shown in . "2n", two half-width spaces, a full-width character "3", etc. are printed.

同様にハ、に示すような全角文字の°“l”〜゛5°°
に対してスペースが6個ある時に均等割付が指定された
場合、文字間数が4であるから、本来全角スペースが1
・5個(半角スペース3個分)づつ割付られるが、全角
文字の数字1〜5に対して半角スペースを3個割付るこ
とかできないため二、に示すような割付が行われてしま
う。
Similarly, full-width characters °“l” to ゛5°° as shown in
If equal allocation is specified when there are 6 spaces for
- 5 spaces (3 half-width spaces) are allocated, but since it is only possible to allocate 3 half-width spaces to the numbers 1 to 5 of full-width characters, the allocation shown in 2. is performed.

〔発明が解決しようとする課B〕[Problem B that the invention attempts to solve]

本発明は上記の従来例の説明図の口、および二。 The present invention relates to the first and second parts of the explanatory diagram of the conventional example described above.

に示すような不揃いの均等割付印刷では、印刷文書が見
た感しが悪いという問題があった。
There is a problem with irregular evenly spaced printing as shown in Figure 2 that the printed document looks bad.

このような均等割付の印刷を行うためには、文章の全体
をイメージ処理により表現することも考えられるが、ワ
ードプロセンサ等の文字を人力した後で文字単位で編集
を行う装置では、文字をイメージデータの形で処理する
ことは困難である。
In order to print such even layouts, it is possible to express the entire text through image processing, but with devices such as word processors that manually edit characters and then edit them character by character, It is difficult to process it in the form of image data.

従って、均等割付印刷のために文字データをイメージデ
ータにより扱うためには、そのために膨大なメモリや処
理装置を備える必要があり、コストが高くなり実用に適
さない。
Therefore, in order to handle character data as image data for uniform layout printing, it is necessary to provide a huge amount of memory and processing equipment, which increases the cost and is not suitable for practical use.

本発明は、均等割付の開始位置と終了位置が指定される
と文字間に厳密に均等な間隔を開けた均等割付印刷を実
現する文字処理装置を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to provide a character processing device that realizes uniform layout printing with strictly equal spacing between characters when the start and end positions of uniform layout are specified.

[課題を解決するための手段] 本発明の原理構成図を第1図に示す。[Means to solve the problem] FIG. 1 shows the principle configuration diagram of the present invention.

第1図の1は処理部、2はメモリ、3はプリンタ、処理
部1内の10は均等割付の対象となる文字データ列の各
文字が印刷すべき文字か、スペース文字であるかを識別
する文字識別手段、11は文字間の数を算出する文字間
数算出手段、12は均等割付の範囲に含まれるスペース
の総数を文字間数で割算する均等割スペース算出手段、
13は均等割スペース算出手段による算出の結果発生し
た余りのスペース数をドツト数に換算する余りスペース
のトノ)1A算手段、14は余り分ドント数を文字間数
により割算を行って各文字間に割付ける余りドツト数割
付手段、15.16はカウント機能を備えた文字数(C
H)とスペース数(SP)を保持するレジスタ、17〜
22は均等割付の文字処理において得られた数値を保持
するレジスタを表す、 本発明は均等割付の対象範囲に含まれる文字列中のスペ
ースの数を文字間数で割算した時に、余りが生じても、
その余りをドツト数に換算し、その換算ドツト数を文字
間数で割算した結果のドツト数をイメージデータの形で
プリンタに送出することにより、任意のドツト数のスペ
ース印刷を可能にするものである。
In Figure 1, 1 is the processing unit, 2 is the memory, 3 is the printer, and 10 in the processing unit 1 identifies whether each character in the character data string to be evenly allocated is a character to be printed or a space character. 11 is a character spacing calculation means for calculating the number of character spaces; 12 is an equal space calculation means for dividing the total number of spaces included in the evenly allocated range by the number of character spaces;
13 is a remainder space calculation means for converting the number of remaining spaces generated as a result of the calculation by the equal division space calculation means into the number of dots, and 14 is a remainder space calculation means for dividing the number of remaining dots by the number of character spaces to calculate each character. 15.16 is a means for allocating the number of remaining dots to be allocated between characters (C
H) and a register holding the number of spaces (SP), 17-
Reference numeral 22 represents a register that holds the numerical value obtained in the equal allocation character processing.The present invention is a register that holds the numerical value obtained in the equal allocation character processing. Even though
The remainder is converted into the number of dots, the converted number of dots is divided by the number of character spaces, and the resulting number of dots is sent to the printer in the form of image data, thereby making it possible to print spaces with an arbitrary number of dots. It is.

[作用] 第1図に示す原理構成図の作用を、第2図に示す動作原
理説明図を用いて以下に説明する。
[Operation] The operation of the principle configuration diagram shown in FIG. 1 will be explained below using the operation principle explanatory diagram shown in FIG. 2.

第2図のA、に示す均等割付の開始と終了を示す制御符
号により均等割付が指定された文章データがキーボード
(図示せず)により入力されてメモリ2に格納されてい
る。
Text data for which equal allocation is designated by control codes indicating the start and end of equal allocation shown in A in FIG. 2 is inputted using a keyboard (not shown) and stored in the memory 2.

処理部1は均等割付が指定されている範囲の文字データ
を1文字づつ取り出して、文字識別手段10において実
際に印字すべき文字か、スペースまたは制御データ(均
等開始・終了等)のように1文字分のデータであるが印
字されないデータであるかを識別し、印字すべき文字で
ある場合、カウント機能を備えるレジスタ15の内容を
プラス1し、全データについて識別が終了すると、均等
割付範囲内に含まれる文字数(CHで表示)がレジスタ
15に得られる。
The processing unit 1 extracts character data one character at a time in the range where equal allocation is specified, and uses the character identification means 10 to identify characters that are actually to be printed, spaces, or control data (such as equal start and end). It identifies whether the data is for a character but cannot be printed, and if it is a character that should be printed, the contents of the register 15 with a counting function are incremented by 1, and when all the data has been identified, it is within the equal allocation range. The number of characters (indicated by CH) contained in is obtained in the register 15.

また、スペース等のデータである時は、カウンタ機能を
備えるレジスタ16の内容をプラス1することにより、
全データについて識別が終了すると均等割付範囲内に含
まれるスペース数(SPで表示)が得られる。
In addition, when the data is a space or the like, by adding 1 to the contents of the register 16 having a counter function,
When the identification of all data is completed, the number of spaces (indicated by SP) included in the equal allocation range is obtained.

次に文字間数算出手段11はレジスタ15に保持された
文字数をマイナス1する演算を行って、文字間数を算出
し、結果の文字間数(MKで表示)をレジスタ17に格
納する。こうして得られた、各数値は第2図の例ではB
、に示すように5P=6.CH=5、MK=4となる。
Next, the character spacing calculation means 11 calculates the character spacing by subtracting the number of characters held in the register 15 by one, and stores the resulting character spacing (indicated by MK) in the register 17. Each numerical value obtained in this way is B in the example of Figure 2.
As shown in , 5P=6. CH=5, MK=4.

次に、均等割スペース算出手段12において、均等割付
の対象となるスペース数(SP)を文字間数(MK)で
除算することにより、各文字間隔に配置されるスペース
数を求めて商の値をレジスタ18に均等割スペース数(
MSで表示)として格納し、余りスペース数(SPD)
をレジスタ19に格納する。第2図の例では、MS=I
  5PD=2となる。
Next, in the equal allocation space calculation means 12, the number of spaces to be allocated equally (SP) is divided by the number of character spaces (MK) to calculate the number of spaces arranged at each character interval, and the quotient value is calculated. The number of evenly divided spaces (
MS) and the number of remaining spaces (SPD)
is stored in register 19. In the example in Figure 2, MS=I
5PD=2.

さらに、余りスペースのドツト換算手段13において、
上記のレジスタ19に格納した余りスペース数(SPD
)を、プリンタにおける実際の印字ドツト故に換算する
演算を行う、この場合、通常のプリンタは、キャラクタ
単位の印字(スペースも含む)の際、文字を構成するド
ツト数(例えばX軸方向に24ドツト分)のプリントの
後所定の間隔用ドツト数(例えば3ドツト)だけ移動し
て次のキャラクタの印字を行うよう構成されているので
、文字ピッチとしては文字幅のドツト数に所定数のドツ
トを加算したものを用いる。
Furthermore, in the remaining space dot conversion means 13,
The number of remaining spaces stored in register 19 above (SPD
) is calculated based on the actual printing dots on the printer. In this case, when printing in character units (including spaces), normal printers calculate the number of dots that make up a character (for example, 24 dots in the X-axis direction). After printing the next character (minutes), the next character is printed after moving by a predetermined number of spacing dots (for example, 3 dots), so the character pitch is set by adding a predetermined number of dots to the character width. Use the added value.

こうして、余りスペースのドツト換算手段13により得
られた結果である余りスペースのドツト数(dat)は
レジスタ20に格納される。さらに、この余りスペース
のドツト数(dat)について文字間数(MK)により
除算することにより、その商は各文字間に割り振られる
均等割ドツト数(MDIで表示)としてレジスタ21に
格納され、余りは余りドツト数(MD2)としてレジス
タ22に格納される。第2図の例では、D、に示すよう
に文字ピッチが27(キャラクタ用24ドツト十間隔用
3ドツト)の時、doL=54  MDI=13.MD
2=2が得られる。
In this way, the number of dots in the remaining space (dat), which is the result obtained by the remaining space dot conversion means 13, is stored in the register 20. Furthermore, by dividing the number of dots in the remaining space (dat) by the number of character spaces (MK), the quotient is stored in the register 21 as the number of evenly divided dots (represented by MDI) allocated between each character, and the remainder is is stored in the register 22 as the remainder dot number (MD2). In the example of FIG. 2, when the character pitch is 27 (24 dots for characters, 3 dots for 10 spacing) as shown in D, doL=54 MDI=13. MD
2=2 is obtained.

このようにして、均等割付用の各数値が求められたら、
当該文章データを均等割付の印刷を行うためプリンタ3
のバッファ4へ転送する際、処理部1の印字データ発生
手段23によりプリンタへ送出するデータを発生する。
In this way, once each numerical value for equal allocation is obtained,
Printer 3 is used to print the text data in an evenly distributed manner.
When transferring the data to the buffer 4, the print data generating means 23 of the processing section 1 generates data to be sent to the printer.

その場合、印刷すべき最初の文字データ(キャラクタコ
ード)の後にレジスタ18のMSにより指示された個数
のスペースデータ(キャラクタコード)を配置し、その
後にイメージデータを表示するコードとレジスタ21に
より指示された数のドツト数のスペースを表すイメージ
データを配置する。
In that case, after the first character data (character code) to be printed, the number of space data (character code) specified by the MS of the register 18 is placed, and then the code for displaying the image data and the number of spaces specified by the register 21 are placed. Arrange image data representing the space of the number of dots.

その後に2番目の文字データが続き、最初の文字と同様
にスペースデータ、イメージデータが配置される。2番
目以降の文字データの後に続くイメージデータには、レ
ジスタ22に格納された余りドツト数MD2に格納され
た数値が1以上の場合、イメージデータにより形成され
るドツト数をプラス1した値にし、余りドツト数をマイ
ナス1の値にして、各文字間の均等割ドツト数に分散す
る。
The second character data follows, and space data and image data are arranged in the same way as the first character. For the image data following the second and subsequent character data, if the value stored in the remainder dot number MD2 stored in the register 22 is 1 or more, the number of dots formed by the image data is added to a value of 1, The number of remaining dots is set to a value of -1 and distributed evenly between the number of dots between each character.

処理部1から送られた均等割付のためのデータは、プリ
ンタ3のバッファ4に格納され、文字データ、スペース
データについては周知の文字パターン発生器(図示せず
)によるドツトパターンにより印字を行い、イメージデ
ータについて、指定されたドツト数だけ移動(所定ドツ
ト数の空白を印字)することにより、均等割付印字を行
う。
The data for equal allocation sent from the processing section 1 is stored in the buffer 4 of the printer 3, and character data and space data are printed using a dot pattern using a well-known character pattern generator (not shown). Evenly distributed printing is performed by moving the image data by a specified number of dots (printing a predetermined number of blank spaces).

第2図の例では、E、に示すように文字°ビの後に1個
のスペースデータが続き、その後に13ドツト分のイメ
ージデータ(スペース)が配置され、その後の各文字“
°2°゛〜“°4゛の後にはそれぞれスペースの後にイ
メージデータによるドツト数が13.14.14が配置
され余りドツト数MD2の個数が分配される。
In the example in Fig. 2, one piece of space data follows the character 'B' as shown in E, followed by 13 dots of image data (space), and each character '
After .degree. 2.degree. to .degree. 4.degree., the number of dots 13, 14, and 14 according to the image data are placed after a space, respectively, and the remaining number of dots MD2 is distributed.

[実施例] 本発明の実施例の構成図を第3図に示す。[Example] A configuration diagram of an embodiment of the present invention is shown in FIG.

第3図において、中央処理装置(CPUで表示)30は
キーボード32により指示された各種の機能をプログラ
ム記憶装置33の処理フローに従って処理を行い、RA
M31にはキーボード32から、または磁気ディスク装
置等の補助記憶装置34から人力された均等割付の対象
となる文章データが格納される。また、RAMには均等
割付の処理に使用する第1図に示す各数値CH,SPM
K・・等を格納するレジスタが備えられている。
In FIG. 3, a central processing unit (represented by CPU) 30 processes various functions instructed by a keyboard 32 according to the processing flow of a program storage device 33, and
M31 stores text data to be equally allocated, which is manually input from the keyboard 32 or from the auxiliary storage device 34 such as a magnetic disk device. In addition, each numerical value CH, SPM shown in Fig. 1 used for the equal allocation process is stored in the RAM.
A register for storing K, etc. is provided.

プリンタ36にはプリンタ制御部35が備えられ、バッ
ファメモリ351により均等割付印刷を行うデータを受
取って、文字データは文字データ処理部352で処理さ
れキャラクタ単位の印字制御を行い、イメージデータに
ついてはイメージデータ処理部353においてドツト単
位の印字制御を行ろ一 実施例の構成における均等割付の処理フロー図を第4図
に示し、その中のステップ46の処理■の詳細を示すフ
ロー図を第5図(a)、第5図(b)に、ステップ47
の処理■の詳細を示すフロー図を第6図に示す。
The printer 36 is equipped with a printer control unit 35, which receives data for uniform allocation printing from a buffer memory 351, processes character data in a character data processing unit 352, and performs printing control on a character-by-character basis; Dot-by-dot printing control is performed in the data processing unit 353. A processing flow diagram of equal allocation in the configuration of one embodiment is shown in FIG. (a) and FIG. 5(b), step 47
FIG. 6 shows a flowchart showing the details of process (2).

第4図について説明すると、初めに均等割付の対象とな
る文章の行データから1つのコードを取出しく第4図4
1)、行データの終りかを判別して、終わりでない時コ
ードの識別チエツクを行う(同43)、コードが均等割
付開始コードの場合は、ステップ46の処理■(内容説
明は後記する)に進み、均等割付終了までの字数、スペ
ース数を数え、文字間を計算し、さらに均等割スペース
数、余りスペース数、余りスペースのドツト数、均等割
ドツト数、余りドツト数を計算する。
To explain Figure 4, first, one code is extracted from the line data of the text that is subject to equal allocation.
1) Determine whether it is the end of the line data, and if it is not the end, perform a code identification check (43). If the code is an equal allocation start code, proceed to the process of step 46 (details will be described later). Then, count the number of characters and spaces until the end of even allocation, calculate the character spacing, and further calculate the number of evenly allocated spaces, the number of remaining spaces, the number of dots in the remaining spaces, the number of evenly allocated dots, and the number of remaining dots.

次にステップ47の処理■(内容説明は後記する)に移
り、均等割付の範囲内(均等割付開始のコード位置から
均等割付終了のコード位置)の各文字データに対して、
上記のステップ46で求めた均等割スペース数と均等割
ドツト数(余りドット数がある時は割当て1ドツトが加
算)のイメージデータとにより構成される文字間スペー
スを付加してプリンタのバッファへ転送する。このステ
ップ47の次に、再び最初のステップ41に戻り、行デ
ータ中の次のコードを゛取出すが、均等割付が指定され
た行データは終了しているのでステップ42において行
データの終わりへ進む、均等割付が指定されてない行デ
ータについてはステップ43〜45(ステップ44は均
等割付終了のコードの場合そのコードをスペースに置換
する)においてデータのバッファへの転送が行われる。
Next, the process moves to step 47 (details will be described later), and for each character data within the range of equal allocation (from the code position of the start of equal allocation to the code position of the end of equal allocation),
An inter-character space made up of the number of evenly divided spaces obtained in step 46 above and the image data of the number of evenly divided dots (if there is a remaining number of dots, one allocated dot is added) is added and transferred to the printer's buffer. do. After this step 47, the process returns to the first step 41 and extracts the next code in the line data, but since the line data for which equal allocation has been specified has ended, the process advances to the end of the line data in step 42. , for line data for which equal allocation is not specified, the data is transferred to the buffer in steps 43 to 45 (step 44 replaces the code with a space in the case of a code indicating the end of equal allocation).

第5図(a)に示す処理■の内容を説明すると、上記第
4図のステップ43において均等割付開始コードである
ことを識別しているので、ステップ50においてスペー
ス数を保持するSPレジスタの内容に2を加算する。な
お、スペースの数は、半角スペースを単位として数える
ので、全角スペースの場合は2が加算される。
To explain the contents of the process (2) shown in FIG. 5(a), since the equal allocation start code is identified in step 43 of FIG. 4 above, the contents of the SP register holding the number of spaces are determined in step 50 Add 2 to . Note that the number of spaces is counted in half-width spaces, so in the case of full-width spaces, 2 is added.

続いて行データから次のコードを取り出し、そのコード
が均等割付終了であると、スペース数を数えるレジスタ
SPの内容に2を加算(第5図(a)の53)して■へ
進み、そうでない場合は、コードがスペースであるかど
うか調べ(同54)、スペースである場合その文字につ
いて横拡大の指定が行われているかどうか判別し、横拡
大の時はレジスタSPの内容に4を加算しく横拡大の場
合全体の範囲が拡大する)、そうでない時はレジスタS
Pに2が加算される。ステップ5日に戻って、当該コー
ドが制御コード(均等開始・終了コードを除く)の場合
、拡大・全角/半角であるかチエツクする。制御コード
でない場合、そのデータが全角データ(文字)であるか
判別しく同60)、全角データの場合は文字数用のレジ
スタCHに1を加算する(同61)、全角データでない
場合、次にコードの上位または下位バイトがスペース(
半角スペース)かどうか調べ、いずれもスペースでない
場合、半角文字が2つあるものとして文字数を保持する
レジスタCHの内容に2を加算しく同63)、一方がス
ペースの場合、横拡大が指定されているかどうか判別し
、指定されている時はレジスタSPの内容に2を加算し
く同65)、指定されてない時レジスタSPの内容に1
を加算しく同66)、半角文字の1字分としてレジスタ
CHに1を加算する。
Next, the next code is extracted from the row data, and if the code indicates that the equal allocation has been completed, 2 is added to the contents of the register SP that counts the number of spaces (53 in Figure 5 (a)), and the process proceeds to ■. If not, check whether the code is a space (54), and if it is a space, determine whether horizontal expansion is specified for that character, and if horizontal expansion is specified, add 4 to the contents of register SP. (If horizontal expansion is selected, the entire range will be expanded), otherwise register S
2 is added to P. Returning to step 5, if the code is a control code (excluding equal start and end codes), it is checked whether it is enlarged and full-width/half-width. If it is not a control code, determine whether the data is full-width data (characters) (60). If it is full-width data, add 1 to the register CH for the number of characters (61). If it is not full-width data, then check the code. The upper or lower byte of is a space (
If neither is a space, it is assumed that there are two half-width characters, and 2 is added to the contents of the register CH that holds the number of characters.63) If one is a space, horizontal expansion is specified. If it is specified, add 2 to the contents of register SP (65), and if it is not specified, add 1 to the contents of register SP.
66), and 1 is added to register CH as one half-width character.

このステップ51〜67を繰り返して均等割付終了コー
ドをステップ52で検出すると、レジスタSPに2を加
算して、第5図(b)のステップ68に移る。このステ
ップ68において、レジスタCI]に格納された文字数
から1を減算して、文字間数を得るとレジスタMKに格
納する。次に、レジスタMKの内容を判別して、0の場
合ステップ69においてレジスタMKの内容を2に設定
する。
Steps 51 to 67 are repeated and when the equal allocation end code is detected in step 52, 2 is added to the register SP and the process moves to step 68 in FIG. 5(b). In this step 68, 1 is subtracted from the number of characters stored in register CI] to obtain the number of character intervals, which is then stored in register MK. Next, the content of register MK is determined, and if it is 0, the content of register MK is set to 2 in step 69.

これは、MKが0であるのは文字が1個であることを表
し、その場合はその1個の文字を均等割付の範囲の中央
に位置させるために、文字間数を2とする(開始位置の
スペースから中央の文字までと、文字から終了位置のス
ペースまでとの2つの間数があるものとする)ものであ
る。同じくステップ69で−1の場合は、印字すべき文
字が0であることを表し、その場合は当該処理を終了す
る。
This means that an MK of 0 indicates that there is one character, and in that case, in order to position that one character in the center of the even allocation range, the number of characters between characters is set to 2 (start It is assumed that there are two numbers between the space at the position to the center character and from the character to the space at the end position. Similarly, if the value is -1 in step 69, it means that the character to be printed is 0, and in that case, the process ends.

レジスタMKの内容がその他の数値の場合は、ステップ
71において、レジスタSPの内容をレジスタMKの内
容で割算する処理を行って、商の値をレジスタMSに格
納する。次に、ステップ71の割算の結果得られた余り
(SP%MKにより表示)と(1文字のドツト数十文字
ピッチのドツト数)の乗算を行って結果をレジスタda
tに格納する。
If the contents of register MK are other numerical values, in step 71, the contents of register SP are divided by the contents of register MK, and the quotient value is stored in register MS. Next, the remainder obtained as a result of the division in step 71 (indicated by SP%MK) is multiplied by (the number of dots in a pitch of several tens of characters per character), and the result is stored in a register da.
Store in t.

次に上記で得られたレジスタdatの内容をレジスタM
Kの内容で割算を行い、結果の商をレジスタMDIに格
納し、余りをレジスタMD2に格納する。以上で処理■
を終了する。
Next, the contents of the register dat obtained above are transferred to the register M
Divide by the contents of K, store the resulting quotient in register MDI, and store the remainder in register MD2. Process above ■
end.

次ぎに、上記の処理■に続いて、第6図に示す処理■の
説明を行う。
Next, following the above process (2), process (2) shown in FIG. 6 will be explained.

初めにステップ80において、均等割付の開始コード位
置の次の文字データを取出すために読み出しアドレス(
アドレスレジスタは図示せず)を+1する0次に、レジ
スタCH(文字数)が0かどうか判別しく第6図81)
、0の場合、文字数が0であるからスペースを転送して
この処理を終了(同82))する。
First, in step 80, a read address (
Add 1 to the address register (not shown) Next, determine whether the register CH (number of characters) is 0 or not (Figure 6 (81))
, 0, the number of characters is 0, so a space is transferred and this process ends (82)).

0でない場合上記により設定したアドレスによりコード
を取出し、そのコードが均等割付終了かどうか判別しく
同84)、そうでない場合レジスタCHの内容が1かど
うか調べる(同85)。■でない場合、そのコードが制
御文字かどうか識別し、制御文字の場合そのコードをバ
ッファ(第3図のRAM31のプリント用データバンフ
ァ)に転送し、そうでない時はコードがスペースか否か
判別する。スペースの時は次のコードの取出しに移り、
そうでない時は一文字をバッファ(RAM内)へ転送す
る。
If it is not 0, the code is retrieved from the address set above and it is determined whether the code indicates that equal allocation has been completed (84); if not, it is checked whether the contents of the register CH are 1 (85). ■If not, identify whether the code is a control character, and if it is a control character, transfer the code to the buffer (print data buffer of RAM 31 in Figure 3), otherwise determine whether the code is a space or not. do. When it is a space, move on to extracting the next code,
Otherwise, transfer one character to the buffer (in RAM).

次にレジスタMS(均等割スペース数)がOより大きい
か判別し、大きい時はMSにより指示された個数のキャ
ラクタスペースをバッファへ転送する。次にレジスタM
K(文字間数)とレジスタMD2 (余りドツト数)と
を比較して、−敗したらレジスタMDIの内容に1を加
算し、一致しない時は直ちにステップ95に移る。
Next, it is determined whether the register MS (number of evenly divided spaces) is larger than O, and if it is, the number of character spaces specified by MS is transferred to the buffer. Then register M
Compare K (the number of character intervals) with the register MD2 (the number of remaining dots), and if the result is negative, 1 is added to the contents of the register MDI, and if they do not match, the process immediately moves to step 95.

ステップ95では、レジスタMDI(均等割ドツト数)
の内容に応じたイメージスペースを発生してバッファへ
転送する。その後、レジスタMKの内容を−1する。
In step 95, register MDI (number of evenly divided dots)
Generates an image space according to the contents of and transfers it to the buffer. Thereafter, the contents of register MK are incremented by 1.

上記ステップ93,94.96の処理は、レジスタMD
2の余りドツト数を何番目の文字間(レジスタMKによ
り表示)から割り振るかを制御するために行われる。
The processing of steps 93, 94, and 96 above is performed by register MD.
This is done to control from which character interval (indicated by register MK) the number of dots left over from 2 is allocated.

この後■の経路によりステップ83に移り、以下各文字
についてスペースキャラクタとイメージスペースをバッ
ファへ転送して、プリント用のデータが作成される。ス
テップ84において均等割付終了コードを検出するとこ
の処理を終了する。
Thereafter, the process moves to step 83 via the path (2), where the space character and image space for each character are transferred to the buffer, and print data is created. When the equal allocation end code is detected in step 84, this process ends.

なお、ステップ85において、コードを取出した時にC
H=1の場合、文字が1個の時の処理が行われ、CHを
0にしてキャラクタスペースを転送してステップ93〜
96の処理でイメージスペースをバッファへ転送し、そ
の後キャラクタコードが転送され、スペースとイメージ
スペースが転送される。
Note that in step 85, when the code is taken out, C
If H=1, the processing when there is one character is performed, the CH is set to 0, the character space is transferred, and steps 93~
The process at 96 transfers the image space to the buffer, then the character code, and then the space and image space.

以上の処理■の動作をまとめると、 文字数1の場合、 文字間スペース十文字十文字間スペース文字2以上の場
合、 文字十文字間スペース十文字十文字間スペース但し、文
字間スペース=(キャラクタスペース+イメージスペー
ス)である。
To summarize the operation of the above process ■, if the number of characters is 1, the space between characters is 1 character, the space between 1 character, 1 character, or more. be.

第7図に本発明による具体的な動作例の説明図を示す。FIG. 7 shows an explanatory diagram of a specific example of operation according to the present invention.

図のA、に示す行データについて均等割付の処理を行う
場合、B、の■〜■に示す各数値が第5図(a)、第5
図(b)の処理により得られる。
When performing equal allocation processing on the row data shown in A in the figure, each numerical value shown in ■ to ■ in B is
Obtained by the process shown in Figure (b).

このB、により得られた数値に基づいて、第6図に示す
処理を行うことにより、C1のプリンタ用のデータがバ
ッファに得られる。C8にはそのうちの文字” 1 ”
とキャラクタスペースおよび6ドツトを表すイメージデ
ータが示されている。
By performing the processing shown in FIG. 6 based on the numerical value obtained from B, data for the printer C1 is obtained in the buffer. C8 has the character "1"
Image data representing a character space and six dots are shown.

すなわち、” H”は16進表示のデータであることを
表し、最初のイは、全角文字開始を表し、口のコードは
数字1を表し、次のハは全角終了を表し、二は半角スペ
ース2個を表す。この二9に続く■のホは、機能指定で
ありイメージデータの開始を表し、へが6ドツトの長さ
(横方向の印字ドツト数)を表し、トはイメージデータ
の幅(縦方向)を次のチにより指示することを表し、チ
では1ラインの幅を表す、その後のりは、16ドツトの
データ列を表し、このりにより指示する16ドツトの中
の6ドツト(へにより表示)分だけ印字ヘンドを移動さ
せることができる。
In other words, "H" represents data in hexadecimal display, the first A represents the start of a full-width character, the mouth code represents the number 1, the next C represents the end of the full-width character, and 2 represents the half-width space. Represents 2 pieces. The ``■'' following this 29 is a function designation and represents the start of the image data, the ``h'' represents the length of 6 dots (the number of printed dots in the horizontal direction), and the ``g'' represents the width (vertical direction) of the image data. The next line indicates the width of one line, and the subsequent line indicates a 16-dot data string, and this line indicates 6 of the 16 dots (indicated by the line). The print hand can be moved.

C1に示すデータが各文字毎について発生し、RAMの
バッファからプリンタのバッファメモリに転送されると
、プリンタ制御部35においてデータを解釈して印字制
御が行われ、第7図のり。
When the data shown in C1 is generated for each character and transferred from the RAM buffer to the buffer memory of the printer, the printer control unit 35 interprets the data and performs printing control, as shown in FIG.

に示すように均等割付の印字が行われる。Evenly distributed printing is performed as shown in .

第8図は本発明による均等割付の印刷例を示す図である
。A、の文章データの内イ、〜ハ、に示す均等割付が指
定された文章について、均等割付の文字処理を行って、
印字した結果がB、のイ。
FIG. 8 is a diagram showing a printing example of equal allocation according to the present invention. Of the text data in A, the texts specified as evenly spaced characters shown in A, ~C are processed with evenly spaced characters,
The printed result is B.

〜ハ、に示すとおりであり、従来の場合に比べて文字間
が厳密に均等な間隔となる。
As shown in (c) to (c), the spacing between characters becomes strictly equal compared to the conventional case.

[発明の効果] 本発明によれば、文章データの編集処理を行うと共にそ
の編集結果を印字するワードプロセンサや端末装置等の
各種装置において、均等割付を任意の位置で、任意の個
数の文字からなる文章データに対し均等割付印刷を厳密
に実現することができる。
[Effects of the Invention] According to the present invention, in various devices such as word processing sensors and terminal devices that edit text data and print out the editing results, uniform allocation can be performed in any position and in any number of characters. Evenly distributed printing can be strictly realized for text data consisting of .

lO二文字識別手段 ll;文字間数算出手段 12:均等割スペース算出手段 I3:余りスペースのドツト換算手段 14:余りドツト数割付手段 15〜22:レジスタlO two letter identification means ll; Character spacing calculation means 12: Equal division space calculation means I3: Dot conversion method for remaining space 14: Remainder dot number allocation means 15-22: Register

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の原理構成図、第2図は動作原理説明図
、第3図は本発明の実施例の構成図、第4図は実施例の
均等割付の処理フロー図、第5図(a)、第5図(b)
は処理Aの詳細を示すフロー図、第6図は処理Bの詳細
を示すフロー図、第7図は本発明による具体的動作例の
説明図、第8図は本発明による均等割付の印刷例を示す
図、第9図は従来例の説明図である。 第1図中、 l:処理部 2:メモリ 3:プリンタ 特許出願人 株式会社ピーエフニー(外1名)復代理人
弁理士   穂坂 相離 均謂髭付 均諜翠付 本発明の原理構成図 第1図 動作原理説明図 第2図 A0文宣データ(表示状!!!り El、El’l 刷 結 果 本発明による均等割付の印刷例を示す図実施例の均等割
付の処理フロー図 第 4 図 処理Aの詳細を示すフロー図 第5図(b) 1文字=24ドツト 文字ピンチエ3ドツト(全角幅) B、処理により得られた各数値 C,プリンタ用データの例 イ ホ ト チ リ 6トフト 7ト・ント 7トツト 7トフト 本発明による具体的動作例の説明図 第7図 ■ 処理日の詳細を示すフロー図 第6図 口、上記イについての均等割付処理後の表示二、上記ハ
についての均等割付処理後の表示従 来 例 の 説 明 図 第 図
Fig. 1 is a diagram of the principle configuration of the present invention, Fig. 2 is an explanatory diagram of the operating principle, Fig. 3 is a block diagram of an embodiment of the present invention, Fig. 4 is a processing flow diagram of equal allocation in the embodiment, and Fig. 5 (a), Figure 5(b)
6 is a flowchart showing details of processing A, FIG. 6 is a flowchart showing details of processing B, FIG. 7 is an explanatory diagram of a specific example of operation according to the present invention, and FIG. 8 is an example of equal allocation printing according to the present invention. FIG. 9 is an explanatory diagram of a conventional example. In Figure 1, l: Processing unit 2: Memory 3: Printer Patent applicant: Pfn Co., Ltd. (one other person), sub-representative patent attorney, Hosaka Hosaka, so-called Hijiri Hitoshi, so-called Bearded Kunsei Suiduke, Principle configuration diagram of the present invention No. 1 Figure 2 Explanation of operation principle Figure 2 A0 statement data (indication letter!!!) Printing result Figure illustrating a printing example of equal allocation according to the present invention Processing flow diagram of equal allocation according to the embodiment Figure 4 Processing A Flowchart showing the details of Figure 5 (b) 1 character = 24 dots character pinch 3 dots (full-width width) B, each numerical value obtained by processing C, example of printer data 7 Toft Explanatory diagram of a specific example of operation according to the present invention Figure 7 ■ Flowchart showing details of processing date Figure 6 Opening, Display after equal allocation processing for above A, Display 2 after equal allocation processing for above C Explanatory diagram of conventional display example

Claims (1)

【特許請求の範囲】 文字、数字、記号等の各種の文字コードからなる一行の
文字列について均等割付印刷を行うための文字処理装置
において、 処理部(1)は、均等割付範囲内の印刷すべき文字とス
ペースとを識別して文字数とスペース数を計数する文字
識別手段(10)と、 前記文字数から文字間数を算出する文字間数算出手段(
11)と、 前記スペース数と文字関数に基づいて均等割付スペース
数と余りスペース数を求める均等割スペース算出手段(
12)と、 前記余りスペース数に基づいて余りドット数を算出する
余りスペースのドット換算手段(13)と、前記余りド
ット数を均等割付スペース数に加算する余りドット数割
付手段(14)とを備え、さらに、処理部(1)の印字
データ発生手段(23)は、文字データの間に前記均等
割スペース数分のスペースデータと、前記均等割ドット
数に余りドット数に応じたドットが加算された数のドッ
ト分のスペースを表すイメージデータを付加したデータ
列を発生する印字データ発生手段を備えることを特徴と
する文字処理装置。
[Scope of Claims] In a character processing device for performing uniform layout printing of one line of character strings consisting of various character codes such as letters, numbers, symbols, etc., the processing unit (1) is configured to Character identification means (10) that identifies the number of characters and spaces and counts the number of characters and spaces; and Character spacing calculation means (10) that calculates the number of character spacing from the number of characters.
11), and an evenly allocated space calculation means (
12), a remaining space dot conversion means (13) that calculates the number of remaining dots based on the number of remaining spaces, and a remaining dot number allocation means (14) that adds the number of remaining dots to the number of evenly allocated spaces. Further, the print data generating means (23) of the processing unit (1) adds space data for the number of equally divided spaces between the character data and dots corresponding to the number of dots remaining in the number of equally divided dots. 1. A character processing device comprising print data generating means for generating a data string to which image data representing a space for a number of dots is added.
JP63198532A 1988-08-09 1988-08-09 Character processor Expired - Lifetime JP2535059B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63198532A JP2535059B2 (en) 1988-08-09 1988-08-09 Character processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63198532A JP2535059B2 (en) 1988-08-09 1988-08-09 Character processor

Publications (2)

Publication Number Publication Date
JPH0247080A true JPH0247080A (en) 1990-02-16
JP2535059B2 JP2535059B2 (en) 1996-09-18

Family

ID=16392715

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63198532A Expired - Lifetime JP2535059B2 (en) 1988-08-09 1988-08-09 Character processor

Country Status (1)

Country Link
JP (1) JP2535059B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05185663A (en) * 1992-01-07 1993-07-27 Brother Ind Ltd Tape printing apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56120379A (en) * 1980-02-28 1981-09-21 Teraoka Seiko Co Ltd Method to set print pitch in commodity name print column of label
JPS5759292A (en) * 1980-09-29 1982-04-09 Canon Inc Character processor
JPS57102368A (en) * 1980-12-17 1982-06-25 Yokogawa Hokushin Electric Corp Typing method for printer
JPS57105093A (en) * 1980-12-23 1982-06-30 Fujitsu Ltd Character space control system of dot printer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56120379A (en) * 1980-02-28 1981-09-21 Teraoka Seiko Co Ltd Method to set print pitch in commodity name print column of label
JPS5759292A (en) * 1980-09-29 1982-04-09 Canon Inc Character processor
JPS57102368A (en) * 1980-12-17 1982-06-25 Yokogawa Hokushin Electric Corp Typing method for printer
JPS57105093A (en) * 1980-12-23 1982-06-30 Fujitsu Ltd Character space control system of dot printer

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05185663A (en) * 1992-01-07 1993-07-27 Brother Ind Ltd Tape printing apparatus

Also Published As

Publication number Publication date
JP2535059B2 (en) 1996-09-18

Similar Documents

Publication Publication Date Title
US4650349A (en) Speed typing apparatus and method
JPH0464314B2 (en)
JPH0247080A (en) Character processor
JPS5945589A (en) Graph making device
EP0120481A2 (en) Method and device for selecting a character shape for each character of a text, e.g. of Arabic, according to four classes
JPS58144247A (en) Display controlling system of homonym in "kana"-"kanji" conversion
JPS59106035A (en) Furigana (japanese syllabary attached to chinese character) adding system of text processor
JP2837497B2 (en) Output control device and output control method
JPH06100905B2 (en) Pattern output method
JP2813191B2 (en) Typeface automatic conversion method
JP2525333B2 (en) Output device
KR820000406B1 (en) Korean(han geul)electronic typewriter and communication equipment system
CA1172373A (en) Method of justification for a line of text containing complex characters
KR840000051B1 (en) Hangul printer
JPH0430037B2 (en)
JPH05303577A (en) Document preparing device
JPS5856192A (en) Printer
JPH0477856A (en) Character processor containing ruby converting function
JPH0448104B2 (en)
JPS62107332A (en) Printing format setting system for document generating device
Lehmann Some Aspects of Data Recording and Microform Output for Information Distribution
JPH0554180A (en) Slop format defining system for optical character reader
JPH08241304A (en) Document processor
JPS60239862A (en) Arabic word processor
JPS6057889A (en) Serial character font generation system with frame specification