JP5739733B2 - Text display device, text display method, text display program, and computer-readable recording medium - Google Patents

Text display device, text display method, text display program, and computer-readable recording medium Download PDF

Info

Publication number
JP5739733B2
JP5739733B2 JP2011127448A JP2011127448A JP5739733B2 JP 5739733 B2 JP5739733 B2 JP 5739733B2 JP 2011127448 A JP2011127448 A JP 2011127448A JP 2011127448 A JP2011127448 A JP 2011127448A JP 5739733 B2 JP5739733 B2 JP 5739733B2
Authority
JP
Japan
Prior art keywords
reference position
character
character image
unit
font
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.)
Active
Application number
JP2011127448A
Other languages
Japanese (ja)
Other versions
JP2012256111A (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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP2011127448A priority Critical patent/JP5739733B2/en
Publication of JP2012256111A publication Critical patent/JP2012256111A/en
Application granted granted Critical
Publication of JP5739733B2 publication Critical patent/JP5739733B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • Controls And Circuits For Display Device (AREA)

Description

この発明は、文章表示装置、文章表示方法、文章表示プログラムおよびコンピュータ読み取り可能な記録媒体に関する。   The present invention relates to a sentence display device, a sentence display method, a sentence display program, and a computer-readable recording medium.

従来の第1の文章表示装置としては、2バイト文字(日本語)である横書き用文字を単純に90度回転させて印刷するものがある(例えば、特開2002−273943号公報(特許文献1)参照)。しかしながら、上記第1の文章表示装置では、全角文字を回転せずに縦方向に並べるだけでは、“「”や“」”、“、”等の位置が不自然になる。   As a conventional first sentence display device, there is a device that prints a horizontally written character that is a 2-byte character (Japanese) by simply rotating it 90 degrees (for example, Japanese Patent Application Laid-Open No. 2002-273934 (Patent Document 1). )reference). However, in the first sentence display device, the positions of ““ ”,“ ””, “,”, etc. become unnatural simply by arranging full-width characters in the vertical direction without rotating.

また、従来の第2の文章表示装置としては、文字コードに応じて縦書き時のシフト量等を記憶したテーブルを保持し、回転,移動をテーブルに記載された分だけ行うことによって、横書き用フォントを縦書きで利用するものがある(例えば、特開2001−134257号公報(特許文献2)参照)。   In addition, as a conventional second sentence display device, a table that stores a shift amount or the like at the time of vertical writing according to a character code is held, and by performing rotation and movement by the amount described in the table, it can be used for horizontal writing. Some fonts are used in vertical writing (see, for example, JP-A-2001-134257 (Patent Document 2)).

上記第2の文章表示装置では、シフト量を規定した場合には、フォントの種別ごとにテーブルを保持する必要があると共に、フォントサイズ毎のテーブルを予め保持する必要があり、多種類のデザイン、多段階のフォントサイズを持つフォントに適用するのは、現実的ではない。現在では、ダウンロードによるフォント追加等も多くなり、予め作成しておくテーブルでのシフト処理は初期フォントについては美しい表示が可能であるが、追加されたフォントに適用する場合には、追加フォントに対するテーブルが必要となり、そのテーブルを新たに追加する処理が必要となる。   In the second sentence display device, when the shift amount is defined, it is necessary to hold a table for each type of font, and it is necessary to hold a table for each font size in advance. It is not practical to apply to fonts with multi-level font sizes. Currently, more fonts are added by downloading, etc., and the shift process in the table created in advance allows beautiful display of the initial font, but when applied to the added font, the table for the added font Is required, and a process for newly adding the table is required.

また、従来の第3の文章表示装置としては、画像から認識した横書き(縦書き)画面から縦書き(横書き)のレイアウトの表示を生成するものがある(例えば、特開2010−129023号公報(特許文献3)参照)。上記第3の文章表示装置では、文字(フォント)の回転は、条件に応じて処理を変更し、文字認識結果、画像文字の領域認識(文字領域の位置や割合)等の条件に応じて文字画像の回転やシフトを行う。また、上記画像の配置位置等の情報から、ルールに基づいて文字画像のグループ分けを行う。   Further, as a conventional third sentence display device, there is one that generates a display of a vertical writing (horizontal writing) layout from a horizontal writing (vertical writing) screen recognized from an image (for example, Japanese Patent Application Laid-Open No. 2010-129023). See Patent Document 3)). In the third sentence display device, the rotation of the character (font) changes the process according to the condition, and the character according to the condition such as the character recognition result, the image character area recognition (position and ratio of the character area), etc. Rotate and shift the image. Further, the character images are grouped based on the rules based on the information such as the arrangement positions of the images.

しかしながら、上記第3の文章表示装置では、様々なデザインのフォントに対して、決められた分類ルールを適用することは難しく、フォント毎に詳細にルールを定める必要がある。上記第3の文章表示装置では、等幅フォントの扱いをしているが、現状では等幅フォントは少なく、文字幅が異なるプロポーショナルフォントの場合に意図した表示ができないと共に、半角全角入り混じったような文字について適切なレイアウトができないという問題がある。   However, in the third sentence display device, it is difficult to apply a predetermined classification rule to fonts of various designs, and it is necessary to define rules in detail for each font. In the third sentence display device, monospaced fonts are handled, but currently there are few monospaced fonts, and in the case of proportional fonts with different character widths, the intended display cannot be made and half-width full-width characters are mixed. There is a problem that proper layout cannot be made for simple characters.

特開2002−273943号公報JP 2002-273934 A 特開2001−134257号公報JP 2001-134257 A 特開2010−129023号公報JP 2010-129023 A

そこで、この発明の課題は、横書き用フォント(または縦書き用フォント)を用いて、全体としてのバランスのよいレイアウトの縦書き表示(または横書き表示)ができる文章表示装置、文章表示方法、文章表示プログラムおよびコンピュータ読み取り可能な記録媒体を提供することにある。   Accordingly, an object of the present invention is to provide a sentence display device, a sentence display method, and a sentence display capable of performing a vertical writing display (or horizontal writing display) with a well-balanced layout as a whole using a horizontal writing font (or vertical writing font). An object is to provide a program and a computer-readable recording medium.

上記課題を解決するため、この発明の文章表示装置は、
文章を縦書きまたは横書きで表示する表示部と、
上記表示部に表示される上記文章のうちの所定の文字のフォントとそのフォントのサイズに応じた1文字あたりの描画領域内において、上記所定の文字の文字画像に外接する矩形枠を上記描画領域の中心に中心が一致するように配置して基準位置とする基準位置決定部と、
記基準位置決定部により決定された上記基準位置に基づいて上記描画領域内で回転または移動の少なくとも一方を行うことにより、上記文字画像を変換する文字画像変換部と
上記表示部に表示される上記文章の全文字の上記文字画像であって、かつ、上記文字画像変換部により変換された上記文字画像を含むかまたは含んでいない上記全文字の上記文字画像を、上記基準位置決定部により決定された上記基準位置に基づいて、上記描画領域に配置する文字画像配置部と、
を備えて、
上記文章を横書き用フォントで縦書き表示するとき、または、上記文章を縦書き用フォントで横書き表示するとき、上記文字画像配置部により上記描画領域に配置された上記全文字の上記文字画像を上記表示部に表示するようにしたことを特徴とする。
In order to solve the above problems, the text display device of the present invention provides:
A display that displays the text vertically or horizontally;
A rectangular frame circumscribing the character image of the predetermined character in the drawing region per character corresponding to the font of the predetermined character of the sentence displayed on the display unit and the size of the font is displayed in the drawing region. A reference position determining unit that is arranged so that the center coincides with the center of
By performing at least one of the rotation or movement in the drawing area based on the reference position determined by the upper Symbol reference position determination unit, a character image converting unit for converting the character image,
The character image of all characters of the sentence displayed on the display unit, and the character image of all characters including or not including the character image converted by the character image conversion unit, Based on the reference position determined by the reference position determination unit, a character image arrangement unit arranged in the drawing area;
With
When the text is displayed vertically in a horizontal font or when the text is displayed horizontally in a vertical font, the character images of all the characters placed in the drawing area by the character image placement section are It is characterized by being displayed on the display unit.

上記構成によれば、基準位置決定部によって、表示部に表示される文章のうちの所定の文字のフォントとそのフォントのサイズに応じた1文字あたりの描画領域内において、上記所定の文字の文字画像に外接する矩形枠を上記描画領域の中心に中心が一致するように配置して基準位置とする。そして、上記文字画像変換部によって、基準位置決定部により決定された基準位置に基づいて描画領域内で回転または移動の少なくとも一方を行うことにより、上記文字画像を変換する。例えば、横書き用フォントを用いて横書き文章を縦書き表示するとき、“「”、“」”、“、”、“。”などの縦書き表示では全体としてのバランスが悪くなる文字について、その文字の文字画像を回転または移動の少なくとも一方により描画領域内で回転,移動させて、縦書き表示に適した文字画像に変換する。そして、表示部に表示される文章の全文字の文字画像であって、かつ、文字画像変換部により変換された文字画像を含むかまたは含んでいない上記全文字の文字画像を、基準位置決定部により決定された基準位置に基づいて、文字画像配置部により描画領域に配置する。そうして、表示部により文章を縦書き(または横書き)で表示するとき、文字画像配置部により上記描画領域に配置された上記全文字の文字画像を用いることによって、横書き用フォント(または縦書き用フォント)を用いて、全体としてのバランスのよいレイアウトの縦書き表示(または横書き表示)ができる。 According to the above construction, the reference position determination unit, a predetermined character font of the text displayed on the display unit and in 1 per character drawing areas in accordance with the font size, the predetermined characters A rectangular frame circumscribing the image is arranged so that the center coincides with the center of the drawing area and is set as a reference position . Then, the upper Kibun shaped image converting unit by performing at least one of the rotation or movement in the drawing area based on the determined reference position by the reference position determination unit, converts the character image. For example, when displaying horizontal writing vertically using a horizontal font , “ “ ”,“ ””, “,”, “. "About vertical character of balance of the entire composition is degraded in view of such, the rotation of the character image a character rotation or by at least one of moving the drawing area, by moving the character image suitable for vertical display converted to. Then, a total character image of a sentence displayed on the display unit, and the total character image not containing or containing the converted character image by the character image transform unit, Based on the reference position determined by the reference position determination unit, the character image placement unit places it in the drawing area, so that when the text is displayed vertically (or horizontally) by the display unit, the character image placement unit by using the character image of the arranged in the drawing area the above all the characters, using the font horizontal (or vertical font), good layout balanced as a whole It is vertical writing display (or horizontal display).

なお、上記基準位置決定部において基準位置を決定するための上記基準となる文字は、フォントに属する全文字のうちの代表的な1文字であってもよいし、複数の文字であってもよい。また、文章は、複数種類のフォントの文字が用いられた文章が混在していてもよく、その場合は、例えば文字数の多い方のフォントを上記基準となる文字に用いる。   The reference character for determining the reference position in the reference position determination unit may be a representative character among all the characters belonging to the font, or may be a plurality of characters. . The sentence may be a mixture of sentences using characters of a plurality of types of fonts. In this case, for example, a font having a larger number of characters is used as the reference character.

また、一実施形態の文章表示装置では、
上記基準位置決定部は、上記フォントに属する全文字の文字画像に対して上記基準位置を決定する
In the sentence display device according to the embodiment,
The reference position determination unit determines the reference position for character images of all characters belonging to the font.

上記実施形態によれば、上記文章のフォントに属する全文字の文字画像に対して基準位置決定部によって基準位置を決定することにより、フォント全体のデザインに対応した適切な基準位置が得られるので、文字画像変換部により文字画像を最適な位置に配置できる。 According to the embodiment, by determining the reference position by the reference position determination unit for the character images of all characters belonging to the font of the sentence, an appropriate reference position corresponding to the design of the entire font can be obtained. the Driven character image by the character image transform unit can be placed in an optimum position.

また、一実施形態の文章表示装置では、
上記基準位置決定部は、上記文章のうちの上記表示部に表示される行毎に、その行に含まれる全文字の文字画像に対して上記基準位置を決定する
In the sentence display device according to the embodiment,
The reference position determination unit determines the reference position for character images of all characters included in the line for each line displayed on the display unit of the sentence.

上記実施形態によれば、上記文章のうちの表示部に表示される行毎に、その行に含まれる全文字の文字画像に対して基準位置決定部によって基準位置を決定することにより、行毎に適切な基準位置が得られるので、文字画像変換部により文字画像を変換するとき、表示部に表示される行毎に最適な位置に配置できる。 According to the embodiment, for each line displayed on the display part of the sentence, the reference position is determined by the reference position determination unit for the character images of all the characters included in the line. Therefore, when a character image is converted by the character image conversion unit, it can be arranged at an optimum position for each line displayed on the display unit.

また、一実施形態の文章表示装置では、
上記基準位置決定部は、上記フォントに属する全文字のうちの複数の文字に対応する各文字画像に対して夫々外接する複数の矩形枠の高さの平均および上記複数の矩形枠の幅の平均で表された矩形枠を、上記描画領域の中心に中心が一致するように配置して上記基準位置とする。
In the sentence display device according to the embodiment,
The reference position determination unit includes an average height of a plurality of rectangular frames circumscribing each character image corresponding to a plurality of characters among all characters belonging to the font and an average of the widths of the plurality of rectangular frames. Is arranged so that the center coincides with the center of the drawing area and is set as the reference position.

上記実施形態によれば、フォントに属する全文字のうちの複数の文字に対応する各文字画像に対して夫々外接する複数の矩形枠の高さの平均および上記複数の矩形枠の幅の平均を求めて、求めた平均高さと平均幅で定義される矩形枠を、描画領域の中心に中心が一致するように配置して基準位置とすることによって、文字画像変換部によりフォント全体のデザインに対してバランスのよい最適な位置に文字画像を配置できる。 According to the above embodiment, the average of the heights of the plurality of rectangular frames circumscribing each character image corresponding to the plurality of characters among all the characters belonging to the font and the average of the widths of the plurality of rectangular frames are calculated. The rectangular image defined by the calculated average height and average width is placed so that the center coincides with the center of the drawing area and is used as the reference position. Character images can be placed at optimal positions with good balance.

また、一実施形態の文章表示装置では、
上記基準位置決定部は、上記文章のうちの上記表示部に表示される行毎に、その行に含まれる全ての文字に対応する各文字画像に対して夫々外接する複数の矩形枠のうちの最も大きい矩形枠を、上記描画領域の中心に中心が一致するように配置して上記基準位置とする。
In the sentence display device according to the embodiment,
For each line displayed on the display part of the sentence, the reference position determination unit is a plurality of rectangular frames that circumscribe each character image corresponding to all the characters included in the line. The largest rectangular frame is arranged so that the center coincides with the center of the drawing area and is set as the reference position.

上記実施形態によれば、基準位置決定部により、上記文章のうちの表示部に表示される行毎に、その行に含まれる全ての文字に対応する各文字画像に対して夫々外接する複数の矩形枠のうちの最も大きい矩形枠を、描画領域の中心に中心が一致するように配置して基準位置とすることによって、その行において、文字画像変換部により変換された文字画像が必ず上記基準位置内に含まれるようにできる。   According to the embodiment, for each line displayed on the display part of the sentence by the reference position determination unit, a plurality of characters circumscribing each character image corresponding to all the characters included in the line. By placing the largest rectangular frame of the rectangular frames so that the center coincides with the center of the drawing area and setting it as the reference position, the character image converted by the character image conversion unit in that line is always the above reference. It can be included in the location.

また、一実施形態の文章表示装置では、
上記基準位置決定部は、上記文章のうちの上記表示部に表示される文字毎に、その文字を挟む前後の文字の一方の文字画像に対して上記基準位置を決定する。
In the sentence display device according to the embodiment,
The reference position determination unit determines the reference position for one character image of characters before and after the character for each character displayed on the display unit in the sentence.

上記実施形態によれば、上記文章のうちの表示部に表示される文字毎に、その文字を挟む前後の文字の一方の文字画像に対して基準位置決定部により基準位置を決定することによって、文字画像変換部により少なくとも前または後の文字と局所的にバランスのとれた位置に文字画像を配置できる。 According to the embodiment, for each character displayed on the display unit of the sentence, by determining the reference position by the reference position determination unit for one character image of the character before and after the character, The character image can be arranged at a position that is locally balanced with at least the preceding or following character by the character image conversion unit.

また、一実施形態の文章表示装置では、
上記基準位置決定部により決定された上記基準位置を上記フォントとそのフォントのサイズに対応させて記憶する基準位置記憶部を備えた。
In the sentence display device according to the embodiment,
A reference position storage unit is provided for storing the reference position determined by the reference position determination unit in association with the font and the size of the font.

上記実施形態によれば、基準位置決定部により決定された基準位置をフォントとそのフォントのサイズに対応させて基準位置記憶部に記憶して、次に同一のフォントでかつ同一のサイズについては、基準位置記憶部に記憶された基準位置を用いることによって、基準位置決定部により基準位置を決定する必要がなくなり、基準位置を決定する処理を簡略化できる。   According to the above embodiment, the reference position determined by the reference position determination unit is stored in the reference position storage unit in correspondence with the font and the size of the font, and then for the same font and the same size, By using the reference position stored in the reference position storage unit, it is not necessary to determine the reference position by the reference position determination unit, and the process for determining the reference position can be simplified.

また、一実施形態の文章表示装置では、
上記基準位置決定部は、上記基準位置記憶部に上記基準位置が記憶された上記フォントと同一のフォントでかつ上記基準位置記憶部に上記基準位置が記憶されていない上記フォントの他のサイズについて、上記基準位置記憶部に上記基準位置が記憶された上記フォントのサイズにおける上記1文字あたりの描画領域と上記他のサイズにおける上記1文字あたりの描画領域との大きさの割合に基づいて、上記基準位置記憶部に記憶された上記基準位置を拡大または縮小して用いる。
In the sentence display device according to the embodiment,
The reference position determination unit is the same font as the font in which the reference position is stored in the reference position storage unit, and other sizes of the font in which the reference position is not stored in the reference position storage unit. Based on the ratio of the size of the drawing area per character in the font size in which the reference position is stored in the reference position storage unit to the drawing area per character in the other size, the reference The reference position stored in the position storage unit is used after being enlarged or reduced.

上記実施形態によれば、基準位置記憶部に基準位置が記憶されたフォントと同一のフォントでかつ基準位置記憶部に基準位置が記憶されていない上記フォントの他のサイズについては、基準位置記憶部に基準位置が記憶されたフォントのサイズにおける1文字あたりの描画領域と上記フォントの他のサイズにおける1文字あたりの描画領域との大きさの割合に基づいて、基準位置決定部によって、基準位置記憶部に記憶された基準位置を拡大または縮小して用いることによって、基準位置決定部により上記基準となる文字の文字画像に対して外接する矩形枠を求める必要がなくなり、基準位置を決定する処理を簡略化できる。   According to the above-described embodiment, the reference position storage unit is configured to use the same font as the font whose reference position is stored in the reference position storage unit and other sizes of the fonts in which the reference position is not stored in the reference position storage unit. The reference position determining unit stores the reference position based on the ratio of the size of the drawing area per character in the font size in which the reference position is stored to the drawing area per character in the other size of the font. By enlarging or reducing the reference position stored in the part, it is not necessary to obtain a rectangular frame circumscribing the character image of the reference character by the reference position determining part, and processing for determining the reference position is performed. It can be simplified.

また、この発明の文章表示方法では、
プログラムされたコンピュータが基準位置決定部と文字画像変換部と基準位置記憶部として機能する文章表示方法であって、
表示部に表示される文章のうちの所定の文字のフォントとそのフォントのサイズに応じた1文字あたりの描画領域内において、基準位置決定部により、上記所定の文字の文字画像に外接する矩形枠を上記描画領域の中心に中心が一致するように配置して基準位置とする基準位置決定ステップと、
上記基準位置決定部により決定された上記基準位置に基づいて文字画像変換部により上記描画領域内で回転または移動の少なくとも一方を行うことにより、上記文字画像を変換する文字画像変換ステップと、
上記表示部に表示される上記文章の全文字の上記文字画像であって、かつ、上記文字画像変換部により変換された上記文字画像を含むかまたは含んでいない上記全文字の上記文字画像を、上記基準位置決定部により決定された上記基準位置に基づいて、文字画像配置部により上記描画領域に配置する文字画像配置ステップと、
上記文章を横書き用フォントで縦書き表示するとき、または、上記文章を縦書き用フォントで横書き表示するとき、上記文字画像配置部により上記描画領域に配置された上記全文字の上記文字画像を用いて、上記文章を縦書きまたは横書きで上記表示部に表示する表示ステップと
を含むことを特徴とする。
In the text display method of the present invention,
A sentence display method in which a programmed computer functions as a reference position determination unit, a character image conversion unit, and a reference position storage unit,
A rectangular frame circumscribing the character image of the predetermined character by the reference position determination unit in a drawing area per character corresponding to the font of the predetermined character of the text displayed on the display unit and the size of the font A reference position determining step in which the center is aligned with the center of the drawing area and used as a reference position;
A character image conversion step of converting the character image by performing at least one of rotation or movement in the drawing area by the character image conversion unit based on the reference position determined by the reference position determination unit;
The character image of all characters of the sentence displayed on the display unit, and the character image of all characters including or not including the character image converted by the character image conversion unit, Based on the reference position determined by the reference position determination unit, a character image placement step for placing the character image placement unit in the drawing area;
When the text is displayed vertically in a horizontal font or when the text is displayed horizontally in a vertical font, the character images of all the characters placed in the drawing area by the character image placement unit are used. And a display step of displaying the sentence on the display unit in vertical writing or horizontal writing.

上記構成によれば、基準位置決定ステップにおいて、表示部に表示される文章のうちの所定の文字のフォントとそのフォントのサイズに応じた1文字あたりの描画領域内において、基準位置決定部によって、上記所定の文字の文字画像に外接する矩形枠を上記描画領域の中心に中心が一致するように配置して基準位置とする。そして、文字画像変換ステップにおいて、文字画像変換部によって、基準位置決定部により決定された基準位置に基づいて描画領域内で回転または移動の少なくとも一方を行うことにより、上記文字画像を変換する。例えば、横書き用フォントを用いて横書き文章を縦書き表示するとき、「”、“」”、“、”、“。”などの縦書き表示では全体としてのバランスが悪くなる文字について、その文字の文字画像を回転または移動の少なくとも一方により描画領域内で回転,移動させて、縦書き表示に適した文字画像に変換する。そして、表示部に表示される文章の全文字の文字画像であって、かつ、文字画像変換部により変換された文字画像を含むかまたは含んでいない上記全文字の文字画像を、基準位置決定部により決定された基準位置に基づいて、文字画像配置部により描画領域に配置する。そうして、表示ステップにおいて、文字画像配置部により上記描画領域に配置された上記全文字の文字画像を用いて、表示部により文章を縦書き(または横書き)で表示する。これによって、横書き用フォント(または縦書き用フォント)を用いて、全体としてのバランスのよいレイアウトの縦書き表示(または横書き表示)ができる。 According to the above configuration, in the reference position determination step, in the drawing area per character corresponding to the font of the predetermined character of the text displayed on the display unit and the size of the font, the reference position determination unit A rectangular frame circumscribing the character image of the predetermined character is arranged so that the center coincides with the center of the drawing area and is set as a reference position . Then, the character image conversion step, the character image transform unit by performing at least one of the rotation or movement in the drawing area based on the determined reference position by the reference position determination unit, it converts the character image. For example, when horizontal writing is displayed vertically using a horizontal writing font , “ ”, “” ”,“, ”,“. "About vertical character of balance of the entire composition is degraded in view of such, the rotation of the character image a character rotation or by at least one of moving the drawing area, by moving the character image suitable for vertical display converted to. Then, a total character image of a sentence displayed on the display unit, and the total character image not containing or containing the converted character image by the character image transform unit, Based on the reference position determined by the reference position determining unit, the character image arranging unit arranges the character image arranging unit in the drawing area, and in the display step, the characters of all the characters arranged in the drawing area by the character image arranging unit. Using the image, the text is displayed vertically (or horizontally) on the display unit, which makes it possible to use the horizontal font (or vertical font) as a whole. Scan of the vertical writing display of good layout (or horizontal display) can be.

また、この発明の文章表示プログラムでは、
上記文章表示方法の上記各ステップをコンピュータに実行させることを特徴とする。
In the text display program of the present invention,
A computer is caused to execute each of the steps of the sentence display method.

上記構成によれば、上記文章表示方法の上記各ステップをコンピュータに実行させることによって、横書き用フォント(または縦書き用フォント)を用いて、全体としてのバランスのよいレイアウトの縦書き表示(または横書き表示)ができる。   According to the above configuration, by causing the computer to execute the above steps of the sentence display method, the horizontal writing font (or vertical writing font) is used, and the vertical layout display (or horizontal writing) having a well-balanced layout as a whole. Display).

また、この発明のコンピュータ読み取り可能な記録媒体では、
上記文章表示プログラムを記録したことを特徴とする。
In the computer-readable recording medium of the present invention,
The sentence display program is recorded.

上記構成によれば、上記コンピュータ読み取り可能な記録媒体に記録された上記文章表示プログラムをコンピュータに読み込んで上記文章表示方法を実行することによって、横書き用フォント(または縦書き用フォント)を用いて、全体としてのバランスのよいレイアウトの縦書き表示(または横書き表示)ができる。   According to the above configuration, by using the horizontal writing font (or vertical writing font) by reading the sentence display program recorded on the computer-readable recording medium into the computer and executing the sentence display method, Vertical writing (or horizontal writing) with a well-balanced layout as a whole is possible.

以上より明らかなように、この発明の文章表示装置、文章表示方法、文章表示プログラムおよびコンピュータ読み取り可能な記録媒体によれば、横書き用フォント(または縦書き用フォント)を用いて、全体としてのバランスのよいレイアウトの縦書き表示(または横書き表示)を実現することができる。   As is clear from the above, according to the sentence display device, the sentence display method, the sentence display program, and the computer-readable recording medium of the present invention, the horizontal balance font (or vertical writing font) is used as a whole. It is possible to realize vertical display (or horizontal display) with a good layout.

図1はこの発明の第1実施形態の文章表示装置のブロック図である。FIG. 1 is a block diagram of a text display apparatus according to a first embodiment of the present invention. 図2は上記文章表示装置の動作を説明するためのフローチャートである。FIG. 2 is a flowchart for explaining the operation of the sentence display device. 図3は図2に続く文章表示装置の動作を説明するためのフローチャートである。FIG. 3 is a flowchart for explaining the operation of the text display device following FIG. 図4は文字コードに対応する処理IDを示す図である。FIG. 4 is a diagram showing a process ID corresponding to a character code. 図5は処理ID毎の処理内容を示す図である。FIG. 5 is a diagram showing the processing contents for each processing ID. 図6は指定された文字の基準位置を説明するための図である。FIG. 6 is a diagram for explaining a reference position of a designated character. 図7は横書き用フォントの半角“A”の文字画像を90度回転(時計回り)させることにより縦書き用に変換した図である。FIG. 7 is a diagram in which a half-width “A” character image of a horizontal writing font is converted to vertical writing by rotating it 90 degrees (clockwise). 図8は横書き用フォントの長音記号“ー”の文字画像を90度回転(時計回り),左右反転およびセンタリングすることにより縦書き用に変換した図である。FIG. 8 is a diagram in which the character image of the long sound symbol “-” in the horizontal writing font is converted to vertical writing by rotating it 90 degrees (clockwise), flipping left and right, and centering. 図9は横書き用フォントの“ぁ”の文字画像を右上シフト(移動量小)することにより縦書き用に変換した図である。FIG. 9 is a diagram in which the character image “a” of the horizontal writing font is converted to vertical writing by shifting it to the upper right (small movement amount). 図10は横書き用フォントの読点“、”の文字画像を右上シフト(移動量大)することにより縦書き用に変換した図である。FIG. 10 is a diagram in which the character image of the punctuation mark “,” of the horizontal writing font is converted to vertical writing by shifting it to the upper right (large movement amount). 図11は横書き用フォントのダブルクォーテーションの開き““”の文字画像を右下シフト,右下位置調整をすることにより縦書き用に変換した図である。FIG. 11 is a diagram in which the character image of ““ ”in the double quotation mark of the horizontal writing font is converted to vertical writing by shifting the lower right position and adjusting the lower right position. 図12は横書き用フォントのダブルクォーテーションの閉じ“””の文字画像を180度回転,左上位置調整をすることにより縦書き用に変換した図である。FIG. 12 is a diagram in which a character image of “” ”closing double quotation of a horizontal writing font is converted to vertical writing by rotating 180 degrees and adjusting the upper left position. 図13は横書き用フォントの鍵括弧閉じ“」”の文字画像を90度回転(時計回り),左位置調整をすることにより縦書き用に変換した図である。FIG. 13 is a diagram obtained by converting the character image of the bracket ““ ”of the horizontal writing font into vertical writing by rotating it 90 degrees (clockwise) and adjusting the left position. 図14は横書き用フォントの鍵括弧開き“「”の文字画像を90度回転(時計回り),右位置調整をすることにより縦書き用に変換した図である。FIG. 14 is a diagram obtained by converting the character image of the square bracket opening ““ ”of the horizontal writing font by 90 degrees (clockwise) and adjusting the right position for vertical writing. 図15は上記文章表示装置に用いられるシフト位置ルールを示す図である。FIG. 15 is a diagram showing a shift position rule used in the sentence display device. 図16は変更したシフト位置ルールの一例を示す図である。FIG. 16 is a diagram showing an example of the changed shift position rule. 図17は変更したシフト位置ルールに基づいて横書き用フォントの鍵括弧閉じ“」”の文字画像を90度回転(時計回り),左位置調整をすることにより縦書き用に変換した図である。FIG. 17 is a diagram in which the character image of the bracket ““ ”in the horizontal writing font is converted to vertical writing by rotating 90 degrees (clockwise) and adjusting the left position based on the changed shift position rule. 図18は変更したシフト位置ルールに基づいて横書き用フォントの鍵括弧開き“「”の文字画像を90度回転(時計回り),右位置調整をすることにより縦書き用に変換した図である。FIG. 18 is a diagram obtained by converting the character image of the open bracket ““ ”of the horizontal writing font by 90 degrees (clockwise) and adjusting the right position by adjusting the right position based on the changed shift position rule. 図19はこの発明の第2実施形態の文章表示装置のブロック図である。FIG. 19 is a block diagram of a text display apparatus according to the second embodiment of the present invention. 図20は指定された複数の文字から基準位置を求める方法を説明するための図である。FIG. 20 is a diagram for explaining a method for obtaining a reference position from a plurality of designated characters. 図21はこの発明の第3実施形態の文章表示装置のブロック図である。FIG. 21 is a block diagram of a text display apparatus according to the third embodiment of the present invention. 図22は電子書籍の文章のフォントに属する全文字から基準位置を求める方法を説明するための図である。FIG. 22 is a diagram for explaining a method of obtaining the reference position from all characters belonging to the font of the text of the electronic book. 図23はこの発明の第4実施形態の文章表示装置のブロック図である。FIG. 23 is a block diagram of a text display apparatus according to the fourth embodiment of the present invention. 図24は上記文章表示装置の動作を説明するためのフローチャートである。FIG. 24 is a flowchart for explaining the operation of the sentence display device. 図25は図24に続く文章表示装置の動作を説明するためのフローチャートである。FIG. 25 is a flowchart for explaining the operation of the text display device following FIG. 図26はこの発明の第5実施形態の文章表示装置のブロック図である。FIG. 26 is a block diagram of a text display apparatus according to the fifth embodiment of the present invention. 図27はこの発明の第6実施形態の文章表示装置のブロック図である。FIG. 27 is a block diagram of a text display apparatus according to the sixth embodiment of the present invention. 図28は基準位置の拡大について説明するための図である。FIG. 28 is a diagram for explaining enlargement of the reference position. 図29はフォント自体が左側に偏っている場合の縦書き表示の例を示す図である。FIG. 29 is a diagram showing an example of vertical writing display when the font itself is biased to the left side. 図30はフォント自体が左側に偏っている場合の縦書き表示のバランスを改善した例を示す図である。FIG. 30 is a diagram showing an example of improving the balance of vertical writing display when the font itself is biased to the left side. 図31は横書き文字のコード(16進)に対応する縦書き動作を示す図である。FIG. 31 is a diagram showing a vertical writing operation corresponding to a horizontal writing character code (hexadecimal). 図32は図31に続く横書き文字のコード(16進)に対応する縦書き動作を示す図である。FIG. 32 is a diagram showing a vertical writing operation corresponding to the horizontal writing character code (hexadecimal) following FIG. 図33は図32に続く横書き文字のコード(16進)に対応する縦書き動作を示す図である。FIG. 33 is a diagram showing the vertical writing operation corresponding to the horizontal writing character code (hexadecimal) following FIG.

以下、この発明の文章表示装置、文章表示方法、文章表示プログラムおよびコンピュータ読み取り可能な記録媒体を図示の実施の形態により詳細に説明する。   Hereinafter, a sentence display device, a sentence display method, a sentence display program, and a computer-readable recording medium according to the present invention will be described in detail with reference to embodiments shown in the drawings.

〔第1実施形態〕
図1はこの発明の第1実施形態の電子書籍の文章を表示する文章表示装置のブロック図を示している。なお、この文章表示装置は、文字コードに対応する文字画像を備えた横書き用フォントのデータをフォントデータ記憶部(図示せず)に備えている。
[First Embodiment]
FIG. 1 shows a block diagram of a text display device for displaying text of an electronic book according to the first embodiment of the present invention. Note that this text display device includes a font data storage unit (not shown) having horizontal writing font data including a character image corresponding to a character code.

この第1実施形態の文章表示装置は、図1に示すように、電子書籍のデータを取得する書籍データ取得部1と、書籍データ取得部1により取得された電子書籍のデータを解析してレイアウトを決定するレイアウト生成部2と、レイアウト生成部2により決定されたレイアウトを表すレイアウト情報および配置条件テーブル記憶部11に記憶された配置条件テーブルに基づいて、文字画像の回転・シフトが必要か否かを判断する文字回転・シフト判断部3と、配置条件テーブル記憶部11に記憶された配置条件テーブルに基づいて、文字画像の処理内容を確定する処理内容決定部4と、基準となる文字を取得する基準文字取得部5と、基準文字取得部5により取得された基準となる文字の文字画像に対して外接する矩形枠に基づいて基準位置を決定する基準位置決定部6と、基準位置決定部6により決定された基準位置およびシフト位置ルール記憶部12に記憶されたシフト位置ルールに基づいて、文字画像の移動位置を確定する文字画像変換部の一例としての移動位置確定部7と、移動位置確定部7により移動位置が確定した文字画像および文字回転・シフト判断部3により回転・シフトが必要ないと判断された文字の文字画像を、上記レイアウト情報に基づいて1ページ分の画像メモリ(図示せず)に配置する文字画像配置部8と、文字画像配置部8により文字画像が配置された画像データを出力する画像出力部9と、画像出力部9から出力された画像データを表示する表示部10とを備えている。この表示部10は、電子書籍の文章を縦書きまたは横書きで表示する。   As shown in FIG. 1, the text display device according to the first embodiment lays out a book data acquisition unit 1 that acquires data of an electronic book, and analyzes the data of the electronic book acquired by the book data acquisition unit 1. Whether or not the character image needs to be rotated / shifted based on the layout generation unit 2 that determines the layout, layout information representing the layout determined by the layout generation unit 2, and the arrangement condition table stored in the arrangement condition table storage unit 11. A character rotation / shift determination unit 3 for determining whether or not, a processing content determination unit 4 for determining the processing content of the character image based on the arrangement condition table stored in the arrangement condition table storage unit 11, and a reference character. The reference position is determined based on the reference character acquisition unit 5 to be acquired and a rectangular frame circumscribing the character image of the reference character acquired by the reference character acquisition unit 5. A reference position determination unit 6 to be determined, and a character image conversion unit for determining a moving position of the character image based on the reference position determined by the reference position determination unit 6 and the shift position rule stored in the shift position rule storage unit 12 As an example, the moving position determining unit 7, the character image whose moving position is determined by the moving position determining unit 7, and the character image of the character that is determined not to be rotated / shifted by the character rotation / shift determining unit 3, A character image arrangement unit 8 arranged in an image memory (not shown) for one page based on layout information, an image output unit 9 for outputting image data in which a character image is arranged by the character image arrangement unit 8, and an image And a display unit 10 for displaying the image data output from the output unit 9. The display unit 10 displays the text of the electronic book in vertical writing or horizontal writing.

図2,図3は上記文章表示装置の動作を説明するためのフローチャートを示している。なお、このフローチャートは、表示部10に電子書籍の1ページ分を表示する処理であり、ページ送り(または戻り)があるとこの表示処理が繰り返される。   2 and 3 are flowcharts for explaining the operation of the sentence display device. Note that this flowchart is a process of displaying one page of the electronic book on the display unit 10, and this display process is repeated when there is a page feed (or return).

まず、この処理がスタートすると、図2に示すステップS1で書籍データ取得部1により電子書籍のデータを取得する。   First, when this process starts, the book data acquisition unit 1 acquires electronic book data in step S1 shown in FIG.

次に、ステップS2に進み、レイアウト生成部2により電子書籍のデータを解析してレイアウトに必要な表示ページの書籍データ情報を保持する。   In step S2, the electronic book data is analyzed by the layout generation unit 2 and the book data information of the display page necessary for the layout is held.

次に、ステップS3に進み、書籍データ情報と表示部10の表示設定に基づいて、レイアウト生成部2により画像やテキストのレイアウトを決定する。ここで、レイアウト生成部2は、レイアウトに必要なレイアウト情報を生成する。ここで、レイアウト情報とは、文字、画像、マルチメディアデータなどからなる要素の配置に関わる情報である。   In step S3, the layout generation unit 2 determines the layout of the image and text based on the book data information and the display setting of the display unit 10. Here, the layout generation unit 2 generates layout information necessary for the layout. Here, the layout information is information related to the arrangement of elements composed of characters, images, multimedia data, and the like.

次に、ステップS4に進み、レイアウト情報から電子書籍の文章が縦書きかまたは横書きかを判定する。   Next, it progresses to step S4 and it is determined whether the text of an electronic book is vertical writing or horizontal writing from layout information.

そして、ステップS4で電子書籍の文章が縦書きでないと判定すると、ステップS5に進み、文字回転・シフト判断部3は、レイアウト生成部2から1行のレイアウト情報を取得する。   If it is determined in step S4 that the text of the electronic book is not vertically written, the process proceeds to step S5, where the character rotation / shift determination unit 3 obtains one line of layout information from the layout generation unit 2.

次に、ステップS6に進み、文字回転・シフト判断部3は、レイアウト生成部2から文字コードを取得する。   In step S6, the character rotation / shift determination unit 3 acquires a character code from the layout generation unit 2.

次に、ステップS7に進み、文字画像配置部8は、文字コードに対応する文字画像を画像メモリ(図示せず)に配置する。   In step S7, the character image placement unit 8 places a character image corresponding to the character code in an image memory (not shown).

次に、ステップS8に進み、1行の配置が完了していないと判定すると、ステップS6に戻る一方、1行の配置が完了したと判定すると、ステップS9に進む。   Next, the process proceeds to step S8, and if it is determined that the arrangement of one line is not completed, the process returns to step S6, whereas if it is determined that the arrangement of one line is completed, the process proceeds to step S9.

次に、ステップS9で全行の配置が完了していないと判定すると、ステップS11に進み、行を進めて、ステップS5に戻る。   Next, when it is determined in step S9 that the arrangement of all the rows has not been completed, the process proceeds to step S11, the line is advanced, and the process returns to step S5.

一方、ステップS9で全行の配置が完了していると判定すると、ステップS10に進み、画像出力部9により文字画像配置部8により文字画像が配置された画像データを表示部10に出力して、この表示処理を終了する。   On the other hand, if it is determined in step S9 that the arrangement of all lines has been completed, the process proceeds to step S10, where the image output unit 9 outputs the image data in which the character image is arranged by the character image arrangement unit 8 to the display unit 10. This display process is terminated.

また、ステップS4で縦書きであると判定すると、図3に示すステップS21に進む。   If it is determined in step S4 that the writing is vertical, the process proceeds to step S21 shown in FIG.

そして、ステップS21に進み、基準文字取得部5により基準となる文字を取得する。この第1実施形態では、基準となる文字として“国”(Unicode 0x56fd)を取得する。   In step S21, the reference character acquisition unit 5 acquires a reference character. In the first embodiment, “country” (Unicode 0x56fd) is acquired as a reference character.

次に、ステップS22に進み、基準位置決定部6により基準となる文字の文字画像に外接する矩形枠に基づいて基準位置を決定する。この第1実施形態では、“国”の文字画像に外接する矩形枠を仮想ボディの中心に中心が一致するように配置して基準位置とする。ここで、仮想ボディは、レイアウトから指定される「文字を描画するための枠」であり、実際には、文字の高さと、その文字の高さを指定してフォント情報から取得される文字幅からなる矩形の描画領域のことである。また、レイアウトは、上記矩形の描画領域の中心を揃えて文字を並べることにより、行を生成したりする配置のことである。   In step S22, the reference position determination unit 6 determines a reference position based on a rectangular frame circumscribing the character image of the reference character. In the first embodiment, a rectangular frame circumscribing the character image of “country” is arranged so that the center coincides with the center of the virtual body and is set as a reference position. Here, the virtual body is a “frame for drawing characters” specified from the layout. Actually, the character width obtained from the font information by specifying the height of the character and the height of the character This is a rectangular drawing area consisting of The layout is an arrangement in which lines are generated by aligning characters with the center of the rectangular drawing area aligned.

次に、ステップS23では、文字回転・シフト判断部3は、レイアウト生成部2から1行のレイアウト情報を取得する。   Next, in step S <b> 23, the character rotation / shift determination unit 3 acquires one line of layout information from the layout generation unit 2.

次に、ステップS24に進み、文字回転・シフト判断部3は、レイアウト生成部2から文字コードを取得する。   In step S24, the character rotation / shift determination unit 3 acquires a character code from the layout generation unit 2.

次に、ステップS25に進み、文字回転・シフト判断部3は、ステップS24で取得した文字コードに対して回転/シフトが必要か否かを判定する。すなわち、予め設定された文字コード表を用いて、取得された文字コードに対して回転/シフトが必要か否かを判定する。ここで、予め設定された文字コード表は、配置条件テーブル記憶部11に配置条件テーブル(図4,図5に示す)として記憶されている。   In step S25, the character rotation / shift determination unit 3 determines whether rotation / shift is necessary for the character code acquired in step S24. That is, it is determined whether or not rotation / shift is necessary for the acquired character code using a preset character code table. Here, the preset character code table is stored in the arrangement condition table storage unit 11 as an arrangement condition table (shown in FIGS. 4 and 5).

そして、ステップS25において、取得された文字コードに対して回転/シフトが必要と判定すると、ステップS26に進む一方、取得された文字コードに対して回転/シフトが必要でないと判定すると、ステップS29に進む。   If it is determined in step S25 that rotation / shift is necessary for the acquired character code, the process proceeds to step S26, while if it is determined that rotation / shift is not required for the acquired character code, the process proceeds to step S29. move on.

ステップS26では、配置条件テーブル記憶部11から取得された文字コードに対応する処理IDを取得する。   In step S26, a process ID corresponding to the character code acquired from the arrangement condition table storage unit 11 is acquired.

次に、ステップS27に進み、処理内容決定部4は、取得された処理IDに基づいて処理内容を決定する。   Next, it progresses to step S27 and the process content determination part 4 determines a process content based on acquired process ID.

次に、ステップS28に進み、移動位置確定部7により移動位置を確定する。すなわち、移動位置確定部7は、ステップS22で決定された基準位置を用いて、ステップS27で決定された処理内容に従って文字画像の回転または移動の少なくとも一方を行う。   Next, the process proceeds to step S28, and the movement position is determined by the movement position determination unit 7. That is, the movement position determination unit 7 performs at least one of rotation and movement of the character image according to the processing content determined in step S27, using the reference position determined in step S22.

次に、ステップS29に進み、文字画像配置部8は、文字コードに対応する文字画像を画像メモリ(図示せず)に配置する。このステップS29では、取得された文字コードに対して回転/シフトが必要と判定された文字コードに対しては、ステップS28で移動位置に配置された文字画像を画像メモリに配置する。   In step S29, the character image placement unit 8 places a character image corresponding to the character code in an image memory (not shown). In step S29, for the character code determined to require rotation / shift with respect to the acquired character code, the character image arranged in the movement position in step S28 is arranged in the image memory.

次に、ステップS30に進み、1行の配置が完了していないと判定すると、ステップS24に戻る一方、1行の配置が完了したと判定すると、ステップS31に進む。   Next, the process proceeds to step S30, and if it is determined that the arrangement of one line is not completed, the process returns to step S24, whereas if it is determined that the arrangement of one line is completed, the process proceeds to step S31.

次に、ステップS31で全行の配置が完了していないと判定すると、ステップS33に進み、行を進めて、ステップS23に戻る。   Next, when it is determined in step S31 that the arrangement of all the rows has not been completed, the process proceeds to step S33, the line is advanced, and the process returns to step S23.

一方、ステップS31で全行の配置が完了していると判定すると、ステップS32に進み、文字画像配置部8により文字画像が配置された画像データを画像出力部9から表示部10に出力して、この表示処理を終了する。   On the other hand, if it is determined in step S31 that the arrangement of all lines has been completed, the process proceeds to step S32, and the image data in which the character image is arranged by the character image arrangement unit 8 is output from the image output unit 9 to the display unit 10. This display process is terminated.

上記処理内容決定部4は、配置条件テーブル記憶部11に記憶された配置条件テーブルを用いて、文字コードに対応する処理IDから処理内容を決定する。上記配置条件テーブル記憶部11に記憶された配置条件テーブルは、図31〜図33に示す横書き文字のコード(16進)に対応する縦書き動作について、図4,図5に示す表としてまとめたものである。   The process content determination unit 4 uses the arrangement condition table stored in the arrangement condition table storage unit 11 to determine the process content from the process ID corresponding to the character code. The arrangement condition table stored in the arrangement condition table storage unit 11 summarizes the vertical writing operations corresponding to the horizontal writing character codes (hexadecimal) shown in FIGS. 31 to 33 as tables shown in FIGS. Is.

詳しくは、処理IDが“1”の場合は、括弧、矢印、学術記号などの文字画像を90度回転(時計回り)させる処理である。ここで、文字画像の90度回転(時計回り)は、仮想ボディの中心すなわち矩形の仮想ボディの対角線の交点を中心に行う。   Specifically, when the process ID is “1”, the character image such as parentheses, arrows, and academic symbols is rotated 90 degrees (clockwise). Here, the character image is rotated 90 degrees (clockwise) around the center of the virtual body, that is, the intersection of the diagonal lines of the rectangular virtual body.

また、処理IDが“2”の場合は、長音記号などの文字画像を90度回転(時計回り)させると共に左右反転させる処理である。ここで、文字画像の左右反転は、文字画像の中心線に対して行う。なお、文字画像の左右反転は、これに限らず、仮想ボディの中心線すなわち矩形の仮想ボディの対角線の交点を通る縦直線に対して行ってもよい。   Further, when the process ID is “2”, the character image such as a long sound symbol is rotated 90 degrees (clockwise) and reversed left and right. Here, the horizontal reversal of the character image is performed with respect to the center line of the character image. The left-right inversion of the character image is not limited to this, and may be performed on a vertical straight line passing through the intersection of the center line of the virtual body, that is, the diagonal line of the rectangular virtual body.

また、処理IDが“3”の場合は、文字画像を右上へシフト(移動量小)させる処理である。   When the process ID is “3”, the character image is shifted to the upper right (small movement amount).

また、処理IDが“4”の場合は、文字画像を右上へシフト(移動量大)させる処理である。   When the process ID is “4”, the character image is shifted to the upper right (large movement amount).

また、処理IDが“5”の場合は、文字画像を右下へシフトさせる処理である。   When the process ID is “5”, the character image is shifted to the lower right.

また、処理IDが“6”の場合は、文字画像を180度回転させると共に左上へシフトさせる処理である。ここで、文字画像の180度回転(時計回り)は、仮想ボディの中心すなわち矩形の仮想ボディの対角線の交点を中心に行う。   Further, when the process ID is “6”, the character image is rotated 180 degrees and is shifted to the upper left. Here, the rotation of the character image by 180 degrees (clockwise) is performed around the intersection of diagonal lines of the virtual body, that is, the rectangular virtual body.

また、処理IDが“7”の場合は、文字画像を90度(時計回り)回転させると共に左シフトさせる処理である。   When the process ID is “7”, the character image is rotated 90 degrees (clockwise) and shifted to the left.

さらに、処理IDが“8”の場合は、文字画像を90度(時計回り)回転させると共に右シフトさせる処理である。   Further, when the process ID is “8”, the character image is rotated 90 degrees (clockwise) and shifted to the right.

また、上記移動位置確定部7は、図15に示すシフト位置ルール記憶部12に記憶されたシフト位置ルールを用いて、処理IDに対応する文字画像の移動位置を確定する。   Further, the movement position determination unit 7 determines the movement position of the character image corresponding to the process ID, using the shift position rule stored in the shift position rule storage unit 12 shown in FIG.

図6は指定された文字の基準位置を説明するための図を示している。この第1実施形態では、指定された文字“国”のフォントの文字サイズ範囲(「仮想ボディ」)内において、“国”の文字画像に対して外接する矩形枠の左基準位置と右基準位置から矩形枠の幅を求め、矩形枠の上基準位置と下基準位置から矩形枠の高さを求めて、この幅と高さの矩形枠を仮想ボディの中心に中心が一致するように配置して基準位置とする。   FIG. 6 is a diagram for explaining the reference position of the designated character. In the first embodiment, the left reference position and the right reference position of the rectangular frame circumscribing the character image of “country” within the character size range (“virtual body”) of the designated character “country” font. The width of the rectangular frame is calculated from the height, the height of the rectangular frame is calculated from the upper reference position and the lower reference position of the rectangular frame, and the rectangular frame of this width and height is arranged so that the center coincides with the center of the virtual body. To be the reference position.

次に、図7〜図14に従って横書き用フォントの文字画像を変換する例を説明する。   Next, an example of converting a character image of a horizontally written font according to FIGS. 7 to 14 will be described.

<半角“A”>
まず、図7では、横書き用フォントの半角“A”の文字画像を90度回転(時計回り)させることにより縦書き用に変換する。つまり、配置条件テーブル記憶部11(図1に示す)から半角“A”の処理ID“1”を取得し、半角“A”の文字画像に対して処理ID“1”の処理内容である90度回転(時計回り)を行う。そして、シフト位置ルール記憶部12(図1に示す)の処理ID“1”のシフト位置ルールに従って文字画像をそのまま移動させずに配置する(図15参照)。
<Half-width “A”>
First, in FIG. 7, the half-width “A” character image of the horizontal writing font is converted to vertical writing by rotating 90 degrees (clockwise). That is, the processing ID “1” of the half-width “A” is acquired from the arrangement condition table storage unit 11 (shown in FIG. 1), and the processing content of the processing ID “1” is 90 for the character image of the half-width “A”. Rotate degrees (clockwise). Then, according to the shift position rule of process ID “1” in the shift position rule storage unit 12 (shown in FIG. 1), the character image is arranged without being moved (see FIG. 15).

<長音記号“ー”>
図8では、横書き用フォントの長音記号“ー”の文字画像を90度回転(時計回り),左右反転およびセンタリングすることにより縦書き用に変換している。つまり、配置条件テーブル記憶部11(図1に示す)から長音記号“ー”の処理ID“2”を取得し、長音記号“ー”の文字画像に対して処理ID“2”の処理内容である90度回転(時計回り)と左右反転を行う。そして、シフト位置ルール記憶部12(図1に示す)の処理ID“2”のシフト位置ルールに従って文字画像のセンタリングを行う(図15参照)。
<Long sign "-">
In FIG. 8, the character image of the long sound symbol “-” in the horizontal writing font is converted into vertical writing by rotating it 90 degrees (clockwise), turning left and right, and centering. That is, the processing ID “2” of the long sound symbol “-” is acquired from the arrangement condition table storage unit 11 (shown in FIG. 1), and the processing content of the processing ID “2” is obtained for the character image of the long sound symbol “-”. Rotate 90 degrees (clockwise) and flip left and right. Then, the character image is centered according to the shift position rule of the process ID “2” in the shift position rule storage unit 12 (shown in FIG. 1) (see FIG. 15).

<“ぁ”>
図9では、横書き用フォントの“ぁ”の文字画像を右上シフト(移動量小)することにより縦書き用に変換している。つまり、配置条件テーブル記憶部11(図1に示す)から“ぁ”の処理ID“3”を取得し、“ぁ”の文字画像に対して処理ID“3”の処理内容である右上へシフト(移動量小)を行う。そして、シフト位置ルール記憶部12(図1に示す)の処理ID“3”のシフト位置ルール「文字画像の外接矩形の右上角が基準位置の右上角に一致」に従って、“ぁ”の文字画像の外接矩形の右辺が右基準位置に一致すると共に、文字画像の外接矩形の上辺が上基準位置に一致するように、“ぁ”の文字画像を配置する(図15参照)。
<"A">
In FIG. 9, the character image of “a” in the horizontal writing font is converted to vertical writing by shifting to the upper right (small movement amount). That is, the processing ID “3” of “A” is acquired from the arrangement condition table storage unit 11 (shown in FIG. 1), and the processing content of the processing ID “3” is shifted to the upper right for the character image “A”. (Move small amount). Then, according to the shift position rule “3” in the shift position rule storage unit 12 (shown in FIG. 1) “the upper right corner of the circumscribed rectangle of the character image matches the upper right corner of the reference position”, the character image of “A” The character image of “A” is arranged so that the right side of the circumscribed rectangle matches the right reference position and the upper side of the circumscribed rectangle of the character image matches the upper reference position (see FIG. 15).

<読点“、”>
図10では、横書き用フォントの読点“、”の文字画像を右上シフト(移動量大)することにより縦書き用に変換している。つまり、配置条件テーブル記憶部11(図1に示す)から読点“、”の処理ID“4”を取得し、読点“、”の文字画像に対して処理ID“4”の処理内容である右上へシフト(移動量小)を行う。そして、シフト位置ルール記憶部12(図1に示す)の処理ID“4”のシフト位置ルール「文字画像の外接矩形の右上角が基準位置の右上角に一致」に従って、読点“、”の文字画像の外接矩形の右辺が右基準位置に一致すると共に、文字画像の外接矩形の上辺が上基準位置に一致するように、読点“、”の文字画像を配置する(図15参照)。
<Reading marks ",">
In FIG. 10, the character image of the punctuation mark “,” in the horizontal writing font is converted to vertical writing by shifting it to the upper right (large movement amount). That is, the processing ID “4” of the reading point “,” is acquired from the arrangement condition table storage unit 11 (shown in FIG. 1), and the processing content of the processing ID “4” is processed for the character image of the reading point “,”. Shift to (small amount of movement). Then, according to the shift position rule “4” in the shift position rule storage unit 12 (shown in FIG. 1) “the upper right corner of the circumscribed rectangle of the character image matches the upper right corner of the reference position”, The character image of the reading mark “,” is arranged so that the right side of the circumscribed rectangle of the image matches the right reference position and the upper side of the circumscribed rectangle of the character image matches the upper reference position (see FIG. 15).

<ダブルクォーテーションの開き““”>
図11では、横書き用フォントのダブルクォーテーションの開き““”の文字画像を右下シフト,右下位置調整をすることにより縦書き用に変換している。つまり、配置条件テーブル記憶部11(図1に示す)からダブルクォーテーションの開き““”の処理ID“5”を取得し、ダブルクォーテーションの開き““”の文字画像に対して処理ID“5”の処理内容である右下へシフトを行う。そして、シフト位置ルール記憶部12(図1に示す)の処理ID“5”のシフト位置ルール「文字画像の外接矩形の右下角が基準位置の右下角に一致」に従って、ダブルクォーテーションの開き““”の文字画像の外接矩形の右辺が右基準位置に一致すると共に、文字画像の外接矩形の下辺が下基準位置に一致するように、ダブルクォーテーションの開き““”の文字画像を配置する(図15参照)。
<Double quotation opening ““ ”>
11, the character image of ““ ”in the double quotation mark of the horizontal writing font is converted to vertical writing by shifting to the lower right and adjusting the lower right position, that is, the arrangement condition table storage unit 11 (FIG. 11). 1), the processing ID “5” of the double quotation opening ““ ”is acquired, and the character image of the double quotation opening“ “” is shifted to the lower right which is the processing content of the processing ID “5”. Then, according to the shift position rule “5” in the shift position rule storage unit 12 (shown in FIG. 1) “the lower right corner of the circumscribed rectangle of the character image matches the lower right corner of the reference position”, the double quotation is opened. Double quotation marks are opened so that the right side of the circumscribed rectangle of the “” character image matches the right reference position, and the lower side of the circumscribed rectangle of the character image matches the lower reference position. Arranging character images of "" (see FIG. 15).

<ダブルクォーテーションの閉じ“””>
図12では、横書き用フォントのダブルクォーテーションの閉じ“””の文字画像を180度回転,左上位置調整をすることにより縦書き用に変換している。つまり、配置条件テーブル記憶部11(図1に示す)からダブルクォーテーションの閉じ“””の処理ID“6”を取得し、ダブルクォーテーションの閉じ“””の文字画像に対して処理ID“6”の処理内容である180度回転と左上へシフトを行う。そして、シフト位置ルール記憶部12(図1に示す)の処理ID“6”のシフト位置ルール「文字画像の外接矩形の左上角が基準位置の左上角に一致」に従って、ダブルクォーテーションの閉じ“””の文字画像の外接矩形の左辺が左基準位置に一致すると共に、文字画像の外接矩形の上辺が上基準位置に一致するように、ダブルクォーテーションの閉じ“””の文字画像を配置する(図15参照)。
<Close double quotation """>
12, the character image of the closed double quote “” ”of the horizontal writing font is converted to vertical writing by rotating 180 degrees and adjusting the upper left position, that is, the arrangement condition table storage unit 11 (FIG. 1). 2), the processing ID “6” of the double quotation closing “” ”is acquired, and the processing image of the processing ID“ 6 ”is rotated by 180 degrees and is moved to the upper left for the character image of the double quotation closing“ ””. In accordance with the shift position rule “upper left corner of the circumscribed rectangle of the character image matches the upper left corner of the reference position” of the process ID “6” of the shift position rule storage unit 12 (shown in FIG. 1). A double quotation mark so that the left side of the circumscribed rectangle of the closed “” ”character image matches the left reference position and the upper side of the circumscribed rectangle of the character image matches the upper reference position. Arranging character images of Shon closed """(see FIG. 15).

<鍵括弧閉じ“」”>
図13では、横書き用フォントの鍵括弧閉じ“」”の文字画像を90度回転(時計回り),左位置調整をすることにより縦書き用に変換している。つまり、配置条件テーブル記憶部11(図1に示す)から鍵括弧閉じ“」”の処理ID“7”を取得し、鍵括弧閉じ“」”の文字画像に対して処理ID“7”の処理内容である90度回転(時計回り)と左シフトを行う。そして、シフト位置ルール記憶部12(図1に示す)の処理ID“7”のシフト位置ルール「文字画像の外接矩形の左が基準位置の左に一致」に従って、鍵括弧閉じ“」”の文字画像の外接矩形の左辺が左基準位置に一致するように、鍵括弧閉じ“」”の文字画像を配置する(図15参照)。
<Close bracket """>
In Fig. 13, the character image of """in the horizontal writing font is converted to vertical writing by rotating 90 degrees (clockwise) and adjusting the left position, that is, the arrangement condition table storage unit 11 The processing ID “7” of the parenthesis closing “” ”is obtained from (shown in FIG. 1), and the processing image of the processing ID“ 7 ”is rotated by 90 degrees (clock In accordance with the shift position rule “the left of the circumscribed rectangle of the character image matches the left of the reference position” of the process ID “7” in the shift position rule storage unit 12 (shown in FIG. 1), The character image of the bracket closing """is arranged so that the left side of the circumscribed rectangle of the character image of the bracket closing""" coincides with the left reference position (see FIG. 15).

<鍵括弧開き“「”>
図14では、横書き用フォントの鍵括弧開き“「”の文字画像を90度回転(時計回り),右位置調整をすることにより縦書き用に変換している。つまり、配置条件テーブル記憶部11(図1に示す)から鍵括弧開き“「”の処理ID“8”を取得し、鍵括弧閉開き“「”の文字画像に対して処理ID“8”の処理内容である90度回転(時計回り)と右シフトを行う。そして、シフト位置ルール記憶部12(図1に示す)の処理ID“8”のシフト位置ルール「文字画像の外接矩形の右が基準位置の右に一致」に従って、鍵括弧開き“「”の文字画像の外接矩形の右辺が右基準位置に一致するように、鍵括弧開き“「”の文字画像を配置する(図15参照)。
<Open bracket """>
In FIG. 14, the character image of the square bracket opening ““ ”of the horizontal writing font is converted to vertical writing by rotating 90 degrees (clockwise) and adjusting the right position. That is, the processing ID “8” of the bracket opening ““ ”is obtained from the arrangement condition table storage unit 11 (shown in FIG. 1), and the processing ID“ 8 ”is obtained for the character image of the bracket opening“ “”. Rotate 90 degrees (clockwise) and right shift, which are the processing contents. Then, in accordance with the shift position rule “8” of the circumscribed rectangle of the character image matches the right of the reference position of the process ID “8” in the shift position rule storage unit 12 (shown in FIG. 1) A character image with an opening bracket ““ ”is arranged so that the right side of the circumscribed rectangle of the image matches the right reference position (see FIG. 15).

図15は上記第1実施形態の文章表示装置に用いられるシフト位置ルールを示す図を示している。処理IDが“1”のシフト位置ルールは「そのまま」とする。また、処理IDが“2”のシフト位置ルールは「センタリング」とする。また、処理IDが“3”,“4”のシフト位置ルールは、「文字画像の外接矩形の右上角が基準位置の右上角に一致」とする。また、処理IDが“5”のシフト位置ルールは、「文字画像の外接矩形の右下角が基準位置の右下角に一致」とする。また、処理IDが“6”のシフト位置ルールは、「文字画像の外接矩形の左上角が基準位置の左上角に一致」とする。また、処理IDが“7”のシフト位置ルールは、「文字画像の外接矩形の左が基準位置の左に一致」とする。また、処理IDが“8”のシフト位置ルールは、「文字画像の外接矩形の右が基準位置の右に一致」とする。   FIG. 15 is a diagram showing a shift position rule used in the sentence display device of the first embodiment. The shift position rule with the process ID “1” is “as is”. The shift position rule with the process ID “2” is “centering”. The shift position rule with process IDs “3” and “4” is “the upper right corner of the circumscribed rectangle of the character image matches the upper right corner of the reference position”. The shift position rule with the process ID “5” is “the lower right corner of the circumscribed rectangle of the character image matches the lower right corner of the reference position”. The shift position rule with the process ID “6” is “the upper left corner of the circumscribed rectangle of the character image matches the upper left corner of the reference position”. The shift position rule with the process ID “7” is “the left of the circumscribed rectangle of the character image matches the left of the reference position”. The shift position rule with the process ID “8” is “the right of the circumscribed rectangle of the character image matches the right of the reference position”.

なお、上記シフト位置ルールの一部を変更してもよい。例えば、図16に示すように、処理IDが“7”のシフト位置ルールを、文字画像の外接矩形の左辺を、左基準位置と仮想ボディの左位置との中間とする。また、処理IDが“8”のシフト位置ルールは、文字画像の外接矩形の右辺を、右基準位置と仮想ボディの右位置との中間とする。   A part of the shift position rule may be changed. For example, as shown in FIG. 16, the shift position rule with the process ID “7” is set so that the left side of the circumscribed rectangle of the character image is between the left reference position and the left position of the virtual body. In the shift position rule with the process ID “8”, the right side of the circumscribed rectangle of the character image is set between the right reference position and the right position of the virtual body.

図17では、図16に示す処理ID“7”の配置ルールに基づいて、横書き用フォントの鍵括弧閉じ“」”の文字画像を90度回転(時計回り),左位置調整をすることにより縦書き用に変換している。   In FIG. 17, based on the arrangement rule of the process ID “7” shown in FIG. 16, the character image of the closed bracket “” ”of the horizontal writing font is rotated 90 degrees (clockwise) and the vertical position is adjusted by adjusting the left position. It has been converted for writing.

また、図18では、図16に処理ID“8”の配置ルールに基づいて、横書き用フォントの鍵括弧開き“「”の文字画像を90度回転(時計回り),右位置調整をすることにより縦書き用に変換している。   Also, in FIG. 18, based on the arrangement rule of the process ID “8” in FIG. 16, the character image of the bracket opening ““ ”of the horizontal writing font is rotated 90 degrees (clockwise) and the right position is adjusted. It is converted for vertical writing.

上記構成の文章表示装置によれば、基準位置決定部6により、基準となる文字の文字画像に対して外接する矩形枠に基づいて基準位置を決定して、横書き用フォントを用いて表示部10により縦書き表示するとき、その基準位置に基づいて、移動位置確定部7が、予め設定された文字の文字画像に対して仮想ボディ(描画領域)内で回転または移動の少なくとも一方を行うことによって、横書き用フォントを用いて、全体としてのバランスのよいレイアウトの縦書き表示ができる。   According to the text display device having the above configuration, the reference position determination unit 6 determines the reference position based on the rectangular frame circumscribing the character image of the reference character, and uses the horizontal writing font to display the display unit 10. When the vertical writing display is performed, the moving position determination unit 7 performs at least one of rotation or movement within the virtual body (drawing area) on the character image of the character set in advance based on the reference position. The horizontal writing font can be used for vertical writing display with a well-balanced layout as a whole.

なお、電子書籍は、複数種類のフォントの文字が用いられた文章が混在していてもよく、その場合は、例えば、全ての種類のフォントの基準位置を求めて平均化したり、文字数の多い方のフォントを基準となる文字に用いて基準位置を決定したりすればよい。   Note that e-books may contain a mixture of texts that use characters of multiple types of fonts. In that case, for example, the standard position of all types of fonts may be obtained and averaged, or the number of characters may be large The reference position may be determined using the above font as a reference character.

〔第2実施形態〕
図19はこの発明の第2実施形態の電子書籍の文章を表示する文章表示装置のブロック図を示している。この第2実施形態の文章表示装置は、複数基準文字取得部105と平均基準位置決定部106を除き第1実施形態の文章表示装置と同一の構成をしており、同一構成部には、同一参照番号を付して説明を省略する。
[Second Embodiment]
FIG. 19 shows a block diagram of a text display device for displaying text of an electronic book according to the second embodiment of the present invention. The text display device of the second embodiment has the same configuration as that of the text display device of the first embodiment except for the plural reference character acquisition unit 105 and the average reference position determination unit 106, and the same components are the same. A reference number is attached and description is abbreviate | omitted.

複数基準文字取得部105は、基準位置を求めるための基準となる複数の文字の文字画像を取得する。この基準となる複数の文字は、予め設定された例えば“国”、“り”、“A”の文字画像を取得する。なお、上記基準となる複数の文字は、外部から任意に設定可能としてもよい。   The plurality of reference character acquisition unit 105 acquires character images of a plurality of characters serving as a reference for obtaining a reference position. For the plurality of characters serving as the reference, for example, “country”, “ri”, “A” character images set in advance are acquired. Note that the plurality of reference characters may be arbitrarily set from the outside.

そして、平均基準位置決定部106は、基準文字取得部5により取得された基準となる複数の文字に基づいて、基準位置を決定する。ここで、平均基準位置決定部106は、複数の文字に対応する各文字画像に夫々外接する複数の矩形枠の高さの平均および上記複数の矩形枠の幅の平均で表された矩形枠を求め、求めた矩形枠を仮想ボディの中心に中心が一致するように配置して基準位置とする。   Then, the average reference position determination unit 106 determines a reference position based on a plurality of reference characters acquired by the reference character acquisition unit 5. Here, the average reference position determining unit 106 calculates a rectangular frame represented by an average height of a plurality of rectangular frames circumscribing each character image corresponding to a plurality of characters and an average width of the plurality of rectangular frames. The obtained rectangular frame is arranged so that the center coincides with the center of the virtual body and is set as a reference position.

次に、文字画像変換部の一例としての移動位置確定部7は、平均基準位置決定部106により決定された基準位置およびシフト位置ルール記憶部12に記憶されたシフト位置ルールに基づいて、文字画像の回転または移動の少なくとも一方を行って文字画像の移動位置を確定する。   Next, the movement position determination unit 7 as an example of the character image conversion unit performs a character image based on the reference position determined by the average reference position determination unit 106 and the shift position rule stored in the shift position rule storage unit 12. The movement position of the character image is determined by performing at least one of rotation or movement of the character image.

図20は指定された複数の文字の基準位置から平均基準位置を求める方法を説明するための図を示している。図20に示すように、“国”の幅をw1,高さh1とし、“り”の幅をw2,高さh2とし、“A”の幅をw3,高さh3とする。なお、半角“A”については、90度回転(時計回り)させた文字画像の幅と高さをw3,h3とする。   FIG. 20 is a diagram for explaining a method for obtaining the average reference position from the reference positions of a plurality of designated characters. As shown in FIG. 20, the width of “country” is w1, height h1, the width of “ri” is w2, height h2, and the width of “A” is w3, height h3. For half-width “A”, the width and height of the character image rotated 90 degrees (clockwise) are w3 and h3.

そうして、各文字画像の幅の平均w(=(w1+w2+w3)÷3)および高さの平均h(=(h1+h2+h3)÷3)とし、幅wと高さhの矩形枠を中心が仮想ボディの中心に一致するように配置して基準位置とする。   Then, the average width w of each character image (= (w1 + w2 + w3) ÷ 3) and the average height h (= (h1 + h2 + h3) ÷ 3), with a rectangular frame having a width w and a height h as the center. It is arranged so as to coincide with the center of the reference position.

このように、特徴的な文字や平均的な文字を予め基準となる文字として選択しておくことにより、処理時間をかけずに平均的な基準位置を求めることができる。   Thus, by selecting characteristic characters and average characters in advance as reference characters, the average reference position can be obtained without taking processing time.

上記第2実施形態の文章表示装置は、第1実施形態の文章表示装置と同様の効果を有する。   The sentence display device of the second embodiment has the same effect as the sentence display device of the first embodiment.

また、上記文章表示装置では、基準となる複数の文字に対応する各文字画像に対して夫々外接する複数の矩形枠の高さの平均および上記複数の矩形枠の幅の平均を求めて、求めた平均高さと平均幅の矩形枠を中心が仮想ボディ(描画領域)の中心に一致するように配置して基準位置とすることによって、フォント全体のデザインに対してバランスのよい最適な位置に文字画像を配置することができる。   Further, the sentence display device obtains the average of the heights of the plurality of rectangular frames circumscribing each character image corresponding to the plurality of reference characters and the average of the widths of the plurality of rectangular frames. By placing a rectangular frame with the average height and average width so that the center coincides with the center of the virtual body (drawing area) and setting it as the reference position, the character is placed in an optimal position with a good balance with respect to the overall font design. Images can be placed.

〔第3実施形態〕
図21はこの発明の第3実施形態の電子書籍の文章を表示する文章表示装置のブロック図を示している。この第3実施形態の文章表示装置は、全文字取得部205を除き第2実施形態の文章表示装置と同一の構成をしており、同一構成部には、同一参照番号を付して説明を省略する。
[Third Embodiment]
FIG. 21 shows a block diagram of a text display device for displaying text of an electronic book according to the third embodiment of the present invention. The text display device of the third embodiment has the same configuration as the text display device of the second embodiment except for the all-character acquisition unit 205, and the same reference numerals are given to the same configuration units for explanation. Omitted.

全文字取得部205は、基準位置を求めるための基準となる全ての文字の文字画像を取得する。この基準となる全ての文字は、電子書籍のフォントに属する全ての文字である。   The all character acquisition unit 205 acquires character images of all characters serving as a reference for obtaining the reference position. All the characters serving as the reference are all characters belonging to the font of the electronic book.

そして、平均基準位置決定部106は、全文字取得部205により取得された基準となる全ての文字に基づいて、基準位置を決定する。ここで、平均基準位置決定部106は、基準となる全ての文字に対応する各文字画像に対して夫々外接する複数の矩形枠の高さの平均および上記複数の矩形枠の幅の平均で表された矩形枠を求め、求めた矩形枠を中心が仮想ボディの中心に一致するように配置して基準位置とする。   Then, the average reference position determination unit 106 determines the reference position based on all the characters serving as the reference acquired by the all character acquisition unit 205. Here, the average reference position determination unit 106 represents the average height of the plurality of rectangular frames circumscribing each character image corresponding to all the reference characters and the average of the widths of the plurality of rectangular frames. The obtained rectangular frame is obtained, and the obtained rectangular frame is arranged so that the center coincides with the center of the virtual body, and is set as a reference position.

次に、文字画像変換部の一例としての移動位置確定部7は、平均基準位置決定部106により決定された基準位置およびシフト位置ルール記憶部12に記憶されたシフト位置ルールに基づいて、文字画像の回転または移動の少なくとも一方を行って文字画像の移動位置を確定する。   Next, the movement position determination unit 7 as an example of the character image conversion unit performs a character image based on the reference position determined by the average reference position determination unit 106 and the shift position rule stored in the shift position rule storage unit 12. The movement position of the character image is determined by performing at least one of rotation or movement of the character image.

図22は電子書籍のフォントに属する全文字から平均基準位置を求める方法を説明するための図を示している。図22に示すように、フォントに属する全文字の文字数をNとし、各文字画像の幅をw1,w2,w3,…,wNとし、高さをh1,h2,h3,…,hNとする。   FIG. 22 is a diagram for explaining a method of obtaining the average reference position from all characters belonging to the font of the electronic book. As shown in FIG. 22, the number of all characters belonging to the font is N, the width of each character image is w1, w2, w3,..., WN, and the height is h1, h2, h3,.

そうして、各文字画像の幅の平均w(=(w1+w2+w3+…+wN)÷N)および高さの平均h(=(h1+h2+h3+…+hN)÷N)とし、幅wと高さhの矩形枠を中心が仮想ボディの中心に一致するように配置して基準位置とする。   Then, an average width w (= (w 1 + w 2 + w 3 +... + WN) / N) and an average height h (= (h 1 + h 2 + h 3 +... + HN) / N) for each character image, and a rectangular frame having a width w and a height h. Arrange the center of the virtual body to coincide with the center of the virtual body and set it as the reference position.

この場合、電子書籍の文章に利用されているフォントについて、デザインの重心が下や右に偏っているなどの特徴を抽出して、そのようなフォントの文字に対応した文字画像の配置が可能になる。   In this case, it is possible to extract features such as the design center of gravity being biased downward or to the right for fonts used in e-book text, and to arrange character images corresponding to characters in such fonts Become.

上記第3実施形態の文章表示装置は、第2実施形態の文章表示装置と同様の効果を有する。   The text display device of the third embodiment has the same effect as the text display device of the second embodiment.

また、上記文章表示装置では、電子書籍の文章のフォントに属する全文字を基準となる文字として平均基準位置決定部106によって基準位置を決定することにより、フォント全体のデザインに対応した適切な基準位置が得られるので、文字画像を最適な位置に配置することができる。   In the above sentence display device, the reference position is determined by the average reference position determination unit 106 using all the characters belonging to the font of the sentence of the electronic book as a reference character, so that an appropriate reference position corresponding to the design of the entire font is obtained. Therefore, the character image can be arranged at an optimum position.

〔第4実施形態〕
図23はこの発明の第4実施形態の電子書籍の文章を表示する文章表示装置のブロック図を示している。この第4実施形態の文章表示装置は、行中全文字取得部305を除き第1実施形態の文章表示装置と同一の構成をしており、同一構成部には、同一参照番号を付して説明を省略する。
[Fourth Embodiment]
FIG. 23 shows a block diagram of a text display device for displaying text of an electronic book according to the fourth embodiment of the present invention. The sentence display device of the fourth embodiment has the same configuration as that of the sentence display device of the first embodiment except for the in-line all-character acquisition unit 305, and the same reference numerals are assigned to the same components. Description is omitted.

行中全文字取得部305は、表示部10に表示しようとする1行に含まれる全文字を取得する。   The in-line all character acquisition unit 305 acquires all characters included in one line to be displayed on the display unit 10.

そして、基準位置決定部6は、行中全文字取得部305により取得された行に含まれる文字に基づいて、基準位置を決定する。   Then, the reference position determination unit 6 determines a reference position based on the characters included in the line acquired by the all-in-line acquisition unit 305.

次に、文字画像変換部の一例としての移動位置確定部7は、基準位置決定部6により決定された基準位置およびシフト位置ルール記憶部12に記憶されたシフト位置ルールに基づいて、文字画像の回転または移動の少なくとも一方を行って文字画像の移動位置を確定する。   Next, the movement position determination unit 7 as an example of the character image conversion unit performs the character image conversion based on the reference position determined by the reference position determination unit 6 and the shift position rule stored in the shift position rule storage unit 12. At least one of rotation and movement is performed to determine the moving position of the character image.

以下、この文章表示装置は、第1実施形態の文章表示装置と同様の動作を行う。   Hereinafter, this text display device performs the same operation as the text display device of the first embodiment.

図24,図25は上記文章表示装置の動作を説明するためのフローチャートを示している。なお、このフローチャートは、表示部10に電子書籍の1ページ分を表示する処理であり、ページ送り(または戻り)があるとこの表示処理が繰り返される。   24 and 25 are flowcharts for explaining the operation of the sentence display device. Note that this flowchart is a process of displaying one page of the electronic book on the display unit 10, and this display process is repeated when there is a page feed (or return).

まず、この処理がスタートすると、図24に示すステップS101で書籍データ取得部1により電子書籍のデータを取得する。   First, when this process is started, the book data acquisition unit 1 acquires electronic book data in step S101 shown in FIG.

次に、ステップS102に進み、レイアウト生成部2により電子書籍のデータを解析してレイアウトに必要な表示ページの書籍データ情報を保持する。   In step S102, the electronic book data is analyzed by the layout generation unit 2, and the book data information of the display page necessary for the layout is held.

次に、ステップS103に進み、書籍データ情報と表示部10の表示設定に基づいて、レイアウト生成部2により画像やテキストのレイアウトを決定する。ここで、レイアウト生成部2は、レイアウトに必要なレイアウト情報を生成する。   In step S103, the layout generation unit 2 determines an image or text layout based on the book data information and the display setting of the display unit 10. Here, the layout generation unit 2 generates layout information necessary for the layout.

次に、ステップS104に進み、レイアウト情報から電子書籍の文章が縦書きかまたは横書きかを判定する。   Next, it progresses to step S104 and it is determined from the layout information whether the text of an electronic book is vertical writing or horizontal writing.

そして、ステップS104で電子書籍の文章が縦書きでないと判定すると、ステップS105に進み、文字回転・シフト判断部3は、レイアウト生成部2から1行のレイアウト情報を取得する。   If it is determined in step S104 that the text of the electronic book is not vertically written, the process proceeds to step S105, where the character rotation / shift determination unit 3 acquires one line of layout information from the layout generation unit 2.

次に、ステップS106に進み、文字回転・シフト判断部3は、レイアウト生成部2から文字コードを取得する。   In step S106, the character rotation / shift determination unit 3 acquires a character code from the layout generation unit 2.

次に、ステップS107に進み、文字画像配置部8は、文字コードに対応する文字画像を画像メモリ(図示せず)に配置する。   In step S107, the character image placement unit 8 places a character image corresponding to the character code in an image memory (not shown).

次に、ステップS108に進み、1行の配置が完了していないと判定すると、ステップS106に戻る一方、1行の配置が完了したと判定すると、ステップS109に進む。   Next, the process proceeds to step S108, and if it is determined that the arrangement of one line is not completed, the process returns to step S106, whereas if it is determined that the arrangement of one line is completed, the process proceeds to step S109.

次に、ステップS109で全行の配置が完了していないと判定すると、ステップS1011に進み、行を進めて、ステップS105に戻る。   Next, if it is determined in step S109 that the arrangement of all the rows has not been completed, the process proceeds to step S1011, the line is advanced, and the process returns to step S105.

一方、ステップS109で全行の配置が完了していると判定すると、ステップS1010に進み、画像出力部9により文字画像配置部8により文字画像が配置された画像データを表示部10に出力して、この表示処理を終了する。   On the other hand, if it is determined in step S109 that the arrangement of all lines has been completed, the process proceeds to step S1010, where the image output unit 9 outputs image data in which the character image is arranged by the character image arrangement unit 8 to the display unit 10. This display process is terminated.

また、ステップS104で縦書きであると判定すると、図25に示すステップS121に進む。   If it is determined in step S104 that the writing is vertical, the process proceeds to step S121 shown in FIG.

そして、ステップS121では、文字回転・シフト判断部3は、レイアウト生成部2から1行のレイアウト情報を取得する。   In step S <b> 121, the character rotation / shift determination unit 3 acquires one line of layout information from the layout generation unit 2.

次に、ステップS122に進み、文字回転・シフト判断部3は、レイアウト生成部2から文字コードを取得する。   In step S122, the character rotation / shift determination unit 3 acquires a character code from the layout generation unit 2.

次に、ステップS123に進み、ステップS122で取得した文字コードに対して回転/シフトが必要か否かを判定する。すなわち、予め設定された文字コード表(図4,図5に示す配置条件テーブル)を用いて、取得された文字コードに対して回転/シフトが必要か否かを判定する。   Next, it progresses to step S123 and it is determined whether rotation / shift is required with respect to the character code acquired at step S122. That is, it is determined whether or not rotation / shift is necessary for the acquired character code using a preset character code table (arrangement condition table shown in FIGS. 4 and 5).

そして、ステップS123において、取得された文字コードに対して回転/シフトが必要と判定すると、ステップS124に進む一方、取得された文字コードに対して回転/シフトが必要でないと判定すると、ステップS129に進む。   If it is determined in step S123 that rotation / shift is necessary for the acquired character code, the process proceeds to step S124. If it is determined that rotation / shift is not required for the acquired character code, the process proceeds to step S129. move on.

ステップS124では、配置条件テーブル記憶部11から取得された文字コードに対応する処理IDを取得する。   In step S124, a process ID corresponding to the character code acquired from the arrangement condition table storage unit 11 is acquired.

次に、ステップS125に進み、処理内容決定部4は、取得された処理IDに基づいて処理内容を決定する。   Next, it progresses to step S125 and the process content determination part 4 determines a process content based on acquired process ID.

次に、ステップS126に進み、行中全文字取得部305により行中の全ての文字を取得する。   In step S126, the in-line all character acquisition unit 305 acquires all the characters in the line.

次に、ステップS127に進み、行中全文字取得部305により行中の全ての文字の文字画像に外接する矩形枠に基づいて基準位置を基準位置決定部6により決定する。この第4実施形態では、行中の全ての文字の文字画像に夫々外接する複数の矩形枠の幅の平均および上記複数の矩形枠の高さの平均を求め、その平均幅と平均高さの矩形枠を仮想ボディの中心に中心が一致するように配置して基準位置とする。   In step S127, the reference position determination unit 6 determines the reference position based on the rectangular frame circumscribing the character images of all the characters in the line by the in-line all character acquisition unit 305. In the fourth embodiment, the average of the widths of the plurality of rectangular frames circumscribing the character images of all the characters in the line and the average of the heights of the plurality of rectangular frames are obtained, and the average width and the average height are calculated. A rectangular frame is arranged so that the center coincides with the center of the virtual body and is set as a reference position.

次に、ステップS128に進み、移動位置確定部7により移動位置を確定する。すなわち、移動位置確定部7は、処理IDに基づく処理内容に従って文字画像の回転または移動の少なくとも一方を行う。   Next, the process proceeds to step S128, and the movement position is determined by the movement position determination unit 7. That is, the movement position determination unit 7 performs at least one of rotation or movement of the character image according to the processing content based on the processing ID.

次に、ステップS129に進み、文字画像配置部8は、文字コードに対応する文字画像を画像メモリ(図示せず)に配置する。このステップS129では、取得された文字コードに対して回転/シフトが必要と判定された文字コードに対しては、ステップS128で移動位置に配置された文字画像を画像メモリに配置する。   In step S129, the character image placement unit 8 places a character image corresponding to the character code in an image memory (not shown). In step S129, for the character code determined to require rotation / shift with respect to the acquired character code, the character image placed in the movement position in step S128 is placed in the image memory.

次に、ステップS130に進み、1行の配置が完了していないと判定すると、ステップS122に戻る一方、1行の配置が完了したと判定すると、ステップS131に進む。   Next, the process proceeds to step S130, and if it is determined that the arrangement of one line is not completed, the process returns to step S122, whereas if it is determined that the arrangement of one line is completed, the process proceeds to step S131.

次に、ステップS131で全行の配置が完了していないと判定すると、ステップS133に進み、行を進めて、ステップS121に戻る。   Next, if it is determined in step S131 that the arrangement of all the rows has not been completed, the process proceeds to step S133, the line is advanced, and the process returns to step S121.

一方、ステップS131で全行の配置が完了していると判定すると、ステップS132に進み、文字画像配置部8により文字画像が配置された画像データを画像出力部9から表示部10に出力して、この表示処理を終了する。   On the other hand, if it is determined in step S131 that the arrangement of all lines has been completed, the process proceeds to step S132, and the image data in which the character image is arranged by the character image arrangement unit 8 is output from the image output unit 9 to the display unit 10. This display process is terminated.

上記第4実施形態の文章表示装置は、第1実施形態の文章表示装置と同様の効果を有する。   The sentence display device of the fourth embodiment has the same effect as the sentence display device of the first embodiment.

また、上記文章表示装置によれば、電子書籍の文章のうちの表示部10に表示される行毎に、その行に含まれる全文字を基準となる文字として基準位置決定部6によって基準位置を決定することにより、行毎に適切な基準位置が得られるので、表示部10に表示される行毎に文字画像を最適な位置に配置することができる。   Moreover, according to the said text display apparatus, for every line displayed on the display part 10 among the texts of an electronic book, the reference position is determined by the reference position determination unit 6 using all the characters included in the line as a reference character. By determining, an appropriate reference position can be obtained for each line, so that a character image can be arranged at an optimal position for each line displayed on the display unit 10.

〔第5実施形態〕
図26はこの発明の第5実施形態の電子書籍の文章を表示する文章表示装置のブロック図を示している。この第5実施形態の文章表示装置は、行中最大文字取得部405を除き第4実施形態の文章表示装置と同一の構成をしており、同一構成部には、同一参照番号を付して説明を省略する。
[Fifth Embodiment]
FIG. 26 shows a block diagram of a text display device for displaying text of an electronic book according to the fifth embodiment of the present invention. The sentence display device according to the fifth embodiment has the same configuration as the sentence display device according to the fourth embodiment except for the in-line maximum character acquisition unit 405, and the same reference numerals are given to the same components. Description is omitted.

行中最大文字取得部405は、表示部10に表示しようとする行に含まれる複数の文字のうち、外接する矩形枠の大きさが最大の文字を取得する。   The in-line maximum character acquisition unit 405 acquires a character having a maximum size of a circumscribed rectangular frame among a plurality of characters included in the line to be displayed on the display unit 10.

そして、基準位置決定部6は、行中最大文字取得部305により取得された基準となる文字に基づいて、基準位置を決定する。ここで、基準となる文字の文字画像に対して外接する矩形枠(矩形枠の大きさが最大)を描画領域の中心に中心が一致するように配置して基準位置とする。   Then, the reference position determination unit 6 determines the reference position based on the reference character acquired by the in-line maximum character acquisition unit 305. Here, a rectangular frame circumscribing the character image of the reference character (maximum size of the rectangular frame) is arranged so that the center coincides with the center of the drawing area, and is set as a reference position.

次に、文字画像変換部の一例としての移動位置確定部7は、基準位置決定部6により決定された基準位置およびシフト位置ルール記憶部12に記憶されたシフト位置ルールに基づいて、文字画像の回転または移動の少なくとも一方を行って文字画像の移動位置を確定する。   Next, the movement position determination unit 7 as an example of the character image conversion unit performs the character image conversion based on the reference position determined by the reference position determination unit 6 and the shift position rule stored in the shift position rule storage unit 12. At least one of rotation and movement is performed to determine the moving position of the character image.

以下、この文章表示装置は、第4実施形態の文章表示装置と同様の動作を行う。   Hereinafter, this sentence display device performs the same operation as the sentence display device of the fourth embodiment.

上記第5実施形態の文章表示装置は、第1実施形態の文章表示装置と同様の効果を有する。   The sentence display device of the fifth embodiment has the same effect as the sentence display device of the first embodiment.

また、上記文章表示装置によれば、基準位置決定部6により、電子書籍の文章のうちの表示部10に表示される行毎に、その行に含まれる全ての文字に対応する各文字画像に対して夫々外接する複数の矩形枠のうちの最も大きい矩形枠を描画領域の中心に中心が一致するように配置して基準位置とすることによって、その行において、移動位置確定部7により変換された文字画像が必ず基準位置内に含まれるようにできる。   Moreover, according to the said text display apparatus, for every line displayed on the display part 10 of the text of an electronic book by the reference | standard position determination part 6, it is set to each character image corresponding to all the characters contained in the line. On the other hand, the largest rectangular frame out of a plurality of rectangular frames circumscribing each other is arranged so that the center coincides with the center of the drawing area and is used as a reference position, so that the position is converted by the movement position determination unit 7 in that line. It is possible to ensure that the character image is always included in the reference position.

〔第6実施形態〕
図27はこの発明の第6実施形態の電子書籍の文章を表示する文章表示装置のブロック図を示している。この第6実施形態の文章表示装置は、基準文字選択部401,指定文字取得部402を除き第1実施形態の文章表示装置と同一の構成をしており、同一構成部には、同一参照番号を付して説明を省略する。
[Sixth Embodiment]
FIG. 27 shows a block diagram of a text display device for displaying text of an electronic book according to the sixth embodiment of the present invention. The text display device of the sixth embodiment has the same configuration as the text display device of the first embodiment except for the reference character selection unit 401 and the designated character acquisition unit 402, and the same reference numerals are used for the same components. The description is omitted.

基準文字選択部501は、シフト条件情報から1つ前の文字を基準とするか、1つ後の文字を基準とするかを選択する。この基準文字選択部501の選択基準は、シフト条件が下基準位置を利用するものは、対象文字の下の文字を選択し、シフト条件が上基準位置を利用するものは、対象文字の上の文字を選択し、シフト条件が右基準位置のみ利用するものは下の文字を選択し、シフト条件が左基準位置のみ利用するものは上の文字を選択する。但し、上,下の一方に文字がない場合は、存在する方の文字を利用し、ともに存在しない場合は固定の文字(例えば、げた記号“〓”)等を利用する。   The reference character selection unit 501 selects, based on the shift condition information, whether the previous character is used as a reference or the next character is used as a reference. The selection criterion of the reference character selection unit 501 is that the character under the target character is selected when the shift condition uses the lower reference position, and the character under the target character is selected when the shift condition uses the upper reference position. If a character is selected and the shift condition uses only the right reference position, the lower character is selected. If the shift condition uses only the left reference position, the upper character is selected. However, if there is no character on either the upper side or the lower side, the existing character is used, and if both are not present, a fixed character (for example, a garbled symbol “)”) is used.

そして、指定文字取得部502は、基準文字選択部501により選択された文字の文字画像を取得する。   The designated character acquisition unit 502 acquires a character image of the character selected by the reference character selection unit 501.

次に、基準位置決定部6は、指定文字取得部502により取得された文字の文字画像に対して外接する矩形枠に基づいて基準位置を決定する。   Next, the reference position determination unit 6 determines a reference position based on a rectangular frame that circumscribes the character image of the character acquired by the designated character acquisition unit 502.

次に、文字画像変換部の一例としての移動位置確定部7は、基準位置決定部6により決定された基準位置およびシフト位置ルール記憶部12に記憶されたシフト位置ルールに基づいて、文字画像の回転または移動の少なくとも一方を行って文字画像の移動位置を確定する。   Next, the movement position determination unit 7 as an example of the character image conversion unit performs the character image conversion based on the reference position determined by the reference position determination unit 6 and the shift position rule stored in the shift position rule storage unit 12. At least one of rotation and movement is performed to determine the moving position of the character image.

以下、この文章表示装置は、第1実施形態の文章表示装置と同様の動作を行う。   Hereinafter, this text display device performs the same operation as the text display device of the first embodiment.

上記第6実施形態の文章表示装置は、第1実施形態の文章表示装置と同様の効果を有する。   The sentence display device of the sixth embodiment has the same effect as the sentence display device of the first embodiment.

また、上記文章表示装置によれば、電子書籍の文章のうちの表示部10に表示される文字毎に、その文字を挟む前後の文字の一方を基準となる文字として基準位置決定部6により基準位置を決定することによって、少なくとも前または後の文字と局所的にバランスのとれた位置に文字画像を配置することができる。また、基本的に、前後の文字もバランスのとれた配置であるので、結果として全体的にバランスのとれた文字の配置が可能となる。   Moreover, according to the said text display apparatus, for every character displayed on the display part 10 of the text of an electronic book, the reference | standard position determination part 6 makes a reference | standard by the reference position determination part 6 by making one of the characters before and behind the character into a reference | standard By determining the position, the character image can be arranged at a position that is locally balanced with at least the preceding or following character. Basically, the front and rear characters are also arranged in a balanced manner. As a result, it is possible to arrange the characters in a balanced manner as a whole.

上記第1〜第6実施形態では、電子書籍を表示する毎に、文章のフォントに属する全文字のうちの基準となる文字の文字画像に対して外接する矩形枠に基づいて基準位置を決定したが、基準位置決定部により決定された基準位置をフォントとそのフォントのサイズに対応させて記憶する基準位置記憶部を備えてもよい。この場合、次に同一のフォントかつ同一のサイズについては、基準位置記憶部に記憶された基準位置を用いることによって、基準位置決定部により基準位置を決定する必要がなくなり、基準位置を決定する処理を簡略化することができる。   In the first to sixth embodiments, each time an electronic book is displayed, the reference position is determined based on a rectangular frame circumscribing the character image of the reference character among all characters belonging to the font of the sentence. However, a reference position storage unit that stores the reference position determined by the reference position determination unit in association with the font and the size of the font may be provided. In this case, with respect to the same font and the same size next, by using the reference position stored in the reference position storage unit, there is no need to determine the reference position by the reference position determination unit, and the process of determining the reference position Can be simplified.

また、上記基準位置記憶部に基準位置が記憶されたフォントと同一のフォントでかつ基準位置記憶部に基準位置が記憶されていない上記フォントの他のサイズについては、基準位置記憶部に基準位置が記憶されたフォントのサイズにおける1文字あたりの描画領域と上記フォントの他のサイズにおける1文字あたりの描画領域との大きさの割合に基づいて、基準位置決定部によって、基準位置記憶部に記憶された基準位置を拡大または縮小して用いることによって、基準位置決定部により上記基準となる文字の文字画像に対して外接する矩形枠を求める必要がなくなり、基準位置を決定する処理を簡略化できる。   For other sizes of the font that are the same as the font whose reference position is stored in the reference position storage unit and whose reference position is not stored in the reference position storage unit, the reference position is stored in the reference position storage unit. Based on the ratio of the size of the drawing area per character in the size of the stored font and the drawing area per character in the other sizes of the font, the reference position determination unit stores the drawing area in the reference position storage unit. By enlarging or reducing the reference position, it is not necessary to obtain a rectangular frame circumscribing the character image of the reference character by the reference position determination unit, and the process for determining the reference position can be simplified.

例えば、図28に示すように、算出した位置の情報を仮想ボディの左上のコーナーの座標をx=0,y=0とし、左基準位置の座標をx1,右基準位置の座標をx2上基準位置の座標をy1,下基準位置の座標をy2として記憶しておき、フォントサイズ変更(=仮想ボディサイズ変更)時に、その割合に応じて拡大、縮小することで、各フォントサイズの基準位置を算出する(図28では、150%に拡大)。   For example, as shown in FIG. 28, in the calculated position information, the coordinates of the upper left corner of the virtual body are x = 0, y = 0, the coordinates of the left reference position are x1, and the coordinates of the right reference position are the x2 upper reference. The coordinates of the position are stored as y1, and the coordinates of the lower reference position are stored as y2, and when the font size is changed (= virtual body size is changed), the reference position of each font size can be determined by enlarging or reducing it according to the ratio. Calculate (enlarged to 150% in FIG. 28).

これによって、基準位置記憶部に基準位置が記憶されたフォントと同一のフォントでかつ異なるサイズであっても、再計算せず、高速に基準位置の設定が可能となる。また、電子書籍を最初に開いたとき等に1回だけ基準位置の算出を行い、フォント名と関連させて、上記のような座標形式のデータとして基準位置を保管することにより、同一のフォントであれば、異なるサイズについての基準位置を高速に算出することができる。   As a result, even if the font is the same font as the font whose reference position is stored in the reference position storage unit and has a different size, the reference position can be set at high speed without recalculation. Also, when the electronic book is first opened, the reference position is calculated only once and stored in the same font by storing the reference position as data in the coordinate format as described above in association with the font name. If so, the reference positions for different sizes can be calculated at high speed.

例えば、全ての種類のフォントの標準サイズについて算出した基準位置を基準位置記憶部に記憶し、サイズ変更時に上記基準位置記憶部に記憶された基準位置を拡大,縮小したものを用いることにより、基準位置の算出が大幅に簡略化できる。   For example, the reference position calculated for the standard sizes of all types of fonts is stored in the reference position storage unit, and the reference position stored in the reference position storage unit at the time of the size change is enlarged or reduced to use the reference position. The calculation of the position can be greatly simplified.

なお、上記基準位置の取得は、電子書籍を最初に開く時と決める必要がなく、基準位置を取得するときに保存されているデータがある場合は、それを利用し、保存されているデータがない場合は、算出、保存の処理を行うことで、効率的に基準位置計算が可能となる。   The acquisition of the reference position does not need to be determined when the electronic book is opened for the first time. If there is data stored when the reference position is acquired, the stored data is used to acquire the reference position. If there is not, the reference position can be calculated efficiently by performing calculation and storage processing.

上記第1〜第6実施形態では、基準となる文字の文字画像に対して外接する矩形枠の左基準位置と右基準位置から矩形枠の幅を求め、矩形枠の上基準位置と下基準位置から矩形枠の高さを求めて、この幅と高さの矩形枠を仮想ボディの中心に中心が一致するように配置して基準位置としたが、基準となる各文字の左基準位置,右基準位置,上基準位置,下基準位置の座標の平均により「仮想ボディ」内の平均基準位置の矩形枠の配置を決定してもよい。   In the first to sixth embodiments, the width of the rectangular frame is obtained from the left reference position and the right reference position of the rectangular frame that circumscribes the character image of the reference character, and the upper reference position and the lower reference position of the rectangular frame The height of the rectangular frame is calculated from this, and the rectangular frame of this width and height is placed so that the center coincides with the center of the virtual body, and is used as the reference position. The arrangement of the rectangular frame at the average reference position in the “virtual body” may be determined by averaging the coordinates of the reference position, the upper reference position, and the lower reference position.

例えば、フォント自体が左側に偏っている場合、図29に示すように、鍵括弧開き“「”の回転,移動させた位置では、矩形枠を仮想ボディの中心に中心が一致するように配置して基準位置とすると、縦書きでのバランスが悪くなる。これに対して、「仮想ボディ」の左下コーナーを座標基準点として横軸x,縦軸yとして、基準となる各文字の左基準位置,右基準位置のx座標の平均および上基準位置,下基準位置のy座標の平均で定義される矩形枠を平均基準位置に用いることにより、図30に示すように、横書き用フォントを用いて、全体としてのバランスのよいレイアウトの縦書き表示ができる。   For example, when the font itself is biased to the left, as shown in FIG. 29, at the position where the opening and closing of the brackets ““ ”are rotated and moved, the rectangular frame is arranged so that the center coincides with the center of the virtual body. If the reference position is used, the balance in vertical writing will be poor. In contrast, the lower left corner of the “virtual body” is the coordinate reference point, the horizontal axis x, the vertical axis y, the left reference position of each reference character, the average of the x coordinates of the right reference position and the upper reference position, By using a rectangular frame defined by the average of the y-coordinates of the reference position as the average reference position, as shown in FIG. 30, vertical writing display with a well-balanced layout as a whole can be performed using horizontal writing fonts.

また、上記第1〜第6実施形態では、電子書籍の文章を表示する文章表示装置について説明したが、これに限らず、電子メールや書類などの他の文書の文章を表示する文章表示装置にこの発明を適用してもよい。   In the first to sixth embodiments, the sentence display device that displays the text of the electronic book has been described. However, the present invention is not limited to this, and the text display apparatus that displays the text of another document such as an e-mail or a document can be used. You may apply this invention.

また、上記第1〜第6実施形態では、文章を横書き用フォントで縦書き表示する文章表示装置について説明したが、これに限らず、文章を縦書き用フォントで横書き表示する文章表示装置にこの発明を適用してもよい。この場合、縦書き用フォントを用いて、全体としてのバランスのよいレイアウトの横書き表示ができる。   In the first to sixth embodiments described above, the sentence display device that vertically displays a sentence in a horizontal writing font has been described. However, the present invention is not limited to this, and the sentence display apparatus that horizontally displays a sentence in a vertical writing font. The invention may be applied. In this case, horizontal writing with a well-balanced layout as a whole can be performed using vertical writing fonts.

また、上記第1〜第6実施形態では、1種類のフォントで文章が構成されている電子書籍のデータを表示する文章表示装置について説明したが、これに限らず、複数種類のフォントで文章が構成されている電子書籍の文章を表示する文章表示装置にこの発明を適用してもよい。例えば、電子書籍に用いられている全てのフォントのうちの文字数の多い方のフォントについて、基準となる文字の文字画像に対して外接する矩形枠に基づいて基準位置を決定するようにしてもよい。   Moreover, although the said 1st-6th embodiment demonstrated the text display apparatus which displays the data of the electronic book in which the text was comprised by one type of font, it is not restricted to this, A text can be written in multiple types of font. You may apply this invention to the text display apparatus which displays the text of the comprised electronic book. For example, a reference position may be determined based on a rectangular frame circumscribing a character image of a reference character for a font having a larger number of characters among all fonts used in an electronic book. .

また、この発明の文章表示装置は、ハードウェアロジックによって構成してもよいし、次のようにCPUを用いてソフトウェアによって実現してもよい。   The text display device of the present invention may be configured by hardware logic, or may be realized by software using a CPU as follows.

すなわち、この発明の文章表示装置としては、各機能を実現する制御プログラム(文章表示プログラム)の命令を実行するCPU(central processing unit)、上記プログラムを格納したROM(read only memory)、上記プログラムを展開するRAM(random access memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備える。そして、本発明の目的は、上述した機能を実現するソフトウェアである文章表示装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラムなどを含む)をコンピュータで読み取り可能に記録した記録媒体を、文章表示装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。   That is, as the text display device of the present invention, a CPU (central processing unit) that executes instructions of a control program (text display program) that realizes each function, a ROM (read only memory) that stores the program, and the program A RAM (random access memory) to be developed, a storage device (recording medium) such as a memory for storing the program and various data, and the like are provided. An object of the present invention is a recording in which a program code (including an execution format program, an intermediate code program, a source program, etc.) of a control program for a text display device, which is software that realizes the above-described functions, is recorded in a computer-readable manner This can also be achieved by supplying the medium to the text display device and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).

上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ系、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやコンパクトディスク−ROM/MO(光磁気)/MD(ミニディスク)/デジタルビデオディスク/コンパクトディスク−R等の光ディスクを含むディスク系、ICカード(メモリカードを含む)/光カード等のカード系、あるいはマスクROM/EPROM/EEPROM/フラッシュROM等の半導体メモリ系などを用いることができる。   Examples of the recording medium include a tape system such as a magnetic tape and a cassette tape, a magnetic disk such as a floppy (registered trademark) disk / hard disk, and a compact disk-ROM / MO (photomagnetic) / MD (mini disk) / digital video. A disk system including an optical disk such as a disk / compact disk-R, a card system such as an IC card (including a memory card) / optical card, or a semiconductor memory system such as a mask ROM / EPROM / EEPROM / flash ROM, etc. it can.

また、コンピュータを通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークとしては、特に限定されず、例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network:ローカル・エリア・ネットワーク)、ISDN(Integrated Service Digital Network:統合サービス・デジタル・ネットワーク)、VAN(Value Added Network:付加価値通信網)、CATV(Cable Television:ケーブル・テレビジョン)通信網、仮想専用網(virtual private network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、通信ネットワークを構成する伝送媒体としては、特に限定されず、例えば、IEEE(Institute of Electrical and Electronics Engineers)1394、USB(Universal Serial Bus)、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line:非対称デジタル加入者線)回線等の有線でも、IrDA(Infrared Data Association)やリモコンのような赤外線、Bluetooth(登録商標)、802.11無線、HDR(High Data Rate:ハイ・データ・レート)、携帯電話網、衛星回線、地上波デジタル網等の無線でも利用可能である。なお、本発明は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。   The computer may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited. For example, the Internet, intranet, extranet, LAN (Local Area Network), ISDN (Integrated Service Digital Network), VAN ( Value Added Network (CAT), CATV (Cable Television) communication network, virtual private network, telephone line network, mobile communication network, satellite communication network, etc. can be used. . Also, the transmission medium constituting the communication network is not particularly limited. For example, IEEE (Institute of Electrical and Electronics Engineers) 1394, USB (Universal Serial Bus), power line carrier, cable TV line, telephone line, ADSL (Asymmetric (Asymmetric)) Digital Subscriber Line (Asymmetrical Digital Subscriber Line) Even with a wired line such as an IrDA (Infrared Data Association) or remote control, infrared, Bluetooth (registered trademark), 802.11 wireless, HDR (High Data Rate: High Data Rate) Rate), mobile phone network, satellite line, terrestrial digital network, and the like. The present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

また、この発明の文章表示装置、文章表示方法、文章表示プログラムおよびコンピュータ読み取り可能な記録媒体は、日本語に限らず、縦書き表示および横書き表示が可能な中国語や韓国語などの言語で記載された電子書籍の表示に適用することができる。   The sentence display device, the sentence display method, the sentence display program, and the computer-readable recording medium of the present invention are not limited to Japanese, and are described in languages such as Chinese and Korean that can be displayed vertically and horizontally. The present invention can be applied to the display of electronic books that have been made.

この発明の具体的な実施の形態について説明したが、この発明は上記実施の形態に限定されるものではなく、この発明の範囲内で種々変更して実施することができる。   Although specific embodiments of the present invention have been described, the present invention is not limited to the above embodiments, and various modifications can be made within the scope of the present invention.

1…書籍データ取得部
2…レイアウト生成部
3…文字回転・シフト判断部
4…処理内容決定部
5…基準文字取得部
6…基準位置決定部
7…移動位置確定部
8…文字画像配置部
9…画像出力部
10…表示部
11…配置条件テーブル記憶部
12…シフト位置ルール記憶部
105…複数基準文字取得部
106…平均基準位置決定部
205…全文字取得部
305…行中全文字取得部
405…行中最大文字取得部
501…基準文字選択部
502…指定文字取得部
DESCRIPTION OF SYMBOLS 1 ... Book data acquisition part 2 ... Layout production | generation part 3 ... Character rotation / shift judgment part 4 ... Processing content determination part 5 ... Reference character acquisition part 6 ... Reference position determination part 7 ... Movement position determination part 8 ... Character image arrangement part 9 ... Image output unit 10 ... Display unit 11 ... Arrangement condition table storage unit 12 ... Shift position rule storage unit 105 ... Multiple reference character acquisition unit 106 ... Average reference position determination unit 205 ... All character acquisition unit 305 ... All character acquisition unit in line 405: Maximum character acquisition unit in line 501 ... Reference character selection unit 502 ... Designated character acquisition unit

Claims (11)

文章を縦書きまたは横書きで表示する表示部と、
上記表示部に表示される上記文章のうちの所定の文字のフォントとそのフォントのサイズに応じた1文字あたりの描画領域内において、上記所定の文字の文字画像に外接する矩形枠を上記描画領域の中心に中心が一致するように配置して基準位置とする基準位置決定部と、
記基準位置決定部により決定された上記基準位置に基づいて上記描画領域内で回転または移動の少なくとも一方を行うことにより、上記文字画像を変換する文字画像変換部と
上記表示部に表示される上記文章の全文字の上記文字画像であって、かつ、上記文字画像変換部により変換された上記文字画像を含むかまたは含んでいない上記全文字の上記文字画像を、上記基準位置決定部により決定された上記基準位置に基づいて、上記描画領域に配置する文字画像配置部と、
を備えて、
上記文章を横書き用フォントで縦書き表示するとき、または、上記文章を縦書き用フォントで横書き表示するとき、上記文字画像配置部により上記描画領域に配置された上記全文字の上記文字画像を上記表示部に表示するようにしたことを特徴とする文章表示装置。
A display that displays the text vertically or horizontally;
A rectangular frame circumscribing the character image of the predetermined character in the drawing region per character corresponding to the font of the predetermined character of the sentence displayed on the display unit and the size of the font is displayed in the drawing region. A reference position determining unit that is arranged so that the center coincides with the center of
By performing at least one of the rotation or movement in the drawing area based on the reference position determined by the upper Symbol reference position determination unit, a character image converting unit for converting the character image,
The character image of all characters of the sentence displayed on the display unit, and the character image of all characters including or not including the character image converted by the character image conversion unit, Based on the reference position determined by the reference position determination unit, a character image arrangement unit arranged in the drawing area;
With
When the text is displayed vertically in a horizontal font or when the text is displayed horizontally in a vertical font, the character images of all the characters placed in the drawing area by the character image placement section are A sentence display device characterized by being displayed on a display unit.
請求項1に記載の文章表示装置において、
上記基準位置決定部は、上記フォントに属する全文字の文字画像に対して上記基準位置を決定することを特徴とする文章表示装置。
The sentence display device according to claim 1,
The sentence display device, wherein the reference position determination unit determines the reference position for character images of all characters belonging to the font.
請求項1に記載の文章表示装置において、
上記基準位置決定部は、上記文章のうちの上記表示部に表示される行毎に、その行に含まれる全文字の文字画像に対して上記基準位置を決定することを特徴とする文章表示装置。
The sentence display device according to claim 1,
The reference position determination unit determines the reference position for character images of all characters included in the line for each line displayed on the display unit of the sentence. .
請求項1から3までのいずれか1つに記載の文章表示装置において、
上記基準位置決定部は、上記フォントに属する全文字のうちの複数の文字に対応する各文字画像に対して夫々外接する複数の矩形枠の高さの平均および上記複数の矩形枠の幅の平均で表された矩形枠を、上記描画領域の中心に中心が一致するように配置して上記基準位置とすることを特徴とする文章表示装置。
In the sentence display device according to any one of claims 1 to 3,
The reference position determination unit includes an average height of a plurality of rectangular frames circumscribing each character image corresponding to a plurality of characters among all characters belonging to the font and an average of the widths of the plurality of rectangular frames. A text display device characterized in that a rectangular frame represented by (2) is arranged so that the center coincides with the center of the drawing area and is used as the reference position.
請求項1に記載の文章表示装置において、
上記基準位置決定部は、上記文章のうちの上記表示部に表示される行毎に、その行に含まれる全ての文字に対応する各文字画像に対して夫々外接する複数の矩形枠のうちの最も大きい矩形枠を、上記描画領域の中心に中心が一致するように配置して上記基準位置とすることを特徴とする文章表示装置。
The sentence display device according to claim 1,
For each line displayed on the display part of the sentence, the reference position determination unit is a plurality of rectangular frames that circumscribe each character image corresponding to all the characters included in the line. A sentence display device characterized in that the largest rectangular frame is arranged so that the center coincides with the center of the drawing area and is set as the reference position.
請求項1に記載の文章表示装置において、
上記基準位置決定部は、上記文章のうちの上記表示部に表示される文字毎に、その文字を挟む前後の文字の一方の文字画像に対して上記基準位置を決定することを特徴とする文章表示装置。
The sentence display device according to claim 1,
The reference position determining unit determines, for each character displayed on the display unit of the sentence, the reference position with respect to one character image of characters before and after the character. Display device.
請求項1から6までのいずれか1つに記載の文章表示装置において、
上記基準位置決定部により決定された上記基準位置を上記フォントとそのフォントのサイズに対応させて記憶する基準位置記憶部を備えたことを特徴とする文章表示装置。
In the text display device according to any one of claims 1 to 6,
A sentence display device comprising a reference position storage unit that stores the reference position determined by the reference position determination unit in association with the font and the size of the font.
請求項7に記載の文章表示装置において、
上記基準位置決定部は、上記基準位置記憶部に上記基準位置が記憶された上記フォントと同一のフォントでかつ上記基準位置記憶部に上記基準位置が記憶されていない上記フォントの他のサイズについて、上記基準位置記憶部に上記基準位置が記憶された上記フォントのサイズにおける上記1文字あたりの描画領域と上記他のサイズにおける上記1文字あたりの描画領域との大きさの割合に基づいて、上記基準位置記憶部に記憶された上記基準位置を拡大または縮小して用いることを特徴とする文章表示装置。
The sentence display device according to claim 7,
The reference position determination unit is the same font as the font in which the reference position is stored in the reference position storage unit, and other sizes of the font in which the reference position is not stored in the reference position storage unit. Based on the ratio of the size of the drawing area per character in the font size in which the reference position is stored in the reference position storage unit to the drawing area per character in the other size, the reference A sentence display device characterized in that the reference position stored in the position storage unit is used after being enlarged or reduced.
プログラムされたコンピュータが基準位置決定部と文字画像変換部と基準位置記憶部として機能する文章表示方法であって、
表示部に表示される文章のうちの所定の文字のフォントとそのフォントのサイズに応じた1文字あたりの描画領域内において、基準位置決定部により、上記所定の文字の文字画像に外接する矩形枠を上記描画領域の中心に中心が一致するように配置して基準位置とする基準位置決定ステップと、
上記基準位置決定部により決定された上記基準位置に基づいて文字画像変換部により上記描画領域内で回転または移動の少なくとも一方を行うことにより、上記文字画像を変換する文字画像変換ステップと、
上記表示部に表示される上記文章の全文字の上記文字画像であって、かつ、上記文字画像変換部により変換された上記文字画像を含むかまたは含んでいない上記全文字の上記文字画像を、上記基準位置決定部により決定された上記基準位置に基づいて、文字画像配置部により上記描画領域に配置する文字画像配置ステップと、
上記文章を横書き用フォントで縦書き表示するとき、または、上記文章を縦書き用フォントで横書き表示するとき、上記文字画像配置部により上記描画領域に配置された上記全文字の上記文字画像を用いて、上記文章を縦書きまたは横書きで上記表示部に表示する表示ステップと
を含むことを特徴とする文章表示方法。
A sentence display method in which a programmed computer functions as a reference position determination unit, a character image conversion unit, and a reference position storage unit,
A rectangular frame circumscribing the character image of the predetermined character by the reference position determination unit in a drawing area per character corresponding to the font of the predetermined character of the text displayed on the display unit and the size of the font A reference position determining step in which the center is aligned with the center of the drawing area and used as a reference position;
A character image conversion step of converting the character image by performing at least one of rotation or movement in the drawing area by the character image conversion unit based on the reference position determined by the reference position determination unit;
The character image of all characters of the sentence displayed on the display unit, and the character image of all characters including or not including the character image converted by the character image conversion unit, Based on the reference position determined by the reference position determination unit, a character image placement step for placing the character image placement unit in the drawing area;
When the text is displayed vertically in a horizontal font or when the text is displayed horizontally in a vertical font, the character images of all the characters placed in the drawing area by the character image placement unit are used. And a display step of displaying the sentence on the display unit in vertical writing or horizontal writing.
請求項9に記載の文章表示方法の上記各ステップをコンピュータに実行させることを特徴とする文章表示プログラム。   A sentence display program for causing a computer to execute the above steps of the sentence display method according to claim 9. 請求項10に記載の文章表示プログラムを記録したことを特徴とするコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the sentence display program according to claim 10 is recorded.
JP2011127448A 2011-06-07 2011-06-07 Text display device, text display method, text display program, and computer-readable recording medium Active JP5739733B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011127448A JP5739733B2 (en) 2011-06-07 2011-06-07 Text display device, text display method, text display program, and computer-readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011127448A JP5739733B2 (en) 2011-06-07 2011-06-07 Text display device, text display method, text display program, and computer-readable recording medium

Publications (2)

Publication Number Publication Date
JP2012256111A JP2012256111A (en) 2012-12-27
JP5739733B2 true JP5739733B2 (en) 2015-06-24

Family

ID=47527642

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011127448A Active JP5739733B2 (en) 2011-06-07 2011-06-07 Text display device, text display method, text display program, and computer-readable recording medium

Country Status (1)

Country Link
JP (1) JP5739733B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6146442B2 (en) * 2014-11-28 2017-06-14 キヤノンマーケティングジャパン株式会社 Information processing apparatus, information processing method, and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04336683A (en) * 1991-05-14 1992-11-24 Seiko Epson Corp Method and device for correcting character recognition data written vertically
JPH07261735A (en) * 1994-03-23 1995-10-13 Fuji Xerox Co Ltd Converter and conversion method of character pattern data
JPH0895548A (en) * 1994-09-26 1996-04-12 Canon Inc Device and method for outputting character
JPH08263046A (en) * 1995-03-28 1996-10-11 Sony Corp Method and device for displaying character
JP2001134257A (en) * 1999-11-05 2001-05-18 Matsushita Electronics Industry Corp Display device

Also Published As

Publication number Publication date
JP2012256111A (en) 2012-12-27

Similar Documents

Publication Publication Date Title
US10248878B2 (en) Character input method and system as well as electronic device and keyboard thereof
US8855413B2 (en) Image reflow at word boundaries
US8005316B1 (en) System and method for editing image data for media repurposing
US8682642B2 (en) Translation display apparatus
US10169307B2 (en) Method and system for the use of adjustment handles to facilitate dynamic layout editing
AU2013225479B2 (en) Application display method and terminal
AU2004218699A1 (en) Method and system for selecting and manipulating multiple objects
CN1692399A (en) Text display terminal device and server
CN112614211B (en) Method and device for text and image self-adaptive typesetting and animation linkage
US20160026376A1 (en) Grid-based visual design environment
CN110457102B (en) Visual object blurring method, visual object rendering method and computing equipment
US8898561B2 (en) Method and device for determining a display mode of electronic documents
WO2023155811A1 (en) Page layout adjustment method and apparatus
US9286668B1 (en) Generating a panel view for comics
JP5290433B2 (en) Display processing device, display processing device control method, control program, and computer-readable recording medium recording control program
WO2013084522A1 (en) Display device, display device control method, control program, and recording medium
JP2010074292A (en) Image processor, image display system, and program
US20110320933A1 (en) Editing apparatus, layout editing method performed by editing apparatus, and storage medium storing program
JP5739733B2 (en) Text display device, text display method, text display program, and computer-readable recording medium
CN104424174B (en) Document processing system and document processing method
JP2007047942A (en) Data display method, data display device, and program
US9088734B2 (en) Method, system and apparatus for determining position of a watermark annotation
US20110234908A1 (en) Video Processing Method and Video Processing System
JP2010218522A (en) Web page display method using plug-in of browser
JP2005107602A (en) Three-dimensional image drawing device and three-dimensional image drawing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140401

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141028

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141031

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141210

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141215

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150331

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150424

R150 Certificate of patent or registration of utility model

Ref document number: 5739733

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150