[go: up one dir, main page]

JP3503968B2 - Typesetting method - Google Patents

Typesetting method

Info

Publication number
JP3503968B2
JP3503968B2 JP25946793A JP25946793A JP3503968B2 JP 3503968 B2 JP3503968 B2 JP 3503968B2 JP 25946793 A JP25946793 A JP 25946793A JP 25946793 A JP25946793 A JP 25946793A JP 3503968 B2 JP3503968 B2 JP 3503968B2
Authority
JP
Japan
Prior art keywords
character
character string
line
adjustment
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP25946793A
Other languages
Japanese (ja)
Other versions
JPH0789034A (en
Inventor
通 ▲高▼澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Screen Holdings Co Ltd
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Screen Holdings Co Ltd
Dainippon Screen Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Screen Holdings Co Ltd, Dainippon Screen Manufacturing Co Ltd filed Critical Screen Holdings Co Ltd
Priority to JP25946793A priority Critical patent/JP3503968B2/en
Publication of JPH0789034A publication Critical patent/JPH0789034A/en
Application granted granted Critical
Publication of JP3503968B2 publication Critical patent/JP3503968B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Description

【発明の詳細な説明】 【0001】 【産業上の利用分野】本発明は、デスク・トップ・パブ
リッシング(DTP)等で利用される文字組版編集装置
の文字組版等に係り、特に指定された任意形状の領域内
へ体裁よく文字列を配置する文字組版方法に関する。 【0002】 【従来の技術】従来のこの種の文字組版方法として、例
えば、特開平5−124169号公報に示すようなもの
がある。この文字組版方法は、入力された文字列の字詰
量および文字サイズが補正されることにより、指定され
た配置エリアに半端な余白を残すことなく入力文字列が
配置される。 【0003】 【発明が解決しようとする課題】しかしながら、このよ
うな構成を有する従来例の場合には、次のような問題が
ある。すなわち、入力された文字列の分割禁止文字列と
分割可能文字列の種類を判別しないで各文字列の字詰量
および文字サイズを補正するので、欧文,連数字やロゴ
等を含む分割禁止文字列の途中で改行されて、文字列が
分割配置されることが起こる。 【0004】また、分割禁止文字列を考慮した場合で
も、行末に分割禁止文字列が位置する場合、その分割禁
止文字列を一律に後ろの行へずらすか、あるいは文字間
隔を縮小してその分割禁止文字列をその行に納めてしま
うという手法も考えられる。しかし、このような画一的
な文字列の配置によると、相前後する行の文字間隔に著
しい差異が生じやすく、非常に見栄えの悪い配置になる
(後述の図13(b),(c)参照)。 【0005】本発明は、このような事情に鑑みてなされ
たものであって、文字列の途中で分割されることが望ま
しくない文字列(分割禁止文字列)を考慮して、指定さ
れた配置エリアに余白を残すことなく入力文字列を最適
配置することができる文字組版方法を提供することを目
的とする。 【0006】 【課題を解決するための手段】本発明は、このような目
的を達成するために、次のような構成をとる。すなわ
ち、請求項1に記載の発明は、途中で改行されて分割配
置されてもよい分割可能文字列と途中で改行されて分割
配置されない分割禁止文字列を含む入力文字列を、指定
された配置エリアに対して半端な残余が生じないように
前記入力文字列の配置位置を調整して配置する文字組版
方法であって、前記入力文字列の全長が配置エリアの各
行の総全長に等しくなるように、入力文字列の文字間隔
を調整する過程と、前記文字間隔が調整された入力文字
列の各文字位置と、前記配置エリアの各行の行末位置と
を比較し、行末位置が入力文字列の分割可能文字列中に
位置するときは、その行末位置にあたる単位文字の位置
、当該行末位置を挟み、これに最も近い単位文字の位
置とを当該行末位置に対応した一対のエリア分割候補点
としてそれぞれ選択し、行末位置が入力文字列中の分割
禁止文字列中に位置するときは、その分割禁止文字列の
先頭文字の位置と、当該行末位置を挟み、これに最も近
次の分割可能文字列の先頭文字の位置とを当該行末位
置に対応した一対のエリア分割候補点としてそれぞれ選
択する過程と、前記配置エリアの各行末位置と、各行末
位置に対応した一対のエリア分割候補点との差分をそれ
ぞれ算出することにより、各エリア分割候補点について
それぞれ調整量を求める過程と、前記各エリア分割候補
点の調整量と、あるエリア分割候補点を行末位置に設定
した場合に、文字間隔が調整される当該エリア分割候補
点前及び後の文字列部分について、その部分中にある文
字間隔調整が可能な各文字列の持つ各調整許容量の総和
との比を算出することにより、各エリア分割候補点につ
いて前文字列の調整比(前調整比)と後文字列の調整比
(後調整比)とをそれぞれ求める過程と、前記各エリア
分割候補点に対応した前/後調整比に基づいて、各エリ
ア分割候補点について調整比の幅(調整幅)を算出する
過程と、前記各調整幅のうち、最大の調整幅をもつエリ
ア分割候補点と対をなす他方のエリア分割候補点の位置
を、対応する配置エリアの行末位置として確定する過程
と、前記確定した行末位置を境として配置エリアを区画
するとともに、前記確定したエリア分割候補点を境とし
て前記入力文字列を区画し、前記区画された各配置エリ
アとそれぞれに配置すべき区画された入力文字列につい
て、上記の一連の過程を繰り返し実行することにより、
入力文字列の配置位置を順に確定していく過程と、を含
むことを特徴とするものである。 【0007】 【作用】本発明の作用は次のとおりである。まず、分割
可能文字列と分割禁止文字列とを含む入力文字列の全長
が配置エリアの各行の総全長に等しくなるように、入力
文字列の文字間隔を調整する。そして、調整された入力
文字列の各文字位置と、配置エリアの各行の行末位置と
を比較する。行末位置が分割可能文字列中に位置すると
きは、その行末位置に当たる単位文字の位置と、当該行
末位置を挟み、これに最も近い次の単位文字の位置、す
なわち当該単位文字の領域を区画する前後の位置を一対
のエリア分割候補点として選択する。一方、行末位置が
分割禁止文字列中に位置するときは、その分割禁止文字
列の先頭文字の位置と、当該行末位置を挟み、これに最
も近い次の分割可能文字列の先頭文字の位置、すなわち
当該分割禁止文字列を区画する前後の位置を一対のエリ
ア分割候補点として選択する。これにより、分割禁止文
字列の途中での改行(分割配置)を防ぐ。 【0008】次に、配置エリアの各行末位置と、各行末
位置に対応した一対のエリア分割候補点との差分をそれ
ぞれ算出することにより、各エリア分割候補点について
前後の文字列の調整量を算出する。すなわち、あるエリ
ア分割候補点を行末位置に確定したとすれば、前の文字
列については、その調整量に相当する長さだけ文字列が
伸長または圧縮され、後ろの文字列については、その調
整量に相当する長さだけ文字列が圧縮また伸長される。
そして、各エリア分割候補点の調整量と、当該エリア分
割候補点の前及び後の文字列部分について、その部分中
にある文字間隔調整が可能な各文字列の持つ各調整許容
量の総和との比を算出することにより、各エリア分割候
補点について前/後調整比を算出する。この調整比は、
前後文字列の単位文字あたりの文字間隔調整量に相当す
る。 【0009】続いて、各エリア分割候補点に対応した前
/後調整比に基づいて、各エリア分割候補点の調整比の
幅(調整幅)を算出する。この調整幅は、当該エリア分
割候補点を行末位置に確定した場合の前後の文字列の文
字間のあき具合の差を示すバロメータになる。つまり、
調整幅が大きいほど、前後の文字列の文字間隔の差が大
きくなるので、見栄が悪くなる。そこで、前記各調整幅
のうち、最大の調整幅をもつエリア分割候補点を探し、
そのエリア分割候補点と対をなす他方のエリア分割候補
点の位置を、対応する配置エリアの行末位置として最初
に確定することにより、最大の調整幅をもつエリア分割
候補点が行末位置に配置されるという、配置としては最
も好ましくない状態にならないようにしている。 【0010】 以上のようにて、まず配置エリアの一
群の中から、ある行末位置に配置すべき入力文字列中の
文字位置を確定すると、配置エリアおよび入力文字列
は、文字配置が確定した個所を境として、二つの領域に
区画される。したがって、以後の処理では、区画された
各配置エリアと、それぞれのエリアに配置されるべき区
画された入力文字列について、上記の一連の過程を繰り
返し実行することにより、各配置エリア内の文字位置を
順に確定していく。 【0011】 【実施例】以下、図面を参照して本発明の一実施例を説
明する。図1は、本発明の文字組版方法を使用する文字
組版編集装置の文字組版装置部分を示したブロック図で
ある。図中、符号1は、本発明方法を実行する演算部で
ある。演算部1は、図示しないプログラム実行用のCP
U、プログラム格納用のROMや演算等に使用されるR
AM等で構成される。文字列入力部2は、ワードプロセ
ッサ等で作成された文字列データファイル(フォント
名,文字コード等)を格納した媒体等から文字列データ
を取り込んで文字列情報記憶部3に格納し、演算部1
は、この格納された文字列データを参照する。組版情報
入力部4は、文字の組版に関する情報(例えば、文字列
の配置エリアの情報)を入力して組版情報記憶部5に格
納する。この組版情報入力部4は、図示しない編集装置
の表示画面上で配置エリア等の特定の位置を指示できる
マウスやタブレット等のポインティングデバイス、ある
いは数値で特定の位置を指示するキーボード等の入力装
置からなる。組版情報記憶部5に格納された情報は、演
算部1によって参照される。 【0012】演算部1は、前記文字列情報記憶部3に格
納された入力文字列の文字列データに対応する文字コー
ドの文字パラメータを文字パラメータ記憶部10から読
み出して、文字列の全長を算出して文字列長記憶部20
に格納し、組版情報記憶部5に格納された組版情報の配
置エリアに関する情報を参照して、配置エリアの全ての
行長さの総和を算出して配置エリア全行長記憶部21に
格納する。また、前記文字列長記憶部20と配置エリア
全行長記憶部21に格納された値に基づいて文字列配置
の補正量を算出し、これを補正量記憶部22に格納す
る。 【0013】演算部1は、文字列情報記憶部3に格納さ
れた文字列データを参照して、文字列データに応じた文
字幅等の文字パラメータを文字パラメータ記憶部10か
ら読み出して各文字が配置される位置を算出して文字位
置記憶部30に格納する。また、文字列情報記憶部3に
格納された文字列データと、改行等によって分割して配
置されることを禁止される文字(分割禁止文字)の文字
コードおよび分割配置されることが許される文字(分割
可能文字)の文字コードを対応表として格納している分
割可能情報記憶部31とを参照して、各文字列の先頭文
字の位置を先頭文字位置記憶部32に格納する。さら
に、組版情報記憶部5の組版情報を参照して、配置エリ
アの各行の行末位置を算出して行末位置記憶部33に格
納する。また、文字位置記憶部30と先頭文字位置記憶
部32と行末位置記憶部33との内容に基づいて求めら
れるエリア分割候補点の位置を分割候補点位置記憶部3
4に格納する。 【0014】文字組版処理後は、文字組版編集装置が、
演算部1を介して文字列情報記憶部3の文字コード等の
文字列データ、組版情報記憶部5の配置エリアの情報と
文字位置記憶部30の文字位置の調整後の各文字の配置
位置を参照する。 【0015】また、上記の文字列情報記憶部3と組版情
報記憶部5の内容は、演算部1を介して、文字組版編集
装置に備えられたディスプレイ等の表示装置に出力され
る。 【0016】まず、説明の理解を容易にするために、文
字の構成要素と配置エリアについて図2を参照して説明
しておく。 【0017】<文字の定義>図2(a)は、文字「し」
を表し、文字の字体形状は、文字の最小配置単位である
仮想ボディIBに収められ、前記仮想ボディIBの横方
向の長さを文字幅CWとし、縦方向の長さを文字高さCH
とする。一般的に和文においては、文字幅CWと文字高
さCHとは同じ値で構成され、欧文においては、文字幅
Wと文字高さCHとは文字によって異なる。前記仮想ボ
ディIBの内方には、その端辺から適宜の間隔をおいて
文字の字体形状を示す字面Fが配置され、この字面は、
点の集まりからなるドットデータや数学的に形状を表す
ベクトルデータにより構成される。前記字面Fの最大外
形を囲うような矩形状の枠を、バウンディングボックス
BBとし、前記バウンディングボックスBBの横方向の
長さを字面幅Wとし、縦方向の長さを字面高さHとす
る。 【0018】 前記仮想ボディIB内に配置されている
字面Fの字面幅Wと仮想ボディIBの文字幅CW・との
前後の差を、それぞれ間隔aおよび間隔bとし、字面高
さHと文字高さ H との上下の差を、それぞれ間隔cお
よび間隔dとする。これらの間隔は、仮想ボディIB内
に収められる字面の大きさや形状によって、すなわち、
文字毎に異なる。また、上記の文字をユーザー空間の所
望の座標に配置する際に、前記座標に配置するための基
準となる位置が文字上に適宜に設定されるが、ここで
は、仮想ボディIBの左下をその基準点CPとする。 【0019】<配置エリアの定義>図2(b)は、文字
組版においてオペレータやデザイナーによって指定され
る領域の一例を示し、文頭を示すヘッドラインHとター
ゲットラインTで挟まれた領域が配置エリアAである。
この配置エリアAの内部の斜線で示される領域l1〜l
3 は、配置エリアA内の文字が配置されるべき行を示
す。この斜線内には、文字C1 の基準点が位置CP1
なるように配置され、位置CP1 から距離R1(送り量
1 )だけ離れた位置に文字C2 が配置される。文字の
基準点CPがターゲットラインTを越えて配置される場
合には、その文字を配置する前に改行され、次行の先頭
にその文字が配置される。このときの行と次行の間隔は
行送り量laで表される。また、ヘッドラインHとター
ゲットラインTとの間隔を配置エリアの行長CLとす
る。 【0020】上記のヘッドラインH,ターゲットライン
T,配置エリアの行長CL,行送り量la,行数l等の
組版情報は、本実施例においては、オペレータやデザイ
ナーによって組版情報入力部4を介して入力される。こ
の入力された組版情報によって配置エリアAの矩形枠の
X方向のサイズとY方向のサイズは、以下の式で算出さ
れる。 X=CL ……………… (1) Y=CH +la×(l−1) ……… (2) 【0021】<処理手順>次に、図3,図4のフローチ
ャートを参照して処理手順を説明する。なお、この処理
を実行する前に、文字列データは文字列入力部2から予
め入力されて文字列情報記憶部3にデータファイルとし
て格納されているものとする。この格納されている文字
列データファイルの模式図を図5に示す。本実施例で
は、本文として入力文字列が『これはエリアジャストの
例を示すSAMPLEです。自動的な調整によってOPTIMUM な
行揃えが実現できます。』(文字数:53文字)として
説明する。また、組版情報についても同様で、組版情報
入力部4を介して配置エリアAに関する情報(ヘッドラ
インH,ターゲットラインTの座標,行数l等)が入力
されて組版情報記憶部5に格納されているものとする。
以上の文字列データと組版情報とからなる文字列と組版
の一例(ただし、文字間は調整されていない)を図8
(a)に示す。図中、符号Iは、文字列情報記憶部3の
文字列データに基づく入力文字列を示し、その周囲に
は、組版情報記憶部5に格納されている組版情報に基づ
く配置エリアAが置かれている。なお、括弧で区切られ
ている文字列S1〜S5は、対象の文字列中の分割可能
及び分割禁止毎の文字列で、この分割処理は、後述のス
テップS104で行われる。 【0022】図3のステップS100では、入力文字列
の各文字位置を文字列情報記憶部3と文字パラメータ記
憶部10を参照して文字位置記憶部30に格納する。こ
の文字位置記憶部30の模式図を図8(b)に示す。ま
た、図中、符号S1,S3,S5は分割可能文字列を示
し、符号S2,S4(斜線部)は分割禁止文字列を参考
に示す。また、文字パラメータ記憶部10に記憶されて
いる文字パラメータの内容の模式図を図6に示す。 【0023】具体的には、演算部1が文字列情報記憶部
3に格納されている文字列データ(図5参照)を参照
し、第1番目の文字コード1に対応する文字の文字位置
CP1を「0」として文字位置記憶部30の第1番目に
格納する。次に第1番目の文字の文字幅CW を第2番目
の文字コード2に対応する文字の文字位置CP2 として
文字位置記憶部30の第2番目に格納する。文字幅CW
は、文字パラメータ記憶部10に欧文/和文毎さらにフ
ォント名毎にファイリングされて格納されている文字コ
ードに対応した文字パラメータ(間隔a,b,c,dお
よび字面幅W,字面高さH)のうち、間隔aと間隔bと
字面幅Wの和によって求められる。 【0024】文字位置記憶部30に格納される文字位置
は、前文字の文字幅CW を送り量Rとして配置した場合
の各文字の基準点CPの位置であり、いわゆる「ベタ組
み」の状態である。このようにして文字列情報記憶部3
に格納されている文字列データの全ての文字コードに応
じた文字の配置位置を順次格納する。本実施例では、和
文の文字サイズを「20ポイント」とし、前記の文字列
S1〜S5と共に示すと、図8(b)のように、文字列
S2の最初の文字「S」の位置CP16は文字サイズと同
じ単位のポイント数で「300」、文字列S3の最初の
文字「で」の位置CP22は「380」、文字列S4の最
初の文字「O」の位置CP35は「640」、文字列S5
の最初の文字「な」の位置CP42は「745」になり、
最終文字である「。」(53番目の文字)の位置CP53
は「965」になる。 【0025】ステップS101では、入力文字列の全長
Lを算出する。演算部1は、上記ステップS100で文
字位置記憶部30に格納されている文字位置の最終位置
を参照し、この値に最終文字の文字幅CW を加算して、
文字列長記憶部20に格納する。本実施例の文字列の全
長Lは、上記の最終位置「965」(第53番目の文字
「。」の位置)に文字サイズ20ポイントを加算した
「985」となる(図8(b)参照)。 【0026】ステップS102では、演算部1が配置エ
リアAの全行長AL(文字列の配置方向の行長の総和)
を算出する。全行長ALは、組版情報記憶部5の行長C
Lを参照して配置エリアAの各行長CLの総和で算出さ
れ、この値は配置エリア全行長記憶部21に格納され
る。本実施例では、組版情報記憶部5の内容のうち配置
行長CLが300ポイント,行送りlaが30ポイン
ト,行数lが3であり、さらに、文字列の配置方向を示
す組版方向が「横」(X方向)であったとすると、配置
エリアの行長ALは、上記(1)式のX方向のサイズC
Lを行数倍したものとなる。したがって、全行長AL
は、AL=3×CLで求められ、全行長ALは、「90
0」となる。 【0027】ステップS103では、上記ステップS1
01,S102で算出された入力文字列の全長Lと配置
エリアAの全行長ALとに基づいて、補正量Cを算出す
る。 補正量C=全行長AL−全長L ……… (3) この補正量Cは、配置エリアAに、入力された文字列を
収めるために必要な入力文字列の文字間隔の調整量の総
和を示す。この補正量Cは、演算部1によって後述のよ
うに算出されて補正量記憶部22に格納される。本実施
例では、入力文字列の全長Lが「985」,配置エリア
Aの全行長ALが「900」であるので、補正量Cは、
「−85」となり、各文字の送り量を入力文字列全体で
「85」だけ圧縮しなければならない(図8(c)参
照)。 【0028】ステップS104では、演算部1が文字列
に対して分割可能/禁止文字列の判断抽出を、分割可能
情報記憶部31に記憶されている対応表を参照して行
う。この対応表は、前文字の文字コードと後文字の文字
コードとの組合せにより分割可能(○)/禁止(×)を
記載している。この対応表の一例を図7に示す。なお、
本実施例では、欧文/和文だけで分割可能/禁止の判別
を行うが、さらに対応表に句読点などの行頭禁則文字,
括弧などの行末禁則文字等を追加して必要に応じて使い
分けるようにしてもよい。 【0029】ステップS105では、上記ステップS1
03で算出された補正量Cに基づいて、入力された文字
列の文字間隔を調整する。実際には、文字の位置を格納
している文字位置記憶部30の数値を更新する。ただ
し、本実施例では、入力文字列のうち、文字間隔を調整
されるのは、和文等の分割可能文字列S1,S3,S5
のみとし、欧文等の分割禁止文字列S2,S4について
は調整を行わない(図8(c)参照)。入力文字列を全
体で「85」だけ圧縮するために、分割可能文字列S
1,S3,S5に、それぞれの構成文字数に応じた量の
補正量が割り振られる。本実施例では、文字列S1に
「−32」、文字列S3に「−28」、文字列S5に
「−25」の各補正量が割り振られ、各文字列の文字間
隔が調整される。文字間隔の調整の仕方は特に限定しな
いが、例えば、文字列を構成する各文字に該当補正量を
均等に割り振って、各文字間を同じ量だけ調整してもよ
い。また、好ましくは、文字の種類(漢字、平仮名、句
読点)や、隣接文字の字面(文字の形態)などを考慮
し、各文字間隔が均等に見えるように調整する。 【0030】なお、配置エリアAの設定が不適当である
場合、例えば入力文字列に対して配置エリアAが極端に
小さい場合、入力文字列の文字間隔を最小に設定して
も、文字サイズの関係で入力文字列が物理的に配置エリ
アAに納まらない場合も考えられる。このような事態に
対処するために、入力文字列の文字数などに応じて補正
量Cの限界値CMAX を予め設定しておき、ステップS1
03で算出された補正量Cが限界値CMAX を越える場合
は、例えば編集装置の表示画面に、「調整不能です。配
置エリアを設定しなおして下さい」というような警告を
発するように構成してもよい。 【0031】ステップS106では、演算部1が文字列
情報記憶部3の文字コードと、文字位置記憶部30に格
納された前記文字コードに応じた更新後の文字位置とを
参照して分割可能文字列S1,S3,S5と分割禁止文
字列S2,S4の先頭文字の位置を求め、これを先頭文
字位置記憶部32に格納する。本実施例では、図8
(c)に示すように調整された分割可能/禁止文字列毎
に文字「こ」の位置CP1 (0),文字「S 」の位置C
16(268),文字「で」の位置CP22(348),
文字「O」の位置CP35(580),文字「な」の位置
CP42の位置CP42(685)が先頭文字位置記憶部3
2に格納される。 【0032】ステップS107では、配置エリアAの行
末位置を行末位置記憶部33に格納する。ここでは、配
置エリアAの行長CLが300ポイントに指定されてい
るので、各行末位置は、lp1(300),lp2(60
0),lp3(900)となる(図8(c)参照)。な
お、この後、分割可能/禁止文字列を一旦表示し、さら
にオペレータが必要な分割禁止文字列部分を指示するよ
うにしてもよい。この場合は、対応表にないその文字列
(文章)に特に必要な指示が適切にできる。 【0033】ステップS108では、文字間隔が調整さ
れた入力文字列の中から配置エリアAの行末になり得る
候補点(エリア分割候補点)を求める。図9を参照して
エリア分割候補点について説明する。同図(a)に示し
た配置エリアAの行末位置lPiが入力文字列の分割可能
文字列に位置する場合、入力文字列は文字間隔が調整さ
れているので、多くの場合、同図(b)に示すように、
行末位置lPiは単位文字領域(図9(b)では文字
「な」)の上に位置する。このような場合、エリア分割
候補点として、当該単位文字の位置CPiと次の単位文字
の位置CPi+1を選択する。また、同図(c)に示すよう
に、行末位置lPiが分割禁止文字列に位置している場合
は、その前後の文字列の境界、すなわち、当該分割禁止
文字列の先頭文字の位置CPmと、次の分割可能文字列の
先頭文字の位置CPnとをエリア分割候補点として選択す
る。 【0034】以上のようなエリア分割候補点を選択する
ために、演算部1は、配置エリアAの行末位置を記憶し
た行末位置記憶部33の情報と、更新(文字間隔調整)
された文字位置記憶部30の文字位置情報とを比較し、
行末位置に対応した文字位置にある文字が分割可能な文
字(和文)である場合は、行末位置を挟み、これに最も
近い前後の分割可能位置CPiとCPi+1をエリア分割候補
点として選択し(図9の(b))、行末位置に対応した
文字位置にある文字が分割禁止文字(欧文)である場合
は、先頭文字位置記憶部32を参照して、行末位置を挟
み、これに最も近い前後の文字列の先頭文字の分割位置
PmとCPnをエリア分割候補点として選択する(図9の
(c))。このようにして選択された各エリア分割候補
点の位置が分割候補点位置記憶部34に書き込まれる。
図8の(c)に示した例でのエリア分割候補点は、行末
位置lp1,lp2がともに分割禁止文字列に位置している
ので、行末位置lp1(300)に対しては文字位置CP
16(268)とCP22(348)が選択され、行末位置
p2(600)に対しては文字位置CP35(580)と
CP42(685)が選択される(図8(c)参照)。 【0035】図4のステップS109では、上記ステッ
プS108で選択された各エリア分割候補点(CP16
CP22,CP35,CP42)の対応する行末位置lp1,l
p2との差分の絶対値である調整量ALDを算出し、演算
部1の内蔵RAMに記憶する。エリア分割候補点CP16
と行末位置lp1との調整量ALD1 、エリア分割候補点
CP22と行末位置lp1との調整量ALD2 、エリア分割
候補点CP35と行末位置lp2との調整量ALD3、エリ
ア分割候補点CP42と行末位置lp2との調整量ALD4
は、以下の各式で算出される。 【0036】ALD1 =|lp1−CP16| =|300−268| =32 ALD2 =|lp1−CP22| =|300−348| =48 ALD3 =|lp2−CP35| =|600−580| =20 ALD4 =|lp2−CP42| =|600−685| =85 【0037】ステップS110では、上記ステップS1
09で算出された調整量ALD1 〜ALD4 と対応行末
位置の前及び後の文字列の調整許容量とに基づいて、前
/後調整比を算出する。調整許容量とは、各エリア分割
候補点の位置を対応する行末位置に設定した場合に、こ
れに伴って圧縮/伸長による文字間隔調整可能な各文字
列(以下、単に「文字間隔調整可能な文字列」という)
毎に許容される調整量に相当するものである。本実施例
では、調整対象となる文字列は和文で構成され、和文の
各文字は一定の許容される調整量をもつものであり、調
整許容量として、分かり易くするために文字列の文字数
を用いている。前調整比または後調整比とは、あるエリ
ア分割候補点の位置を対応する行末位置に設定した場合
において、このエリア分割候補点の調整量とこれに伴う
文字間隔調整可能な各文字列の調整許容量の総和との比
である。すなわち、上述した調整比は、単位文字当たり
の調整量の大きさを表す。したがって、調整比が大きい
ということは、その文字列を構成する各文字の間隔を大
きく調整しなければならないことを意味する。なお、調
整比の符号「−」は圧縮を、符号「+」は伸長を意味す
る。 【0038】まず、エリア分割候補点CP16の位置を行
末位置lp1に設定した場合(図10(a)のの場合)
の前/後調整比は、その和文の文字数から文字列S1の
調整許容量を「15」、文字列S3とS5の各調整許容
量の総和を「25」とすると以下の各式で算出される。 前調整比AR1F=調整量ALD1 /文字列S1の調整許
容量=32/15≒2.1 後調整比AR1R=調整量ALD1 /文字列S3とS5の
各調整許容量の和=−32/25≒−1.3 【0039】エリア分割候補点CP22の位置を行末位置
p1とした場合(図10(a)のの場合)の前/後調
整比は、以下の各式で算出される。 前調整比AR2F=調整量ALD2 /文字列S1の調整許
容量=−48/15≒−3.2 後調整比AR2R=調整量ALD2 /文字列S3とS5の
各調整許容量の和=48/25≒1.9 【0040】エリア分割候補点CP35の位置を行末位置
p2とした場合(図10(a)のの場合)の前/後調
整比は、文字列S1とS3の各調整許容量の総和を「2
8」、文字列S5の調整許容量を「12」とすると以下
の各式で算出される。 前調整比AR3F=調整量ALD3 /文字列S1とS3の
各調整許容量の和=20/28≒0.7 後調整比AR3R=調整量ALD3 /文字列S5の調整許
容量=−20/12≒−1.7 【0041】エリア分割候補点CP42の位置を行末位置
p2とした場合(図10(a)のの場合)の前/後調
整比は、以下の各式で算出される。 前調整比AR4F=調整量ALD4 /文字列S1とS3の
各調整許容量の和=−85/28≒−3.0 後調整比AR4R=調整量ALD4 /文字列S5の調整許
容量=85/12≒7.1 【0042】後述するステップS111〜S113およ
びステップS120は、上述したステップS109およ
びS110で求められた各エリア分割候補点の調整量と
前/後調整比とを使って、前記各エリア分割候補点の中
から特定のエリア分割候補点を配置エリアの行末として
確定するための処理である。以下、各ステップを順に説
明する。 【0043】まず、ステップS111では、上記ステッ
プS109で算出された各調整量と予め決められた基準
値k(例えば5〜10とするが、必要に応じ適宜設定す
る)とを比較し、配置エリアの全ての各行末位置に対応
した二つの分割候補点に関連した二つの調整量がいずれ
も基準値k以下である場合は、ステップS120へ分岐
し、その一対のエリア分割候補点のうちの調整比の小さ
い方のエリア分割候補点を該当行末位置に確定する。例
えば、図9の(b)に示したように、行末位置が分割可
能文字列内に位置するような場合は、二つのエリア分割
候補点CPi,C Pi+1の調整量は極めて小さくなるので、
エリア分割候補点CPiに関連した前/後調整比が、他方
のエリア分割候補点CPi+1に関連した前/後調整比より
も小さい場合はエリア分割候補点CPiを行末位置lPi
して確定し、逆の場合はエリア分割候補点CPi+1を行末
位置lPiとして確定する。 【0044】ステップS111およびS120を設けた
のは、配置エリアの任意の行末位置に対応した二つのエ
リア分割候補点が共に行末位置に極めて近い場合、後述
するステップS112,S113の処理を実行して何れ
か一方のエリア分割候補点を行末位置として確定するよ
りも、ステップS120の処理によってエリア分割候補
点を確定した方が処理速度が速くなるからである。した
がって、処理速度があまり問題とならないのであればス
テップS111,S120を設けずに、ステップS11
0からステップS112へ移行するように構成してもよ
い。 【0045】ステップS112では、上記ステップS1
10で算出した前/後調整比から調整幅を算出する。調
整幅とは、上記ステップS110で算出した前調整比と
後調整比との差の絶対値であり、これはエリア分割候補
点の位置を対応する行末位置に設定した場合に、配置エ
リアの行末位置の前の文字間隔調整可能な文字列の文字
間のあき具合と、行末位置の後ろ(次の行の先頭)の文
字間隔調整可能な文字列の文字間のあき具合との差であ
る。つまり、この調整幅は、前後の文字列の文字間の調
整(一方は圧縮で、他方は伸長)によって生じる、前後
の文字列の文字間の変動の大きさを表すバロメータとな
る。したがって、調整幅が大きくなるほど、前後の文字
列の文字間の間隔の差が大きくなるので、このような文
字列の配置は好ましくないことがわかる。エリア分割候
補点CP16での調整幅をALW1、CP22での調整幅を
ALW2 、CP35での調整幅をALW3 、CP42での調
整幅をALW4 とすると、各調整幅は、以下の各式で算
出される。 【0046】 調整幅ALW1 =|前調整比AR1F−後調整比AR1R| =|2.1−(−1.3)|=3.4 調整幅ALW2 =|前調整比AR2F−後調整比AR2R| =|−3.2−1.9|=5.1 調整幅ALW3 =|前調整比AR3F−後調整比AR3R| =|0.7−(−1.7)|=2.4 調整幅ALW4 =|前調整比AR4F−後調整比AR4R| =|−3.0−7.1|=10.1 【0047】ステップS113では、上記ステップS1
12で算出した全調整幅の中から、最大の調整幅を選択
し、そのエリア分割候補点と対をなす他方のエリア分割
候補点の位置を対応する行末位置に設定する。この場
合、逆に調整幅が最大となるエリア分割候補点を、行末
位置に設定すると、その行末位置の前後の文字列同士の
文字間隔の差が最も大きくなって見栄えが悪くなる。こ
こではエリア分割候補点CP42を行末位置lp2に設定し
たときの調整幅ALW4 が「10.1」で最大値である
ので、これと対をなすエリア分割候補点CP35を行末位
置lp2とする(図10(b)参照)。そして、文字列S
4およびS5が配置エリアAの第3行l3 に配置される
ように、文字間隔調整可能な文字列S5の文字間隔を調
整する。文字間隔の調整の仕方は特に限定しないが、例
えば、文字間間隔の均等詰め、好ましくは、文字の種類
や隣接文字の字面などを考慮し、各文字間隔が均等に見
えるように調整する。続いて、文字位置記憶部30に格
納されている文字列S4,S5の各文字位置を調整後の
新たな文字位置に更新する。 【0048】ステップS114では、上記ステップS1
13で位置が確定した一対のエリア分割候補点CP35
CP42を分割候補点位置記憶部34から削除する。 【0049】ステップS115では、分割候補点位置記
憶部34に格納されている他のエリア分割候補点がある
か否かを調べて、あればステップS116に分岐し、無
ければステップS117へ分岐する。ここでは、エリア
分割候補点CP16とCP22が分割候補点位置記憶部34
に格納されているので、ステップS116へ分岐する。 【0050】ステップS116では、入力文字列の残り
の初期の文字列(図8(b)の各S1 ,S2 ,S3 )の
各長さの和を全長Lとし、配置エリアの残りの行長(l
1 +l2 )を全行長ALとしてステップS103に戻
る。以下の処理では、残りの分割候補点CP16,CP22
の位置を、前述と同様にして確定していく。 【0051】すなわち、ステップS103では、全長L
が「640」,配置エリアの全行長ALが「600」で
あるので、補正量Cは、「40」となり、各文字間隔の
送り量を文字列全体で「40」だけ圧縮しなければなら
ない(図10(c)参照)。 【0052】ステップS105では、既に説明したよう
に補正量Cに基づいて、入力された文字列S1 ,S2
3の文字間隔を調整する。これにより、文字位置記憶
部30の内容は、文字位置CP16が「280」、文字位
置CP22が「360」となるように各文字の位置が更新
される(図11(a)参照)。 【0053】ステップS106では、図10(c)に示
すように文字位置CP1 (0),文字位置CP16(28
0),文字位置CP22(360)が先頭文字位置記憶部
32に格納される。 【0054】ステップS107では、各行末位置l
p1(300),lp2(600)が行末位置記憶部33に
格納される(図10(c)参照)。 【0055】ステップS108では、行末位置lp1(3
00)に対して文字位置CP16(280)とCP22(3
60)が新たなエリア分割候補点として選択され、分割
候補点位置記憶部34の内容がこれに更新される(図1
1(a)参照)。 【0056】ステップS109では、エリア分割候補点
CP16と行末位置lp1との調整量ALD1 、エリア分割
候補点CP22と行末位置lp1との調整量ALD2 が以下
の各式で算出される。 ALD1 =|lp1−CP16| =|300−280| =20 ALD2 =|lp1−CP22| =|300−360| =60 【0057】ステップS110では、各エリア分割候補
点CP16,CP22について、前/後調整比を算出する。
エリア分割候補点CP16の位置を行末位置lp1とした場
合(図11(a)のの場合)の前/後調整比は、文字
列S1の調整許容量を「15」、文字列S3の調整許容
量を「13」とすると以下の各式で算出される。 前調整比AR1F=調整量ALD1 /文字列S1の調整許
容量=20/15≒1.3 後調整比AR1R=調整量ALD1 /文字列S3の調整許
容量=−20/13≒−1.5 エリア分割候補点CP22の位置を行末位置lp1とした場
合(図11(a)のの場合)の前/後調整比は、以下
の式で算出される。 前調整比AR2F=調整量ALD2 /文字列S1の調整許
容量=−60/15≒−4.0 後調整比AR2R=調整量ALD2 /文字列S3の調整許
容量=60/13≒4.6 【0058】ステップS111では、各調整量が、基準
値kよりも大きいか否かを判断してステップS112ま
たはS120に分岐する。図11に示した例では、各調
整量は比較的大きいのでステップS112に分岐する。 【0059】ステップS112では、各エリア分割候補
点CP16,CP22について調整幅を算出する。エリア分
割候補点CP16での調整幅をALW1 、CP22での調整
幅をALW2 とすると、各調整幅は、以下の各式で算出
される。 調整幅ALW1 =|前調整比AR1F−後調整比AR1R| =|1.3−(−1.5)|=2.8 調整幅ALW2 =|前調整比AR2F−後調整比AR2R| =|−4.0−(4.6)|=8.6 【0060】ステップS113では、上記ステップS1
12で算出した調整幅の中から、最大の調整幅を選択
し、このエリア分割候補点と対をなす他方のエリア分割
候補点の位置を対応する行末位置として確定する。ここ
では調整幅ALW2 が「8.6」で最大値であるので、
これに対応するエリア分割候補点CP22と対をなす他方
のエリア分割候補点CP16の位置を行末位置lp1とする
(図11(b)参照)。そして、文字列S2,S3が配
置エリアA1の第2行l2 に配置されるように文字間隔
調整可能な文字列S3の文字間隔を調整する。続いて、
文字位置記憶部30に格納されている文字列S2,S3
の各文字位置を調整後の新たな文字位置に更新する。 【0061】ステップS114では、上記ステップS1
13で位置が確定したエリア分割候補点CP16,CP22
を、分割候補点位置記憶部34から削除する。 【0062】ステップS115では、分割候補点位置記
憶部34に格納されているエリア分割候補点があるか否
かを調べて、あればステップS116に分岐し、無けれ
ばステップS117へ分岐する。本実施例では、この段
階で全てのエリア分割候補点が削除されたので、ステッ
プS117へ分岐する。 【0063】ステップS117では、残りの文字列(こ
こでは、文字列S1)の全長が残りの配置エリアA2
全行長l1 となるように文字間隔を調整して、文字位置
記憶部30の文字列S1の各文字の位置を更新して(図
11(c)参照)、処理を終了する。 【0064】この後、文字組版編集装置は、演算部1を
介して文字位置記憶部30と文字列情報記憶部3および
組版情報記憶部5を参照して文字間隔が調整されて配置
エリアに最適配置された文字列データを取り込むことが
できる。 【0065】上記のステップを経て文字位置を調整した
文字列I7と配置エリアAおよび初期の入力文字列Iと
の位置関係を図12に示す。 【0066】なお、本実施例では、配置エリアとして矩
形状の枠を例に採って説明したが、本発明は、円状枠,
任意形状等の種々の配置エリアに対して実施可能であ
る。この場合は、本実施例の各行l1 ,l2,l3 を各
々の配置位置と共に個別にその行長を設定すればよい。 【0067】また、実施例で採り上げた配置例では、配
置エリアAの最終行l3 に配置する文字列S4,S5が
最初に確定したので、それ以降は、確定した最終行l3
よりも以前の第1行l1 と第2行l2 からなる新たな一
つの配置エリアA1 に他の文字列S1〜S3を配置し
た。しかし、必ずしも配置エリアAの最終行から文字列
配置が確定するのではなく、むしろ配置エリアの中間に
ある行末位置への文字列配置が最初に確定する事が多
い。このような場合、最初に確定した中間の行末位置か
ら前にある配置エリアA1 と、前記確定した行末位置か
ら後ろにある配置エリアA2 とについて、それぞれに配
置されるべき文字列を配置していくことになる。このよ
うな場合にも上述した実施例の処理を適用することがで
きる。 【0068】<従来方法との比較>従来方法と本発明方
法との比較を、図13を参照して説明する。この図は、
上記実施例でも用いた文字列『これはエリアジャストの
例を示すSAMPLEです。自動的な調整によってOPTIMUM な
行揃えが実現できます。』の例である。 【0069】同図13(a)は、本発明の文字組版方法
による例を示し、同図13(b),(c)は、従来方法
による例を示す。同図13(b)の従来1では、第3行
目の文字間隔が広く感じられ、同図13(c)の従来2
では、第2行目の文字間隔が広く感じられる。同図13
(a)の本発明方法では、各行においてほぼ均等に文字
間隔が感じられる。 【0070】 【発明の効果】以上の説明から明らかなように、本発明
によれば、配置エリア内に入力文字列を配置する際に、
配置エリアの行末位置に分割禁止文字列が位置する場合
には、分割禁止文字列の前後の分割可能な文字位置をエ
リア分割候補点として選択し、いずれか一方の点を行末
位置とするようにしているので、分割禁止文字列の途中
で改行されることがない。 【0071】また、配置エリアの各行末位置に対応した
各対のエリア分割候補点群のうち、いずれか一つのエリ
ア分割候補点を行末位置として確定する際に、各エリア
分割候補点について前後の文字列の文字間隔の調整比の
幅(調整幅)を求め、これらの調整幅のうち、最大の調
整幅をもつエリア分割候補点と対をなす他方のエリア分
割候補点を、当該行末位置として最初に確定しているの
で、前後の行における文字列の間隔が著しく異なるとい
う、好ましくない文字列の配置が回避され、各文字列を
バランスよく配置エリアに配置することができる。
DETAILED DESCRIPTION OF THE INVENTION [0001] The present invention relates to a desk top pub
Character typesetting editing device used for lithography (DTP), etc.
In the area of any specified shape
The present invention relates to a character typesetting method for arranging character strings in a form. [0002] 2. Description of the Related Art As a conventional typesetting method of this kind, there is an example.
For example, as shown in JP-A-5-124169
There is. This typesetting method is based on
Specified by correcting the amount and text size.
Input string without leaving an odd margin in the
Be placed. [0003] However, this is not the case.
In the case of the conventional example having such a configuration, the following problem occurs.
is there. In other words, the division prohibited character string of the input character string
The amount of clogging of each character string without discriminating the type of character string that can be divided
And text size are corrected, so it is possible to use
Line breaks in the middle of the division prohibited character string including
It happens that it is divided and arranged. [0004] Also, in consideration of the character string prohibited from division,
If a character string that cannot be split is located at the end of the line,
Either shift the stop character string uniformly to the next line, or
Reduce the space and put the non-segmented character string on that line.
It is also conceivable. However, such a uniform
According to the arrangement of the character strings,
Very easy to make a difference and very poor looking
(See FIGS. 13B and 13C described later). The present invention has been made in view of such circumstances.
And it is desirable to be split in the middle of the character string.
Considering character strings that are not
Optimum input character string without leaving blank space in the layout area
Aims to provide a typesetting method that can be placed
Target. [0006] SUMMARY OF THE INVENTION The present invention provides such an eye.
In order to achieve the target, the following configuration is adopted. Sand
According to the first aspect of the present invention, a line feed is performed in
A splittable character string that may be placed
Specify the input character string including the division prohibited character string that is not placed
So that there is no odd residue for the allocated placement area
Character typesetting for adjusting and arranging the input character string
The method wherein the total length of the input string is
Character spacing of the input string so that it equals the total length of the line
Adjusting the input character and adjusting the character spacing
The position of each character in the column, the position of the end of each line in the layout area,
And the end of the line is
When positioned, the position of the unit character at the end of the line
When, With the end of the line in betweenUnit character position
Is a pair of area division candidate points corresponding to the end of the line.
And the end of the line is split in the input string.
If it is located in a prohibited character string,
First character position andBetween the end of the line
IThe position of the first character of the next divisible character string and the end of the line
Selected as a pair of area division candidate points corresponding to the
Selection process, the end position of each line in the placement area, and the end of each line
The difference between a pair of area division candidate points corresponding to the position
Each area division candidate point
The process of obtaining the adjustment amount and the area division candidates
Set the point adjustment amount and a certain area division candidate point at the end of the line
Area division candidate whose character spacing is adjusted when
The sentence in the character string part before and after the dot
Sum of each adjustment allowance of each character string whose character spacing can be adjusted
Of each area division candidate point
And the adjustment ratio of the front character string (adjustment ratio) and the adjustment ratio of the back character string
(Post-adjustment ratio) and the respective areas
Each area is determined based on the front / rear adjustment ratio corresponding to the candidate division point.
Calculate the adjustment ratio width (adjustment width) for the candidate division points
Process and the area having the largest adjustment width among the adjustment widths.
(A) The position of the other area division candidate point paired with the division candidate point
Is determined as the line end position of the corresponding arrangement area
And the layout area is divided by the determined end of line
And the determined area division candidate point as a boundary
To partition the input character string, and
A) and the input character strings to be
By repeating the above series of steps,
Deciding the arrangement position of the input character string in order.
It is characterized by the following. [0007] The operation of the present invention is as follows. First, split
Total length of input character string including possible character strings and split-prohibited character strings
So that is equal to the total length of each row in the placement area
Adjust the character spacing of a string. And the adjusted input
The position of each character in the character string and the end of each line in the layout area
Compare. If the end of the line is located in the splittable character string
The position of the unit character at the end of the line, The line
Closest to the end positionNext unit character position,
In other words, the position before and after dividing the unit character area is a pair
Is selected as an area division candidate point. On the other hand,
If it is located in a division prohibited character string, the division prohibited character
The position of the first character in the columnBetween the end of the line and the
Also closeThe position of the first character of the next divisible string, that is,
The positions before and after the division prohibited character string are divided into a pair of areas.
Select as a division candidate point. With this, the division prohibition statement
Prevents line breaks (divided arrangement) in the middle of a character string. Next, the end of each line in the layout area and the end of each line
The difference between a pair of area division candidate points corresponding to the position
Each area division candidate point
Calculate the adjustment amount of the preceding and following character strings. That is, a certain area
If the division candidate point is fixed at the end of the line, the previous character
For a column, the character string has a length corresponding to the adjustment amount.
It is decompressed or compressed.
The character string is compressed or decompressed by a length corresponding to the adjustment amount.
Then, the adjustment amount of each area division candidate point and the
In the character string part before and after the split candidate point,
Adjustment tolerance of each character string whose character spacing can be adjusted in
By calculating the ratio to the sum of the amounts,
A front / rear adjustment ratio is calculated for the supplementary point. This adjustment ratio is
Equivalent to the character spacing adjustment amount per unit character of the preceding and following character strings
You. [0009] Then, before each area division candidate point
/ Based on the post-adjustment ratio, the adjustment ratio of each area division candidate point
Calculate the width (adjustment width). This adjustment width is
The sentence of the character string before and after when the dividing candidate point is fixed at the end of the line
It is a barometer that indicates the difference in the clearance between characters. That is,
The greater the adjustment width, the greater the difference between the character spacing
It becomes bad, so it looks bad. Therefore, each adjustment range
Find the area division candidate point with the largest adjustment width
The other area division candidate paired with the area division candidate point
Set the position of the point as the end of the line in the corresponding placement area.
Area division with the maximum adjustment width
Candidate points are placed at the end of the line.
So that it does not become unfavorable. [0010] As described aboveAndFirst, one of the placement areas
From the group, in the input string to be
When the character position is determined, the placement area and the input character string
Is divided into two areas from the place where the character
Be partitioned. Therefore, in the subsequent processing,
Each placement area and the area to be placed in each area
Repeat the above steps for the input character string
The character position in each placement area can be
Determine in order. [0011] An embodiment of the present invention will be described below with reference to the drawings.
I will tell. FIG. 1 shows a character using the character typesetting method of the present invention.
FIG. 3 is a block diagram showing a character typesetting device portion of the typesetting editing device;
is there. In the figure, reference numeral 1 denotes an arithmetic unit for executing the method of the present invention.
is there. The operation unit 1 includes a program execution CP (not shown).
U, ROM for storing programs and R used for calculations, etc.
It is composed of AM and the like. The character string input unit 2
String data file (font
String data from a medium that stores name, character code, etc.)
Is stored in the character string information storage unit 3, and the arithmetic unit 1
Refers to the stored character string data. Typesetting information
The input unit 4 stores information (for example, a character string)
Information on the layout area of the
To pay. This typesetting information input unit 4 includes an editing device (not shown).
You can indicate a specific position such as the placement area on the display screen of
There are pointing devices such as mice and tablets
Input device such as a keyboard to indicate a specific position
Consists of The information stored in the typesetting information storage unit 5
Referenced by the arithmetic unit 1. The operation unit 1 stores a case in the character string information storage unit 3.
The character code corresponding to the character string data of the stored input character string
The character parameter of the character is read from the character parameter storage unit 10.
The character string length storage unit 20 calculates the total length of the character string and
Of the typesetting information stored in the typesetting information storage unit 5.
Refer to the information about the placement area to
The sum of the line lengths is calculated and stored in the layout area total line length storage unit 21.
Store. Also, the character string length storage unit 20 and the arrangement area
Character string arrangement based on the value stored in the entire line length storage unit 21
Is calculated and stored in the correction amount storage unit 22.
You. The arithmetic unit 1 is stored in a character string information storage unit 3.
The sentence corresponding to the character string data is referred to
Character parameters such as character width are stored in the character parameter storage unit 10.
From each character, calculate the position where each character is
It is stored in the storage unit 30. Also, the character string information storage unit 3
The stored character string data is divided and distributed
Characters that are prohibited from being placed (division prohibited characters)
Code and characters that can be split
Character code) is stored as a correspondence table
With reference to the splittable information storage unit 31, the first sentence of each character string
The position of the character is stored in the leading character position storage unit 32. Further
Next, the layout area is referred to with reference to the typesetting information in the typesetting information storage unit 5.
The line end position of each line is calculated and stored in the line end position storage unit 33.
To pay. The character position storage unit 30 and the head character position storage
Calculated based on the contents of the section 32 and the line end position storage section 33.
The position of the area division candidate point to be divided is stored in the division candidate point position storage unit 3.
4 is stored. After the character typesetting process, the character typesetting editing device
The character code and the like of the character string information storage
Character string data, information of the arrangement area of the typesetting information storage unit 5 and
Arrangement of each character after adjustment of character position in character position storage unit 30
Refer to location. The character string information storage unit 3 and the typesetting information
The contents of the report storage unit 5 are edited through the arithmetic unit 1 by character typesetting.
Output to a display device such as a display provided in the device.
You. First, in order to facilitate understanding of the description, a sentence
Explanation of character components and layout areas with reference to FIG.
Keep it. <Definition of Character> FIG.
And the font style of the character is the minimum placement unit of the character
It is housed in the virtual body IB and is lateral to the virtual body IB.
Character length CWAnd the vertical length is the character height CH
And Generally, in Japanese text, the character width CWAnd character height
Sa CHIs composed of the same values as
CWAnd character height CHDiffers from character to character. The virtual button
At an appropriate distance from the edge inside the di IB
A face F indicating the font shape of the character is arranged, and this face is
Dot data consisting of a collection of points and mathematically represent shapes
It is composed of vector data. Outside of the face F
A rectangular frame that surrounds the shape is bounded by a bounding box
BB and the horizontal direction of the bounding box BB
Let the length be the face width W and the length in the vertical direction be the face height H
You. [0018] The virtual body IB is disposed in the virtual body IB.
Between the character width W of the character surface F and the character width CW of the virtual body IB
The front-back difference is defined as the interval a and the interval b, respectively, and the face height
Height H and character heightC H And the difference between the upper and lower
And interval d. These intervals are within the virtual body IB.
Depending on the size and shape of the face to be stored in
Different for each character. Also, place the above characters in user space
When arranging at the desired coordinates, the
The reference position is appropriately set on the character, but here
Assume that the lower left of the virtual body IB is its reference point CP. <Definition of Arrangement Area> FIG.
Specified by the operator or designer during typesetting
An example of an area is shown, and a headline H indicating the beginning of a sentence and
The area sandwiched by the get lines T is the arrangement area A.
A region l indicated by oblique lines inside the arrangement area A1~ L
ThreeIndicates the line where the characters in the placement area A should be placed.
You. The character C1Reference point is position CP1To
And the position CP1Distance R from1(Feed amount
R1) Character CTwoIs arranged. Character
When the reference point CP is located beyond the target line T
Line break before placing the character,
The character is placed. At this time, the interval between the line and the next line is
It is represented by the line feed amount la. In addition, headline H and tar
The distance from the get line T is defined as the line length CL of the arrangement area.
You. The above headline H, target line
T, line length CL of arrangement area, line feed amount la, number of lines l, etc.
In this embodiment, the typesetting information is stored by the operator or the design.
Input through the typesetting information input unit 4 by the user. This
Of the rectangular frame of the placement area A according to the input typesetting information
The size in the X direction and the size in the Y direction are calculated by the following equations.
It is. X = CL (1) Y = CH+ La × (l-1) (2) <Processing Procedure> Next, the flowchart shown in FIGS.
The processing procedure will be described with reference to the flowchart. Note that this process
Character string data from the character string input unit 2 before executing
Input to the character string information storage unit 3 as a data file.
Shall be stored. This stored character
FIG. 5 shows a schematic diagram of the column data file. In this embodiment
Is the input string as the text "This is an area just
SAMPLE showing an example. OPTIMUM by automatic adjustment
Justification can be realized. (The number of characters: 53)
explain. The same applies to typesetting information.
Information about the arrangement area A via the input unit 4 (head
Input H, coordinates of target line T, number of lines l, etc.)
It is assumed that the data is stored in the typesetting information storage unit 5.
A character string and typesetting consisting of the above character string data and typesetting information
FIG. 8 shows an example (however, the space between characters is not adjusted).
(A). In the figure, the symbol I indicates the character string information storage unit 3.
Indicates an input character string based on character string data, and surrounds it
Is based on the typesetting information stored in the typesetting information storage unit 5.
A placement area A is placed. Note that they are separated by parentheses
Character strings S1 to S5 can be divided in the target character string
And the character string for each division prohibition.
This is performed in step S104. In step S100 of FIG. 3, the input character string
Each character position is stored in the character string information
The data is stored in the character position storage unit 30 with reference to the storage unit 10. This
FIG. 8B is a schematic diagram of the character position storage unit 30 of FIG. Ma
In the figure, symbols S1, S3, and S5 indicate dividable character strings.
The symbols S2 and S4 (hatched portions) refer to the character strings that are prohibited from being divided.
Shown in In addition, the character parameter
FIG. 6 shows a schematic diagram of the contents of the character parameters. More specifically, the calculation unit 1 is a character string information storage unit.
Refer to the character string data stored in 3 (see Fig. 5)
And the character position of the character corresponding to the first character code 1
CP1As “0” in the first position of the character position storage unit 30
Store. Next, the character width C of the first characterWThe second
Character position CP of the character corresponding to character code 2 ofTwoAs
It is stored in the second position of the character position storage unit 30. Character width CW
Is further stored in the character parameter storage unit 10 for each European / Japanese sentence.
Character file stored for each file name
Character parameters (intervals a, b, c, d,
And the character width W and the character height H), the interval a and the interval b
It is obtained by the sum of the character width W. Character position stored in character position storage unit 30
Is the character width C of the previous characterWIs set as the feed amount R
Is the position of the reference point CP for each character of
Only ". Thus, the character string information storage unit 3
All character codes of character string data stored in
The positions of the same characters are sequentially stored. In this embodiment, the sum
Set the character size of the sentence to "20 points"
When shown together with S1 to S5, as shown in FIG.
Position CP of first character "S" of S216Is the same as the font size
The number of points in the same unit is "300" and the first character string S3
Position CP of the character "de"twenty twoIs "380", the last character string S4.
Position CP of first letter "O"35Is "640", the character string S5
Position CP of the first character "na"42Becomes “745”
Position CP of the last character "." (53rd character)53
Becomes “965”. In step S101, the total length of the input character string
Calculate L. Arithmetic unit 1 determines in step S100 that the sentence
Last position of character position stored in character position storage unit 30
And the value is the character width C of the last character.WAnd add
It is stored in the character string length storage unit 20. All of the character strings in this embodiment
The length L is the last position "965" (the 53rd character
("." Position) plus 20 points of character size
"985" (see FIG. 8B). In step S102, the arithmetic unit 1 performs the
Total line length AL of rear A (sum of line lengths in the arrangement direction of character strings)
Is calculated. The total line length AL is the line length C of the typesetting information storage unit 5.
L, and is calculated as the sum of the line lengths CL of the arrangement area A.
This value is stored in the layout area total line length storage unit 21.
You. In the present embodiment, the layout of the contents of the
Line length CL is 300 points, line feed la is 30 points
G, the number of lines l is 3, and further indicates the direction in which the character string is arranged.
If the typesetting direction is "horizontal" (X direction),
The line length AL of the area is the size C in the X direction of the above equation (1).
L is multiplied by the number of rows. Therefore, the total line length AL
Is obtained by AL = 3 × CL, and the total line length AL is “90
0 ". In step S103, the above-described step S1
01, total length L and arrangement of input character strings calculated in S102
A correction amount C is calculated based on the total line length AL of the area A.
You. Correction amount C = total line length AL−total length L (3) This correction amount C is obtained by adding the input character string to the layout area A.
The total amount of adjustment of the character spacing of the input string required to fit
Indicates the sum. The correction amount C is calculated by the arithmetic unit 1 as described later.
Is calculated and stored in the correction amount storage unit 22. This implementation
In the example, the total length L of the input character string is “985”,
Since the total line length AL of A is “900”, the correction amount C is
"-85", and the feed amount of each character is
It must be compressed by "85" (see FIG. 8 (c)).
See). In step S104, the arithmetic unit 1 sets the character string
Extraction of judgment of possible / prohibited character strings is possible for
Referring to the correspondence table stored in the information storage unit 31,
U. This correspondence table shows the character code of the first character and the character of the second character
Can be divided (○) / prohibited (×) by combination with code
It has been described. FIG. 7 shows an example of this correspondence table. In addition,
In the present embodiment, it is determined whether division is possible / prohibited only with European / Japanese text.
But the correspondence table also contains non-starter characters such as punctuation,
Add non-line ending characters such as parentheses and use them as necessary.
You may make it divide. In step S105, the above-mentioned step S1 is executed.
03 based on the correction amount C calculated in step 03.
Adjust character spacing in columns. Actually stores the position of the character
The numerical value stored in the character position storage unit 30 is updated. However
However, in the present embodiment, the character spacing of the input character string is adjusted.
What is performed is a divisible character string S1, S3, S5 such as a Japanese sentence.
And only for prohibited character strings S2 and S4 such as European languages
Does not perform the adjustment (see FIG. 8C). Input string
In order to compress only “85” in the body, the divisible character string S
1, S3, and S5 each have an amount corresponding to the number of constituent characters.
A correction amount is allocated. In this embodiment, the character string S1
"-32", "-28" for character string S3, "-28" for character string S5
Each correction amount of “−25” is assigned, and the
The gap is adjusted. How to adjust character spacing is not particularly limited
However, for example, for each character that constitutes a character string,
Allocate evenly and adjust each character by the same amount.
No. Preferably, the character type (Kanji, Hiragana, Phrase
(Reading points) and the character surface (character form) of adjacent characters
Then, adjust so that each character spacing looks even. The setting of the layout area A is inappropriate.
In this case, for example, the layout area A is extremely
If it is smaller, set the character spacing of the input
Also, the input character string is physically
A. It is conceivable that it does not fit in A. In such a situation
Corrected according to the number of characters in the input string to deal with
Limit value C of quantity CMAXIs set in advance, and step S1
03 is the limit value CMAXIf
Is displayed on the display screen of the editing device.
Please reset the storage area. "
You may comprise so that it may emit. In step S106, the arithmetic unit 1 sets the character string
The character code in the information storage unit 3 and the case
And the updated character position according to the stored character code.
Referenceable divisible character strings S1, S3, S5 and a division prohibition sentence
Find the position of the first character of the character strings S2 and S4, and
It is stored in the character position storage unit 32. In this embodiment, FIG.
For each splittable / prohibited character string adjusted as shown in (c)
At the position CP of the character "ko"1(0), position C of character "S"
P16(268), position CP of character "de"twenty two(348),
Position CP of letter "O"35(580), the position of the character "na"
CP42Position CP42(685) is the first character position storage unit 3
2 is stored. In step S107, the row of the layout area A
The end position is stored in the line end position storage unit 33. Here,
The line length CL of the storage area A is specified as 300 points.
Therefore, each line end position is lp1(300), lp2(60
0), lp3(900) (see FIG. 8C). What
After this, the character string that can be divided / prohibited is displayed once,
Prompts the operator to specify the required character string
You may do it. In this case, the string not in the correspondence table
Instructions particularly necessary for (text) can be appropriately performed. In step S108, the character spacing is adjusted.
May be the end of the line in the layout area A from the input character string
Find candidate points (area division candidate points). Referring to FIG.
The area division candidate points will be described. As shown in FIG.
End position l of the layout area APiCan split the input string
If located in a string, the input string will be adjusted for character spacing.
In most cases, as shown in FIG.
Line end position lPiIs a unit character area (in FIG. 9B, a character
"Na"). In such a case, area division
As a candidate point, the position C of the unit characterPiAnd the next unit character
Position CPi + 1Select Also, as shown in FIG.
At the end of the line lPiIs located in a character string that cannot be split
Is the boundary of the character string before and after it, that is,
Position C of the first character of the character stringPmAnd the next divisible string
First character position CPnAnd are selected as area division candidate points
You. The above area division candidate points are selected.
Therefore, the arithmetic unit 1 stores the end-of-line position of the arrangement area A.
Information in the end-of-line storage unit 33 and update (character spacing adjustment)
Is compared with the obtained character position information in the character position storage unit 30,
A sentence in which the character at the character position corresponding to the end of the line can be split
If it is a character (Japanese sentence), place the end of the line
Dividable position C before and after closePiAnd CPi + 1Is the area division candidate
Selected as a point ((b) in FIG. 9), and
When the character at the character position is a division prohibited character (European)
Refers to the first character position storage unit 32 and
And the split position of the first character of the string before and after it
CPmAnd CPnIs selected as an area division candidate point (see FIG. 9).
(C)). Each area division candidate selected in this way
The position of the point is written to the division candidate point position storage unit 34.
The area division candidate points in the example shown in FIG.
Position lp1, Lp2Are both located in split-prohibited strings
Therefore, the line end position lp1Character position CP for (300)
16(268) and CPtwenty two(348) is selected and the line end position
lp2Character position CP for (600)35(580) and
CP42(685) is selected (see FIG. 8C). In step S109 of FIG.
Area dividing candidate points (CP16,
CPtwenty two, CP35, CP42) Corresponding line end position lp1, L
p2The adjustment amount ALD, which is the absolute value of the difference from
It is stored in the built-in RAM of the unit 1. Area division candidate point CP16
And line end position lp1Adjustment amount ALD1, Area division candidate points
CPtwenty twoAnd line end position lp1Adjustment amount ALDTwo, Area division
Candidate point CP35And line end position lp2Adjustment amount ALDThree, Eli
A division candidate point CP42And line end position lp2Adjustment amount ALDFour
Is calculated by the following equations. ALD1= | Lp1-CP16| = | 300-268 | = 32 ALDTwo= | Lp1-CPtwenty two| = | 300-348 | = 48 ALDThree= | Lp2-CP35| = | 600-580 | = 20 ALDFour= | Lp2-CP42| = | 600-685 | = 85 In step S110, step S1 is performed.
Adjustment amount ALD calculated in 091~ ALDFourAnd corresponding line end
Based on the string's adjustment allowance before and after the position,
/ Calculate the post-adjustment ratio. The adjustment allowance is divided into each area
If the position of the candidate point is set to the corresponding end-of-line position,
Each character whose character spacing can be adjusted by compression / decompression
Column (hereinafter simply referred to as "character string with adjustable character spacing")
This corresponds to the adjustment amount allowed for each. This embodiment
In, the character string to be adjusted is composed of Japanese
Each character has a certain amount of adjustment allowed,
The number of characters in the string, for clarity,
Is used. The pre-adjustment ratio or post-adjustment ratio is a certain area.
When the position of a candidate division point is set to the corresponding end-of-line position
In the above, the adjustment amount of this area division candidate point and the
Ratio to the total adjustment allowance for each character string with adjustable character spacing
It is. In other words, the adjustment ratio described above is
Represents the magnitude of the adjustment amount. Therefore, the adjustment ratio is large
This means that the spacing between the characters that make up the string is large.
It means that you have to adjust it. Note that
The sign "-" of compression ratio means compression, and the sign "+" means expansion.
You. First, the area division candidate points CP16Row position
End position lp1(In the case of FIG. 10A)
The front / back adjustment ratio of the character string S1 is calculated based on the number of characters in the Japanese sentence.
Allowable adjustment amount is “15”, and each of character strings S3 and S5 is allowed.
Assuming that the sum of the quantities is “25”, it is calculated by the following equations. Pre-adjustment ratio AR1F= Adjustment amount ALD1/ Adjustment of character string S1
Capacity = 32/15 ≒ 2.1 Rear adjustment ratio AR1R= Adjustment amount ALD1/ Of character strings S3 and S5
Sum of each allowable adjustment amount = −32 / 25 ≒ −1.3 Area division candidate point CPtwenty twoPosition at end of line
lp1Before / after adjustment (case of FIG. 10A)
The integer ratio is calculated by the following equations. Pre-adjustment ratio AR2F= Adjustment amount ALDTwo/ Adjustment of character string S1
Capacity = −48 / 15 ≒ −3.2 Rear adjustment ratio AR2R= Adjustment amount ALDTwo/ Of character strings S3 and S5
Sum of each allowable adjustment amount = 48/25 ≒ 1.9 Area division candidate point CP35Position at end of line
lp2Before / after adjustment (case of FIG. 10A)
The multiplication ratio is obtained by adding the sum of the respective adjustment allowable amounts of the character strings S1 and S3 to "2
8 "and the allowable adjustment amount of the character string S5 as" 12 "
Is calculated by the following equations. Pre-adjustment ratio AR3F= Adjustment amount ALDThree/ Of strings S1 and S3
Sum of allowable adjustment amounts = 20/28 ≒ 0.7 Rear adjustment ratio AR3R= Adjustment amount ALDThree/ Adjustment of character string S5
Capacity = −20 / 12 ≒ −1.7 Area division candidate point CP42Position at end of line
lp2Before / after adjustment (case of FIG. 10A)
The integer ratio is calculated by the following equations. Pre-adjustment ratio AR4F= Adjustment amount ALDFour/ Of strings S1 and S3
Sum of allowable adjustment amounts = −85 / 28 ≒ −3.0 Rear adjustment ratio AR4R= Adjustment amount ALDFour/ Adjustment of character string S5
Capacity = 85/12 ≒ 7.1 Steps S111 to S113 to be described later and
And step S120 are the same as steps S109 and S109 described above.
And the adjustment amount of each area division candidate point obtained in step S110 and
By using the front / rear adjustment ratio, the area division candidate points
A specific area division candidate point from
This is a process for determining. The following describes each step in order
I will tell. First, in step S111, the above steps are performed.
Each adjustment amount calculated in step S109 and a predetermined reference
Value k (for example, 5 to 10, but may be set as needed.
), And correspond to every line end position in the placement area
The two adjustment amounts related to the two split candidate points
If is also equal to or smaller than the reference value k, the flow branches to step S120.
And the adjustment ratio of the pair of area division candidate points is small.
Which area division candidate point is determined at the corresponding line end position. An example
For example, as shown in FIG. 9B, the line end position can be divided.
If it is located in a character string, split it into two areas
Candidate point CPi, C Pi + 1Since the adjustment amount of becomes extremely small,
Area division candidate point CPiThe front / back adjustment ratio associated with
Area division candidate point CPi + 1From front / rear adjustment ratio related to
Is smaller, the area division candidate point CPiIs the line end position lPiWhen
, And in the opposite case, the area division candidate point CPi + 1At the end of the line
Position lPiIs determined. Steps S111 and S120 are provided.
Are the two edges corresponding to any end of the line in the placement area.
If both rear division candidate points are extremely close to the end of the line,
The processing of steps S112 and S113
Determine one of the area division candidate points as the line end position
In step S120, the area division candidate
This is because the processing speed is faster when the point is determined. did
Therefore, if processing speed does not matter so much,
Step S11 is performed without providing steps S111 and S120.
0 to step S112.
No. In step S112, the above step S1
The adjustment width is calculated from the front / rear adjustment ratio calculated in 10. Key
The adjustment width is equal to the pre-adjustment ratio calculated in step S110.
The absolute value of the difference from the post-adjustment ratio, which is the area division candidate
If the position of a point is set to the corresponding end-of-line position,
Adjustable character spacing character in front of rear end of line
The space between and the statement after the end of the line (the beginning of the next line)
This is the difference between the spacing between characters in a character string with adjustable character spacing.
You. In other words, this adjustment width is adjusted between the characters of the previous and next character strings.
Before and after, resulting from the adjustment (one is compression, the other is expansion)
A barometer that indicates the magnitude of the variation between characters in the character string
You. Therefore, as the adjustment width increases, the characters before and after
Because the difference in the spacing between characters in the column is large, such statements
It can be seen that the arrangement of the character strings is not preferable. Area split
Complement CP16Adjustment range by ALW1, CPtwenty twoAdjustment range
ALWTwo, CP35Adjustment range by ALWThree, CP42Tonality
ALWFourThen, each adjustment range is calculated by the following formula.
Will be issued. [0046] Adjustment width ALW1= | Pre-adjustment ratio AR1F-Rear adjustment ratio AR1R| = | 2.1-(-1.3) | = 3.4 Adjustment width ALWTwo= | Pre-adjustment ratio AR2F-Rear adjustment ratio AR2R| = | -3.2-1.9 | = 5.1 Adjustment width ALWThree= | Pre-adjustment ratio AR3F-Rear adjustment ratio AR3R| = | 0.7-(-1.7) | = 2.4 Adjustment width ALWFour= | Pre-adjustment ratio AR4F-Rear adjustment ratio AR4R| = | -3.0-7.1 | = 10.1 In step S113, step S1 is performed.
Select the maximum adjustment width from the total adjustment width calculated in step 12.
And the other area division paired with the area division candidate point
Set the position of the candidate point to the corresponding end-of-line position. This place
Conversely, the area division candidate point with the maximum adjustment width is
If set to the position, the character string before and after the end of the line
The difference in character spacing is the largest and the appearance is poor. This
Here, area division candidate point CP42Is the line end position lp2Set to
Adjustment width ALWFourIs "10.1" which is the maximum value
Therefore, the area division candidate point CP corresponding to this35At the end of the line
Placep2(See FIG. 10B). And the character string S
4 and S5 are the third row l of the placement area AThreePlaced in
Adjust the character spacing of the character string S5 whose character spacing is adjustable.
Adjust. The method of adjusting the character spacing is not particularly limited.
For example, uniform spacing between characters, preferably character type
Character spacing between adjacent characters, taking into account the
Adjust so that Subsequently, the case is stored in the character position storage unit 30.
After adjusting each character position of the stored character strings S4 and S5
Update to a new character position. In step S114, step S1 is performed.
A pair of area division candidate points CP whose positions are determined in 1335,
CP42Is deleted from the division candidate point position storage unit 34. In step S115, the division candidate point position
There is another area division candidate point stored in the storage unit 34
It is determined whether or not there is no data.
If so, the flow branches to step S117. Here, the area
Division candidate point CP16And CPtwenty twoIs the division candidate point position storage unit 34
, The process branches to step S116. In step S116, the remaining of the input character string
The initial character string (each S in FIG. 8B)1, STwo, SThree)of
The sum of the lengths is defined as the total length L, and the remaining line length (l
1+ LTwo) As the total line length AL and returns to step S103.
You. In the following processing, the remaining division candidate points CP16, CPtwenty two
Is determined in the same manner as described above. That is, in step S103, the total length L
Is "640" and the total line length AL of the placement area is "600"
Therefore, the correction amount C is “40”, and the correction amount C
The feed amount must be compressed by "40" for the entire character string
No (see FIG. 10 (c)). In step S105, as described above,
And the input character string S based on the correction amount C1, STwo,
SThreeAdjust the character spacing of. This allows character position storage
The content of the part 30 is the character position CP16Is "280", character position
Place CPtwenty twoUpdated the position of each character so that it became "360"
(See FIG. 11A). In the step S106, as shown in FIG.
Character position CP1(0), character position CP16(28
0), character position CPtwenty two(360) is the first character position storage unit
32. In step S107, each line end position l
p1(300), lp2(600) is stored in the line end position storage unit 33.
It is stored (see FIG. 10C). In step S108, the line end position lp1(3
00) for character position CP16(280) and CPtwenty two(3
60) is selected as a new area division candidate point,
The contents of the candidate point position storage unit 34 are updated to this (FIG. 1).
1 (a)). In step S109, the area division candidate points
CP16And line end position lp1Adjustment amount ALD1, Area division
Candidate point CPtwenty twoAnd line end position lp1Adjustment amount ALDTwoIs below
Is calculated by the following equations. ALD1= | Lp1-CP16| = | 300-280 | = 20 ALDTwo= | Lp1-CPtwenty two| = | 300-360 | = 60 In step S110, each area division candidate
Point CP16, CPtwenty two, A front / rear adjustment ratio is calculated.
Area division candidate point CP16At the end of the line lp1Place
The front / rear adjustment ratio in the case (in the case of FIG.
The adjustment allowable amount of the column S1 is “15”, and the adjustment allowable amount of the character string S3 is
Assuming that the quantity is “13”, it is calculated by the following equations. Pre-adjustment ratio AR1F= Adjustment amount ALD1/ Adjustment of character string S1
Capacity = 20/15 ≒ 1.3 Rear adjustment ratio AR1R= Adjustment amount ALD1/ Adjustment of character string S3
Capacity = -20 / 13 ≒ -1.5 Area division candidate point CPtwenty twoAt the end of the line lp1Place
The front / rear adjustment ratio in the case (in the case of FIG. 11A) is as follows:
Is calculated by the following equation. Pre-adjustment ratio AR2F= Adjustment amount ALDTwo/ Adjustment of character string S1
Capacity = −60 / 15 ≒ −4.0 Rear adjustment ratio AR2R= Adjustment amount ALDTwo/ Adjustment of character string S3
Capacity = 60/13 ≒ 4.6 In step S111, each adjustment amount is
It is determined whether or not the value is greater than the value k, and the process proceeds to step S112.
Alternatively, the flow branches to S120. In the example shown in FIG.
Since the adjustment is relatively large, the process branches to step S112. In step S112, each area division candidate
Point CP16, CPtwenty twoThe adjustment width is calculated for. Area
Candidate point CP16Adjustment range by ALW1, CPtwenty twoAdjustment in
ALW widthTwoThen, each adjustment range is calculated by the following formula.
Is done. Adjustment width ALW1= | Pre-adjustment ratio AR1F-Rear adjustment ratio AR1R| = | 1.3-(-1.5) | = 2.8 Adjustment width ALWTwo= | Pre-adjustment ratio AR2F-Rear adjustment ratio AR2R| = | -4.0- (4.6) | = 8.6 In step S113, the above-mentioned step S1
Select the maximum adjustment width from the adjustment widths calculated in step 12.
The other area division paired with this area division candidate point
The position of the candidate point is determined as the corresponding line end position. here
Then adjustment width ALWTwoIs "8.6", which is the maximum value.
Corresponding area division candidate point CPtwenty twoThe other paired with
Area division candidate point CP16At the end of the line lp1To be
(See FIG. 11B). Then, the character strings S2 and S3 are arranged.
Storage area A1The second row l ofTwoCharacter spacing to be placed on
The character spacing of the adjustable character string S3 is adjusted. continue,
Character strings S2 and S3 stored in the character position storage unit 30
Is updated to the new character position after the adjustment. In step S114, step S1
Area division candidate point CP whose position is determined in 1316, CPtwenty two
From the division candidate point position storage unit 34. In step S115, the position of the division candidate point is recorded.
Whether there is an area division candidate point stored in the storage unit 34
Is checked, and if there is, the process branches to step S116.
For example, the process branches to step S117. In this embodiment, this stage
Since all area division candidate points have been deleted on the floor,
The process branches to step S117. In step S117, the remaining character string (this
Here, the total length of the character string S1) is the remaining arrangement area ATwoof
Total line length l1Adjust the character spacing so that
The position of each character in the character string S1 in the storage unit 30 is updated (see FIG.
11 (c)), the process ends. Thereafter, the character typesetting editing apparatus sets the arithmetic unit 1 to
Character position storage unit 30 and character string information storage unit 3 via
Character spacing adjusted with reference to typesetting information storage unit 5
Capable of importing character string data optimally arranged in the area
it can. The character position has been adjusted through the above steps.
String I7And the arrangement area A and the initial input character string I
Is shown in FIG. In this embodiment, a rectangular area is used as the layout area.
Although the description has been given by taking the shape of the frame as an example, the present invention
It can be applied to various arrangement areas such as arbitrary shapes.
You. In this case, each row l of the present embodiment1, LTwo, LThreeEach
The line length may be set individually with each arrangement position. In the arrangement example taken in the embodiment, the arrangement
Last line l of storage area AThreeCharacter strings S4 and S5
Since it was determined first, the final row lThree
First row l before1And the second row lTwoA new one consisting of
Placement area A1And other character strings S1 to S3
Was. However, the character string is not necessarily from the last line of the layout area A.
The placement is not fixed, but rather in the middle of the placement area
The arrangement of character strings at the end of a line is often determined first.
No. In such a case, the first determined middle line end position
Placement area A in front of1And the end position of the line
Area A behindTwoAnd about
Character strings to be placed. This
In such a case, the processing of the above-described embodiment can be applied.
Wear. <Comparison with conventional method> Conventional method and the present invention
The comparison with the method will be described with reference to FIG. This figure is
The character string "This is an area just
SAMPLE showing an example. OPTIMUM by automatic adjustment
Justification can be realized. ] Is an example. FIG. 13A shows a character typesetting method according to the present invention.
13 (b) and 13 (c) show the conventional method.
The following shows an example. In the prior art 1 shown in FIG.
The character spacing of the eyes is felt wide, and the conventional 2 shown in FIG.
Then, the character spacing on the second line is felt wide. FIG. 13
In the method of the present invention (a), characters are almost evenly distributed in each line.
I can feel the interval. [0070] As is apparent from the above description, the present invention
According to the above, when arranging the input character string in the arrangement area,
When the division prohibited character string is located at the end of the line in the placement area
Enter the character positions that can be divided before and after the prohibited character string.
Select as a rear split candidate point, and select one of the points at the end of the line
Position, so in the middle of the division prohibited character string
Is not broken. Further, the position corresponding to the end of each line in the layout area is
Any one of the area division candidate points of each pair
A) When determining the division candidate point as the line end position,
Adjustment ratio of the character spacing of the character string before and after
Find the width (adjustment width) and find the largest of these adjustment widths.
For the other area paired with the area division candidate point with uniform width
The split candidate point is determined first as the end of the line.
The spacing between strings in the previous and next lines is significantly different
The undesired arrangement of character strings is avoided, and each character string is
It can be arranged in the arrangement area in a well-balanced manner.

【図面の簡単な説明】 【図1】本発明の文字組版方法を使用した文字組版編集
装置の一部を示すブロック図である。 【図2】文字構成要素と配置エリアの説明に供する図で
ある。 【図3】本発明の文字組版方法のメインフローを示すフ
ローチャートである。 【図4】本発明の文字組版方法のメインフローを示すフ
ローチャートである。 【図5】文字列情報記憶部の内容を示す模式図である。 【図6】文字パラメータ記憶部の内容を示す模式図であ
る。 【図7】分割可能情報記憶部の内容を示す模式図であ
る。 【図8】文字列と配置エリアの関係を示す模式図であ
る。 【図9】エリア分割候補点の説明に供する模式図であ
る。 【図10】文字列と配置エリアの関係を示す模式図であ
る。 【図11】文字列と配置エリアの関係を示す模式図であ
る。 【図12】文字列と配置エリアの関係を示す模式図であ
る。 【図13】本発明方法と従来方法との比較の説明に供す
る図である。 【符号の説明】 1 … 演算部 2 … 文字列入力部 3 … 文字列情報記憶部 4 … 組版情報入力部 5 … 組版情報記憶部 10 … 文字パラメータ記憶部 20 … 文字列長記憶部 21 … 配置エリア全行長記憶部 22 … 補正量記憶部 30 … 文字位置記憶部 31 … 分割可能情報記憶部 32 … 先頭文字位置記憶部 33 … 行末位置記憶部 34 … 分割候補点位置記憶部 IB … 仮想ボディ CH … 文字高さ CW … 文字幅 CP … 基準点 a,b,c,d … 間隔 W … 字面幅 H … 字面高さ CL … 配置行長 A … 配置エリア I … 入力文字列
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a part of a character typesetting editing apparatus using a character typesetting method of the present invention. FIG. 2 is a diagram provided for describing character components and arrangement areas. FIG. 3 is a flowchart showing a main flow of the character typesetting method of the present invention. FIG. 4 is a flowchart showing a main flow of the character typesetting method of the present invention. FIG. 5 is a schematic diagram showing the contents of a character string information storage unit. FIG. 6 is a schematic diagram showing the contents of a character parameter storage unit. FIG. 7 is a schematic diagram showing contents of a dividable information storage unit. FIG. 8 is a schematic diagram showing a relationship between a character string and an arrangement area. FIG. 9 is a schematic diagram for explaining an area division candidate point. FIG. 10 is a schematic diagram illustrating a relationship between a character string and an arrangement area. FIG. 11 is a schematic diagram showing a relationship between a character string and an arrangement area. FIG. 12 is a schematic diagram illustrating a relationship between a character string and an arrangement area. FIG. 13 is a diagram for explaining a comparison between the method of the present invention and a conventional method. [Description of Signs] 1... Arithmetic unit 2... Character string input unit 3... Character string information storage unit 4… typesetting information input unit 5… typesetting information storage unit 10… character parameter storage unit 20… character string length storage unit 21… Area total line length storage unit 22 Correction amount storage unit 30 Character position storage unit 31 Dividable information storage unit 32 First character position storage unit 33 End line position storage unit 34 Division candidate point position storage unit IB Virtual body C H … Character height C W … Character width CP… Reference points a, b, c, d… Interval W … Character width H … Character height CL… Arrangement line length A… Arrangement area I… Input character string

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) B41B 27/00 ──────────────────────────────────────────────────続 き Continued on front page (58) Field surveyed (Int. Cl. 7 , DB name) B41B 27/00

Claims (1)

(57)【特許請求の範囲】 【請求項1】 途中で改行されて分割配置されてもよい
分割可能文字列と途中で改行されて分割配置されない分
割禁止文字列を含む入力文字列を、指定された配置エリ
アに対して半端な残余が生じないように前記入力文字列
の配置位置を調整して配置する文字組版方法であって、 前記入力文字列の全長が配置エリアの各行の総全長に等
しくなるように、入力文字列の文字間隔を調整する過程
と、 前記文字間隔が調整された入力文字列の各文字位置と、
前記配置エリアの各行の行末位置とを比較し、行末位置
が入力文字列の分割可能文字列中に位置するときは、そ
の行末位置にあたる単位文字の位置と、当該行末位置を
挟み、これに最も近い単位文字の位置とを当該行末位置
に対応した一対のエリア分割候補点としてそれぞれ選択
し、行末位置が入力文字列中の分割禁止文字列中に位置
するときは、その分割禁止文字列の先頭文字の位置と
当該行末位置を挟み、これに最も近い次の分割可能文字
列の先頭文字の位置とを当該行末位置に対応した一対の
エリア分割候補点としてそれぞれ選択する過程と、 前記配置エリアの各行末位置と、各行末位置に対応した
一対のエリア分割候補点との差分をそれぞれ算出するこ
とにより、各エリア分割候補点についてそれぞれ調整量
を求める過程と、 前記各エリア分割候補点の調整量と、あるエリア分割候
補点を行末位置に設定した場合に、文字間隔が調整され
る当該エリア分割候補点前及び後の文字列部分につい
て、その部分中にある文字間隔調整が可能な各文字列の
持つ各調整許容量の総和との比を算出することにより、
各エリア分割候補点について前文字列の調整比(前調整
比)と後文字列の調整比(後調整比)とをそれぞれ求め
る過程と、 前記各エリア分割候補点に対応した前/後調整比に基づ
いて、各エリア分割候補点について調整比の幅(調整
幅)を算出する過程と、 前記各調整幅のうち、最大の調整幅をもつエリア分割候
補点と対をなす他方のエリア分割候補点の位置を、対応
する配置エリアの行末位置として確定する過程と、 前記確定した行末位置を境として配置エリアを区画する
とともに、前記確定したエリア分割候補点を境として前
記入力文字列を区画し、前記区画された各配置エリアと
それぞれに配置すべき区画された入力文字列について、
上記の一連の過程を繰り返し実行することにより、入力
文字列の配置位置を順に確定していく過程と、 を備えたことを特徴とする文字組版方法。
(57) [Claims] [Claim 1] Designating an input character string including a dividable character string that may be divided and arranged in a line on the way and a division prohibited character string that is broken and not divided and arranged in the middle A character arrangement method in which the arrangement position of the input character string is adjusted and arranged so that an odd residue does not occur with respect to the arranged arrangement area, wherein the total length of the input character string is equal to the total total length of each line of the arrangement area. Adjusting the character spacing of the input character string so that they are equal; and each character position of the input character string with the character spacing adjusted,
Comparing the line ending position of each line of the arrangement area, and when the line ending position is located in the divisible character string of the input character string, the position of the unit character corresponding to the line ending position and the line ending position
The position of the unit character closest to this is selected as a pair of area division candidate points corresponding to the end of the line, and when the end of the line is located in the division prohibited character string in the input character string, the division is performed. The position of the first character in the prohibited string ,
Sandwiching the line end position, selecting the position of the leading character of the next divisible character string closest to this as a pair of area division candidate points corresponding to the line end position, Calculating a difference between each pair of area division candidate points corresponding to each line end position, thereby obtaining an adjustment amount for each area division candidate point; and When the division candidate point is set at the end of the line, for each character string portion before and after the area division candidate point where the character spacing is adjusted, each adjustment of each character string in that portion that can be adjusted for character spacing By calculating the ratio to the total of the allowable amount,
A process of determining an adjustment ratio of the front character string (front adjustment ratio) and an adjustment ratio of the rear character string (post-adjustment ratio) for each area division candidate point; and a front / back adjustment ratio corresponding to each area division candidate point. Calculating an adjustment ratio width (adjustment width) for each area division candidate point based on the above, and the other area division candidate paired with the area division candidate point having the largest adjustment width among the adjustment widths Determining the position of a point as a line end position of the corresponding arrangement area; and dividing the arrangement area with the determined line end position as a boundary, and partitioning the input character string with the determined area division candidate point as a boundary. , For each of the partitioned placement areas and the partitioned input character strings to be placed in each,
A step of repeatedly determining the arrangement position of the input character string by repeatedly executing the above series of steps.
JP25946793A 1993-09-22 1993-09-22 Typesetting method Expired - Fee Related JP3503968B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25946793A JP3503968B2 (en) 1993-09-22 1993-09-22 Typesetting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25946793A JP3503968B2 (en) 1993-09-22 1993-09-22 Typesetting method

Publications (2)

Publication Number Publication Date
JPH0789034A JPH0789034A (en) 1995-04-04
JP3503968B2 true JP3503968B2 (en) 2004-03-08

Family

ID=17334485

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25946793A Expired - Fee Related JP3503968B2 (en) 1993-09-22 1993-09-22 Typesetting method

Country Status (1)

Country Link
JP (1) JP3503968B2 (en)

Also Published As

Publication number Publication date
JPH0789034A (en) 1995-04-04

Similar Documents

Publication Publication Date Title
US7137063B2 (en) Method for displaying editable characters in a divided table cell
US5588099A (en) Method and system for automatically resizing tables
US5208906A (en) Method and apparatus for representing bordered areas of a generic form with records
US5144693A (en) Method and apparatus for generic form generation
US6414698B1 (en) Method for enabling adaptive sizing of display elements
US4591999A (en) Method and apparatus for automatically spacing characters during composition
US5933833A (en) Data table structure and calculation method for mathematical calculations of irregular cells
EP0585332B1 (en) Method and apparatus for automated page layout of text and graphic elements
CA2154148A1 (en) Method of generating multiple-master typefaces
JP3503968B2 (en) Typesetting method
JP3795784B2 (en) Character set free space setting device with icon display, character set free space setting program, and recording medium recording the same
JP3408685B2 (en) Kerning treatment method
JP2888745B2 (en) Character spacing adjustment method
CA1339754C (en) Method and apparatus for determining the location of the contents of bordered areas of a generic form
JP3594336B2 (en) Character typesetting method and apparatus
JP3173188B2 (en) Character arrangement determining device and workstation
JPH0916589A (en) Character layout device
JPH0969098A (en) Document preparation device
JPH0310512B2 (en)
JPH08335069A (en) Character string output device
JPH0225534B2 (en)
JPH04149769A (en) Ruby editing processor
JP2677442B2 (en) Method of capturing illustrations in editing machine and editing machine
GB2229836A (en) Text processing
JPH06234201A (en) Letter composing device

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20031209

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20031209

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071219

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081219

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees