JP2016200704A - Information processor and control method thereof, computer program, and recording medium - Google Patents

Information processor and control method thereof, computer program, and recording medium Download PDF

Info

Publication number
JP2016200704A
JP2016200704A JP2015080438A JP2015080438A JP2016200704A JP 2016200704 A JP2016200704 A JP 2016200704A JP 2015080438 A JP2015080438 A JP 2015080438A JP 2015080438 A JP2015080438 A JP 2015080438A JP 2016200704 A JP2016200704 A JP 2016200704A
Authority
JP
Japan
Prior art keywords
font
character
drawn
size
bitmap
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2015080438A
Other languages
Japanese (ja)
Inventor
友宣 中村
Tomonori Nakamura
友宣 中村
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2015080438A priority Critical patent/JP2016200704A/en
Publication of JP2016200704A publication Critical patent/JP2016200704A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To solve the problem that legibility sometimes deteriorates in the conventional practice because the sizes of characters become irregular when a character string with characters that should be drawn in a bitmap font and characters that should be drawn in a scalable font mixed is drawn.SOLUTION: An information processor for using a scalable font and a bitmap font to draw a character string in order to solve the problem includes an acquisition part 111 for acquiring a font size designated in a character string to be a drawing object, a determination part 113 for determining a font size for drawing characters to be a drawing object by the scalable font on the basis of a prescribed font size determined in the bitmap font and the acquired font size in the case that the drawing object by the bitmap font and the drawing object by the scalable font are mixed in a character string to be the drawing object, and a drawing part 114 for drawing a character string to be the drawing object.SELECTED DRAWING: Figure 1

Description

本発明はフォントを用いて文字を描画する処理に関する。   The present invention relates to a process of drawing a character using a font.

表示デバイスに文字を描画するために用いるフォントには、ビットマップフォントとスケーラブルフォントという2種類のデータ形式が存在する。ビットマップフォントとは、文字の形状を所定サイズの格子内に配置されたドットの集合として保持する形式である。一方でスケーラブルフォントの場合、文字の形状はベクタデータとして保持されており、指定されたサイズに合わせて描画するため、原理上あらゆるサイズを表現可能である。しかし、小さいサイズをスケーラブルフォントで描画すると、漢字の様に線が多い文字では線同士の隙間が無くなり文字が潰れて可読性が落ちるという問題がある。そのため、スケーラブルフォントを利用した文字列の中でも、小さいサイズの文字を描画する場合には、ビットマップフォントを使うこともある。その結果、描画対象となるひとつの文字列に、ビットマップフォントで描画すべき文字と、スケーラブルフォントで描画すべき文字が混在する、という状況が発生しえる。例えば、漢字とアルファベットが混在するような場合である。   There are two types of data formats used for drawing characters on a display device: bitmap fonts and scalable fonts. Bitmap font is a format that holds the shape of a character as a set of dots arranged in a grid of a predetermined size. On the other hand, in the case of a scalable font, the shape of a character is held as vector data and is drawn according to a specified size, so that any size can be expressed in principle. However, when a small size is drawn with a scalable font, there is a problem that a character having many lines such as kanji has no gap between the lines and the characters are crushed and the readability is lowered. For this reason, a bitmap font may be used when drawing a character having a small size among character strings using a scalable font. As a result, there may occur a situation in which characters to be drawn with a bitmap font and characters to be drawn with a scalable font are mixed in one character string to be drawn. For example, a case where kanji and alphabet are mixed.

ビットマップフォントは、その性質上、複数のフォントサイズでの文字の描画を可能とするためには、各フォントサイズ用の文字データを個別に用意する必要がある。しかしながら組み込み機器のような低リソース環境では、ビットマップフォントも最低限のサイズバリエーションしか組み込めないことがある。従って、ビットマップフォントで描画すべき文字列に対して指定されたフォントサイズが、当該ビットマップフォントの備えるサイズバリエーションのいずれとも合致しない場合がある。そのような場合、一般的には、サイズバリエーションの中で指定されたフォントサイズに最も近いフォントサイズで描画することが行われる。しかしながら、描画対象となる文字列にビットマップフォントで描画すべき文字と、スケーラブルフォントで描画すべき文字が混在する場合、文字列の途中でフォントサイズが変わってしまう。例えば、文字列全体に32ドットが指定されたとしても、ビットマップフォントが対応可能なフォントサイズが24ドットのみであれば、ビットマップフォントは24ドット、スケーラブルフォントは32ドットというフォントサイズで描画される。このように異なるフォントサイズの文字が文字列の中に混在してしまうことで、可読性が低下する場合がある。   Due to the nature of bitmap fonts, it is necessary to prepare character data for each font size individually in order to be able to draw characters with a plurality of font sizes. However, in a low-resource environment such as an embedded device, bitmap fonts can sometimes be incorporated with a minimum size variation. Therefore, the font size specified for the character string to be drawn with the bitmap font may not match any of the size variations of the bitmap font. In such a case, drawing is generally performed with a font size closest to the font size specified in the size variation. However, if a character string to be drawn includes characters to be drawn with a bitmap font and characters to be drawn with a scalable font, the font size changes in the middle of the character string. For example, even if 32 dots are specified for the entire character string, if the font size that can be handled by the bitmap font is only 24 dots, the bitmap font is drawn with a font size of 24 dots and the scalable font is drawn with a font size of 32 dots. The In this way, characters having different font sizes are mixed in the character string, so that readability may be deteriorated.

特許文献1では、表示・印刷しようとする文字について、所定サイズのドットパターンに展開した後、これを指定された拡縮サイズで拡大・縮小することで、任意のフォントサイズを再現することが提案されている。   In Patent Document 1, it is proposed to reproduce an arbitrary font size by expanding a character pattern to be displayed / printed into a dot pattern of a predetermined size and then enlarging / reducing it with a specified enlargement / reduction size. ing.

特開平5−27743号公報Japanese Patent Laid-Open No. 5-27743

所定サイズのビットマップフォントを拡大・縮小することによれば、任意のフォントサイズで描画されるスケーラブルフォントとフォントサイズを揃えることが可能となる。しかしながら、2値ビットマップフォントを非整数倍に拡大した場合、可読性が低下することを防ぐために、アンチエイリアス処理等のグレースケール化が必要となる場合がある。しかしながら、特定の国ではビットマップフォントには認可が必要であり、その制約によっては、2値ビットマップフォントを拡大してアンチエイリアス処理等によりグレースケール化するのは許されない場合ある。   By enlarging / reducing a bitmap font of a predetermined size, it is possible to align the font size with a scalable font drawn with an arbitrary font size. However, when the binary bitmap font is enlarged to a non-integer multiple, gray scale conversion such as anti-aliasing may be necessary to prevent deterioration of readability. However, authorization is required for bitmap fonts in certain countries, and depending on the restrictions, it may not be allowed to enlarge the binary bitmap font and make it grayscale by anti-aliasing or the like.

本発明は上記課題に鑑みてなされたものであり、ビットマップフォントで描画すべき文字と、スケーラブルフォントで描画すべき文字が混在した文字列を描画する際のフォントの可読性を向上することを主な目的とする。   The present invention has been made in view of the above problems, and it is mainly intended to improve the readability of a font when drawing a character string in which characters to be drawn with a bitmap font and characters to be drawn with a scalable font are mixed. With a purpose.

上記の目的を達成するために、本発明は、スケーラブルフォントと、文字の描画に使用可能な所定のフォントサイズが定められたビットマップフォントとを用いて文字列を描画する情報処理装置であって、描画対象となる文字列に指定されているフォントサイズを取得する取得手段と、前記描画対象となる文字列に、前記ビットマップフォントによる描画対象となる文字と、前記スケーラブルフォントによる描画対象となる文字とが混在する場合、前記ビットマップフォントに定められた所定のフォントサイズと、前記取得手段によって取得されたフォントサイズとに基づいて、前記スケーラブルフォントによる描画対象となる文字を描画するフォントサイズを決定する決定手段と、前記描画対象となる文字列のうち、前記ビットマップフォントによる描画対象となる文字を、前記ビットマップフォントに定められた所定のフォントサイズのいずれかで描画し、前記スケーラブルフォントによる描画対象となる文字を、前記決定手段によって決定されたフォントサイズで描画する描画手段と、を備える。   In order to achieve the above object, the present invention provides an information processing apparatus that draws a character string using a scalable font and a bitmap font in which a predetermined font size that can be used for character drawing is defined. An acquisition means for acquiring a font size specified for a character string to be rendered; and a character to be rendered by the bitmap font and a character to be rendered by the scalable font in the character string to be rendered. When characters are mixed, the font size for drawing the character to be drawn by the scalable font is set based on the predetermined font size determined for the bitmap font and the font size acquired by the acquisition unit. Determining means for determining, and among the character strings to be drawn, the bitmap format. The character to be drawn by the user is drawn at one of the predetermined font sizes defined in the bitmap font, and the character to be drawn by the scalable font is drawn at the font size determined by the determining means. Drawing means.

本発明によれば、ビットマップフォントで描画すべき文字と、スケーラブルフォントで描画すべき文字が混在した文字列を描画する際のフォントの可読性を向上させることができる。   ADVANTAGE OF THE INVENTION According to this invention, the readability of the font at the time of drawing the character string which mixed the character which should be drawn with a bitmap font, and the character which should be drawn with a scalable font can be improved.

第1の実施形態に係る情報処理装置の構成の一例を表す図The figure showing an example of the composition of the information processor concerning a 1st embodiment 文字列を描画する処理の一例を表すフローチャートA flowchart showing an example of processing for drawing a character string 描画される文字列の具体例を表す図A figure showing a specific example of a character string to be drawn 変形例係る情報処理装置の機能構成の一例を表す図The figure showing an example of the functional composition of the information processor concerning a modification 変形例1において文字列を描画する処理の一例を表すフローチャートThe flowchart showing an example of the process which draws a character string in the modification 1. 描画される文字列の具体例を表す図A figure showing a specific example of a character string to be drawn 変形例2において文字列を描画する処理の一例を表すフローチャートThe flowchart showing an example of the process which draws a character string in the modification 2. 描画される文字列の具体例を表す図A figure showing a specific example of a character string to be drawn 変形例3において文字列を描画する処理の一例を表すフローチャートThe flowchart showing an example of the process which draws a character string in the modification 3.

以下、添付図面を参照して本発明に係る実施の形態を詳細に説明する。ただし、この実施の形態に記載されている構成要素はあくまでも例示であり、本発明の範囲をそれらのみに限定する趣旨のものではない。   Embodiments according to the present invention will be described below in detail with reference to the accompanying drawings. However, the constituent elements described in this embodiment are merely examples, and are not intended to limit the scope of the present invention only to them.

<第1の実施形態>
第1の実施形態では、複数のフォントによって文字列を描画可能な場合に、文字列を描画する表示画面における位置を、指定されたフォントと、使用される頻度の高いとみなされるフォントのうち少なくとも1つ以上のフォントの情報に基づいて決定する。
<First Embodiment>
In the first embodiment, when a character string can be drawn with a plurality of fonts, the position on the display screen for drawing the character string is set to at least one of a designated font and a font that is considered to be used frequently. It is determined based on information of one or more fonts.

図1(a)は本実施例に係る情報処理装置100の概要を示した構成図である。CPU(Central Processing Unit)101は、システム制御部であり、システムバス108を介して、接続された各要素を制御する。ROM(Read−Only Memory)102は、CPUの制御プログラムや、情報処理装置100が描画可能なフォントのデータなど各種固定データを格納するものである。RAM(Random Access Memory)103は、SRAM、DRAM等で構成され、プログラム制御変数等を格納するためのものである。また、各種指定パラメータ、各種ワーク用バッファもRAM103に格納されるものである。記憶装置104はハードディスク等で構成され、文書や画像などのファイルデータを格納するためのものである。入力部105は、キーボード、タッチパネル等で構成され、操作者が各種入力操作を行うためのものである。表示部106は、LCD、LED等で操作者に表示通知するためのものである。通信インターフェース107は、ネットワークに接続するためのインターフェースである。接続方法としてはLAN、USB等がある。本実施形態では、入力部105を用いた文字入力の他に、ネットワークを介してインターネット上のサーバ装置に保存されたWEBページなどの構造化文書を読み込んで解析することによっても、描画対象となる文字列を取得することができる。図1(a)に示した構成は、本発明の実施例に係る情報処理装置の一部を示したものであり、装置によっては、この他、スキャナ部、プリンタ部、モデム、スピーカ等が装置の構成に加わる場合がある。また、各構成要素は、必ずしも装置内で接続される構成に限定されず、各種インターフェースを介して接続された外部装置であっても構わない。   FIG. 1A is a configuration diagram illustrating an overview of an information processing apparatus 100 according to the present embodiment. A CPU (Central Processing Unit) 101 is a system control unit, and controls each connected element via a system bus 108. A ROM (Read-Only Memory) 102 stores various fixed data such as a CPU control program and font data that can be rendered by the information processing apparatus 100. A RAM (Random Access Memory) 103 is composed of SRAM, DRAM, and the like, and stores program control variables and the like. Various designated parameters and various work buffers are also stored in the RAM 103. The storage device 104 is composed of a hard disk or the like, and stores file data such as documents and images. The input unit 105 includes a keyboard, a touch panel, and the like, and is used by an operator to perform various input operations. The display unit 106 is used to notify the operator of display using an LCD, LED, or the like. The communication interface 107 is an interface for connecting to a network. Connection methods include LAN, USB, and the like. In the present embodiment, in addition to character input using the input unit 105, a structured document such as a WEB page saved in a server device on the Internet via a network is read and analyzed to be a drawing target. You can get a string. The configuration shown in FIG. 1A shows a part of an information processing apparatus according to an embodiment of the present invention. Depending on the apparatus, a scanner unit, a printer unit, a modem, a speaker, and the like may be used. You may join in the configuration. In addition, each component is not necessarily limited to a configuration connected in the apparatus, and may be an external apparatus connected through various interfaces.

図1(b)は、情報処理装置100の機能構成の一例を示すブロック図である。各機能部は、CPU101が、ROM102に格納されたプログラムをRAM103に展開し、後述する各フローチャートに従った処理を実行することで実現されている。ただし、本発明は、これらの機能部をハードウェアで実現する情報処理装置によっても同様に実現可能である。以下、各要素について説明する。   FIG. 1B is a block diagram illustrating an example of a functional configuration of the information processing apparatus 100. Each functional unit is realized by the CPU 101 developing a program stored in the ROM 102 in the RAM 103 and executing processing according to each flowchart described later. However, the present invention can be similarly realized by an information processing apparatus that implements these functional units by hardware. Hereinafter, each element will be described.

文字列情報取得部111は、入力部105を介してユーザ操作により入力された指示に従ったり、構造化文書を読み込んで解析したりすることで、表示部106が表示する表示画面を構成する要素から、描画対象となる文字列を表す情報を取得する。なお、本実施形態において文字列とは、少なくとも1以上の単語で構成される小単位である。ユーザの1入力、あるいは文章表記上の1行、を一単位としてもよいし、文章の意味的な分割に従って1つずつ抽出されてもよい。本実施形態では、描画対象である画像の構成要素として、文字列が複数存在する場合でも、要素ごとに文字列の情報を取得し、描画処理を行うことを繰り返すとする。以下では、入力された文字列を単に「入力文字列」と称する。   The character string information acquisition unit 111 is an element constituting a display screen displayed by the display unit 106 by following an instruction input by a user operation via the input unit 105 or by reading and analyzing a structured document. To obtain information representing a character string to be rendered. In the present embodiment, the character string is a small unit composed of at least one word. One input from the user or one line on the sentence notation may be taken as one unit, or may be extracted one by one according to the semantic division of the sentence. In the present embodiment, it is assumed that even when there are a plurality of character strings as constituent elements of an image to be rendered, it is assumed that character string information is acquired for each element and rendering processing is repeated. Hereinafter, the input character string is simply referred to as “input character string”.

また、文字列情報取得部111は、入力部105を介してユーザ操作により入力された指示に従ったり、構造化文書を読み込んで解析したりすることで、描画対象となる文字列に対して、見た目を規定するために指定された描画指定情報を取得する。本実施形態では、少なくとも、描画対象の文字列を構成する文字について指定された1以上のフォントとその種類、そして該フォントについて指定されたフォントサイズを取得する。ここでフォントの種類には、ビットマップフォント及びスケーラブルフォントの2種類が含まれる。例えば、入力文字列がWebページ内の文字列であれば、Webページを構成するHTMLやCSS、更には、Webページを表示するWebブラウザに設定された情報に基づいて、必要に応じて計算処理を行う。処理結果として、描画に用いるべきフォントの種類とフォントサイズを取得する。   In addition, the character string information acquisition unit 111 follows the instruction input by the user operation via the input unit 105, or reads and analyzes the structured document, so that the character string to be drawn is analyzed. The drawing designation information designated for defining the appearance is acquired. In the present embodiment, at least one or more fonts specified for characters constituting the character string to be drawn, their types, and the font size specified for the font are acquired. Here, the font types include two types, bitmap fonts and scalable fonts. For example, if the input character string is a character string in a Web page, calculation processing is performed as necessary based on HTML and CSS that configure the Web page, and information set in a Web browser that displays the Web page. I do. As a processing result, a font type and a font size to be used for drawing are acquired.

描画可能サイズ取得部112は、保持部115に保持されている情報を参照し、入力文字列の各文字の文字コードの字形データを持つフォントの種類を特定し、特定されたフォントによる描画が可能な1段階以上のフォントサイズを取得する。ここで、ある文字についてスケーラブルフォントが特定された場合、描画が可能なフォントサイズは、あらゆるフォントサイズとなる。例えば、任意のフォントサイズに対応可能であることを示す情報が取得される。一方、ビットマップフォントが特定された場合は、当該ビットマップフォントに、文字の描画に使用可能なフォントサイズとして設定された所定のフォントサイズを取得する。本実施形態において、ビットマップフォントに定められた所定のフォントサイズは、予め、当該フォントで描画可能なフォントサイズとして定められた不連続な1段階以上のフォントサイズである。例えば、12、16、及び24といった飛び飛びの値に対応する。描画可能サイズ取得部112は、例えば1段階以上のフォントサイズが一覧化されたテーブル、あるいはそのようなテーブルの場所を示す情報等を取得する。以下では、あるビットマップフォント描画可能なフォントサイズとして定められた所定のフォントサイズを、該ビットマップフォントに予め定められた「描画可能サイズ」と称する。   The drawable size acquisition unit 112 refers to the information held in the holding unit 115, specifies the type of font having the character code data of the character code of the input character string, and can draw with the specified font Get one or more font sizes. Here, when a scalable font is specified for a certain character, the font size that can be drawn is any font size. For example, information indicating that an arbitrary font size can be supported is acquired. On the other hand, when a bitmap font is specified, a predetermined font size set as a font size that can be used for drawing a character is acquired for the bitmap font. In the present embodiment, the predetermined font size determined for the bitmap font is a discontinuous one or more stage font size determined in advance as a font size that can be drawn with the font. For example, it corresponds to jump values such as 12, 16, and 24. The drawable size acquisition unit 112 acquires, for example, a table in which one or more font sizes are listed, or information indicating the location of such a table. Hereinafter, a predetermined font size that is determined as a font size that can be drawn with a certain bitmap font is referred to as a “drawable size” that is predetermined for the bitmap font.

決定部113は、入力文字列の各文字を描画するフォントサイズを決定する。入力文字列にビットマップフォントの描画対象となる文字とスケーラブルフォントの描画対象となる文字が混在する場合、フォントの種類毎に描画に用いるフォントサイズを決定する。詳細な処理の内容は後述する。   The determination unit 113 determines a font size for drawing each character of the input character string. When a character to be drawn with a bitmap font and a character to be drawn with a scalable font are mixed in the input character string, the font size used for drawing is determined for each type of font. Details of the processing will be described later.

描画部114は、決定部113が決定したフォントサイズで、文字列取得部111が取得した入力文字列の各文字を描画する。本実施形態では、描画対象である画像の構成要素として、文字列が複数存在する場合、要素ごとの文字列の描画を繰り返し行うことで段階的に画像を描画する。ただし、画像全体の文字列に関して順次フォントサイズを決定する処理を決定し、全体の描画処理を実行する形式としても構わない。保持部115は、情報処理装置100で描画可能な複数のフォントのフォントデータを保持している。フォントデータには、字形データやグリフインデックスの配列情報が含まれる。本実施形態の情報処理装置100では、少なくとも1以上のビットマップフォント形式のフォントの情報と、少なくとも1以上のスケーラブルフォント形式のフォントの情報が含まれる。ただし、説明の簡単のため、以下では、本実施形態の処理に係るビットマップフォントとスケーラブルフォントは、それぞれ特定の1種類を用いるものとする。   The drawing unit 114 draws each character of the input character string acquired by the character string acquisition unit 111 with the font size determined by the determination unit 113. In this embodiment, when there are a plurality of character strings as the constituent elements of the image to be drawn, the image is drawn stepwise by repeatedly drawing the character string for each element. However, it is possible to determine a process for sequentially determining the font size for the character string of the entire image and execute the entire drawing process. The holding unit 115 holds font data of a plurality of fonts that can be drawn by the information processing apparatus 100. Font data includes glyph data and glyph index arrangement information. The information processing apparatus 100 according to the present embodiment includes at least one font font format font information and at least one scalable font format font information. However, for the sake of simplicity, hereinafter, it is assumed that one specific type of bitmap font and scalable font according to the processing of this embodiment is used.

図2は、本実施形態に係る情報処理装置100が実行する、文字列を描画する処理の流れを示すフローチャートの一例である。本実施形態では、情報処理装置100において入力部105によって文字入力される、又は通信I/F107を介して構造化文書の情報が受信される等、描画対象となる入力文字列が情報処理装置に入力されたことに応じ、図2のフローチャートが実行される。   FIG. 2 is an example of a flowchart illustrating a flow of processing for drawing a character string, which is executed by the information processing apparatus 100 according to the present embodiment. In the present embodiment, an input character string to be rendered is input to the information processing apparatus, such as text input by the input unit 105 in the information processing apparatus 100 or information on a structured document received via the communication I / F 107. In response to the input, the flowchart of FIG. 2 is executed.

ステップS201では、文字列取得部111が、描画対象となる文字列の情報を取得する。本実施形態では、表示部106に表示させる画像の構成要素として複数の文字列が含まれる場合、文字列毎に描画処理を繰り返すことで全体の描画を行う。従って、ステップS201では描画処理の単位となる文字列が取得される。ステップS201では、入力文字列を構成する文字の1つ1つについて、見た目を定義する描画情報を取得する。本実施形態で取得される描画情報には、少なくともフォントの種類を特定する情報と、フォントサイズが含まれる。その他、フォントの色など装飾を施すための情報が含まれていても構わない。   In step S201, the character string acquisition unit 111 acquires information on a character string to be drawn. In this embodiment, when a plurality of character strings are included as components of an image to be displayed on the display unit 106, the entire drawing is performed by repeating the drawing process for each character string. Therefore, in step S201, a character string that is a unit of drawing processing is acquired. In step S201, drawing information defining the appearance is acquired for each of the characters constituting the input character string. The drawing information acquired in the present embodiment includes at least information for specifying the font type and the font size. In addition, information for decoration such as font color may be included.

ステップS202では、決定部113が、文字列取得部111が取得した情報を解析し、入力文字列にビットマップフォントによる描画対象となる文字とスケーラブルフォントによる描画対象となる文字が混在しているかを判定する。入力文字列にビットマップフォントによる描画対象となる文字とスケーラブルフォントによる描画対象となる文字が混在していると判定された場合(ステップS202でYes)、ステップS203に進む。入力文字列にビットマップフォントによる描画対象となる文字とスケーラブルフォントによる描画対象となる文字が混在しないと判定された場合(ステップS202でNo)、ステップS208に進む。   In step S202, the determination unit 113 analyzes the information acquired by the character string acquisition unit 111, and determines whether a character to be drawn with a bitmap font and a character to be drawn with a scalable font are mixed in the input character string. judge. If it is determined that the character to be drawn with the bitmap font and the character to be drawn with the scalable font are mixed in the input character string (Yes in step S202), the process proceeds to step S203. If it is determined that the character to be drawn with the bitmap font and the character to be drawn with the scalable font are not mixed in the input character string (No in step S202), the process proceeds to step S208.

ステップS203では、描画可能サイズ取得部112が、入力文字列を構成する各文字の文字コードに対応する字形データを持つビットマップフォントに、予め定められた描画可能サイズを取得する。1つのビットマップフォントには、1以上の不連続なフォントサイズが描画可能サイズとして定められる。ここでいう不連続とは、値が飛び飛びであることの他に、上限と下限の間に値が限定されるなど、フォントデータを保持するリソースを効率的に利用するために、文字データを保持するフォントサイズが限定されている場合を全て含む。   In step S203, the drawable size acquisition unit 112 acquires a predetermined drawable size for a bitmap font having character data corresponding to the character code of each character constituting the input character string. For one bitmap font, one or more discontinuous font sizes are defined as drawable sizes. The term “discontinuity” as used here means that character data is retained in order to efficiently use resources that retain font data, such as the value being skipped and the value being limited between the upper and lower limits. All cases where the font size is limited.

ステップS204では、決定部113が、ステップS201で取得した指定されたフォントサイズが、ステップS203で取得したビットマップフォントの描画可能サイズに含まれる最小のサイズより大きいか判定する。指定されたサイズが取得した描画可能サイズのうち最小のフォントサイズより大きいと判定された場合(ステップS204でYes)、ステップS205に進む。指定されたサイズが取得した描画可能サイズのうち最小のフォントサイズ以下であると判定された場合(ステップS204でNo)、ステップS208に進む。   In step S204, the determination unit 113 determines whether the designated font size acquired in step S201 is larger than the minimum size included in the drawable size of the bitmap font acquired in step S203. When it is determined that the specified size is larger than the minimum font size of the acquired drawable sizes (Yes in step S204), the process proceeds to step S205. If it is determined that the specified size is equal to or smaller than the minimum font size of the acquired drawable sizes (No in step S204), the process proceeds to step S208.

ステップS205では、決定部113が、指定されたフォントサイズが、取得した1以上の描画可能サイズのうち、指定されたフォントサイズより小さい範囲で最大のフォントサイズより所定の閾値以上大きいかを判定する。ここでは所定の閾値を閾値Aとする。ステップS205の処理に利用される閾値Aは、隣り合うビットマップフォントとスケーラブルフォントの大きさの違いが、可読性やデザイン性の低下を生じさせる可能性があるかを判定するための基準であって、予め表示環境等に応じた適切な値が設定される。指定されたフォントサイズが、取得した1以上の描画可能サイズのうち、指定されたフォントサイズより小さい範囲で最大のフォントサイズより閾値A以上大きいと判定された場合(ステップS205でYes)、ステップS206に進む。指定されたフォントサイズが、取得した1以上の描画可能サイズのうち、指定されたフォントサイズより小さい範囲で最大のフォントサイズより閾値A以上大きくはないと判定された場合(ステップS205でNo)、ステップS208に進む。   In step S205, the determination unit 113 determines whether the designated font size is larger than the maximum font size by a predetermined threshold or more in a range smaller than the designated font size among the obtained one or more drawable sizes. . Here, a predetermined threshold value is set as a threshold value A. The threshold A used in the process of step S205 is a criterion for determining whether a difference in size between adjacent bitmap fonts and scalable fonts may cause deterioration in readability or designability. An appropriate value according to the display environment or the like is set in advance. If it is determined that the specified font size is larger than the maximum font size within a range smaller than the specified font size among the acquired one or more drawable sizes (Yes in step S205), step S206 Proceed to When it is determined that the designated font size is not larger than the maximum font size in the range smaller than the designated font size among the obtained one or more drawable sizes (No in step S205). Proceed to step S208.

ステップS206では、決定部113が、スケーラブルフォントを描画するフォントサイズとして、取得した描画可能サイズのうち、指定されたフォントサイズより小さい範囲で最大のフォントサイズを採用する。ステップS207では、描画部114が、ステップS206或いはステップS208で決定したサイズでスケーラブルフォントとビットマップフォントの入力文字列を描画し、一連の処理は終了する。さらに描画対象の文字列が入力されれば、ステップS201からの処理が繰り返される。ステップS208では、決定部113が、スケーラブルフォントのサイズとして、ステップS201で取得したフォントサイズを採用する。   In step S206, the determination unit 113 employs the maximum font size in a range smaller than the designated font size among the acquired drawable sizes as the font size for drawing the scalable font. In step S207, the drawing unit 114 draws the input character string of the scalable font and the bitmap font with the size determined in step S206 or step S208, and the series of processing ends. If a character string to be drawn is further input, the processing from step S201 is repeated. In step S208, the determination unit 113 adopts the font size acquired in step S201 as the size of the scalable font.

ここで図3は、描画される文字列の具体例を表す図である。各図は、表示部106に3つの入力文字列を表示しており、図3(a)は本実施形態に係るスケーラブルフォントのサイズ調整処理を行わない場合を、図3(b)は、本実施形態にスケーラブルフォントのサイズ調整処理を実行する場合に相当する。入力文字列は3つあり、それぞれ「大LARGE」、「中MEDIUM」、及び「小SMALL」である。漢字の描画に利用されるビットマップフォントには、予め描画可能サイズとして12、16、及び24の複数のフォントサイズが定められている。描画を行うにあたり指定されたフォントサイズは、それぞれ「大LARGE」が32、「中MEDIUM」が20、及び「小SMALL」が10であるとする。   Here, FIG. 3 is a diagram illustrating a specific example of a character string to be drawn. In each drawing, three input character strings are displayed on the display unit 106. FIG. 3A shows a case where the scalable font size adjustment processing according to the present embodiment is not performed, and FIG. This corresponds to the case where the scalable font size adjustment processing is executed in the embodiment. There are three input character strings, “Large LARGE”, “Medium MEDIUM”, and “Small SMALL”, respectively. In bitmap fonts used for drawing Chinese characters, a plurality of font sizes of 12, 16, and 24 are determined in advance as drawable sizes. Assume that the font size specified for drawing is 32 for “Large LARGE”, 20 for “Medium MEDIUM”, and 10 for “Small SMALL”.

図3(a)の場合、「LARGE」、「MEDIUM」、及び「SMALL」はラテン文字のためスケーラブルフォントによる描画対象となる。従って、これらは指定されたフォントサイズ(32、20、10)で描画されている。一方「大」、「中」、及び「小」は漢字のため、ビットマップフォントによる描画対象となる。この例で使用されるビットマップフォントの描画可能サイズは12、16、及び24であって、各入力文字列に指定されたフォントサイズが含まれない。従って、描画可能サイズの中で最も指定されたフォントサイズに近く、かつ指定サイズより小さい値が選ばれ、それぞれ「大」が24、「中」が16、及び「小」が12で描画されている。全ての文字列において、フォントの境界部分にフォントサイズの大きな違いが生じ閲覧者に違和感を与えたり、可読性を低下させたりする可能性がある。   In the case of FIG. 3A, since “LARGE”, “MEDIAUM”, and “SMALL” are Latin characters, they are drawn with a scalable font. Therefore, they are drawn with the designated font size (32, 20, 10). On the other hand, “Large”, “Medium”, and “Small” are kanji characters, and are therefore rendered with a bitmap font. The bitmap fonts used in this example have drawable sizes of 12, 16, and 24, and the font size specified for each input character string is not included. Therefore, a value close to the designated font size and smaller than the designated size is selected from among the drawable sizes, and “large” is drawn at 24, “medium” at 16, and “small” is drawn at 12. Yes. In all character strings, there is a possibility that a large difference in font size will occur at the boundary between the fonts, giving the viewer a sense of incongruity or reducing readability.

図3(b)は、図3(a)と同じ条件で入力された3つの文字列について、図2のフローチャートで説明した処理により、スケーラブルフォントのサイズをビットマップフォントに合わせる調整を行った場合の表示結果である。なお、ステップS205の閾値Aは1とする。   FIG. 3B shows a case in which the size of the scalable font is adjusted to the bitmap font for the three character strings input under the same conditions as in FIG. Is the display result. Note that the threshold A in step S205 is 1.

まず「大LARGE」については、指定サイズとして32が取得される(ステップS201)。「大LARGE」にはビットマップフォントによる描画対象となる文字とスケーラブルフォントによる描画対象となる文字が混在しているので、ビットマップフォントの描画可能サイズである12、16、及び24を示す情報が取得される(ステップS203)。指定サイズである32は、ビットマップフォントで描画可能な最小サイズである12より大きい(ステップS204でYes)。また指定サイズである32は、ビットマップフォントで描画可能な1段階以上のフォントサイズのうち、32より小さい範囲で最大サイズのフォントサイズである24より、閾値Aである1以上大きい(ステップS205でYes)。従って「大LARGE」のうちスケーラブルフォントの描画対象である「LARGE」部分を描画するフォントサイズとして、24が採用される(ステップS206)。24は、ビットマップフォントで描画可能な1段階以上のフォントサイズのうち、指定サイズである32より小さい範囲で最大サイズのフォントサイズである。結果として、「大LARGE」はビットマップフォントもスケーラブルフォントもフォントサイズ24で描画される(ステップS207)。   First, for “large LARGE”, 32 is acquired as the designated size (step S201). Since “Large LARGE” includes characters to be drawn with a bitmap font and characters to be drawn with a scalable font, information indicating 12, 16, and 24, which are drawable sizes of the bitmap font. Obtained (step S203). The designated size 32 is larger than 12 which is the minimum size that can be drawn with the bitmap font (Yes in step S204). The designated size 32 is one or more threshold values A larger than 24, which is the maximum font size within a range smaller than 32, in one or more font sizes that can be drawn with a bitmap font (in step S205). Yes). Therefore, 24 is adopted as the font size for drawing the “LARGE” portion of the “large LARGE”, which is the drawing target of the scalable font (step S206). Reference numeral 24 denotes a font size of the maximum size within a range smaller than 32 which is a specified size among one or more font sizes that can be drawn with a bitmap font. As a result, “large LARGE” is drawn with a font size of 24 for both bitmap fonts and scalable fonts (step S207).

次に「中MEDIUM」についても、指定されたフォントサイズである20が、ビットマップフォントで描画可能な最小サイズである12より大きい(ステップS204でYes)。そして、描画可能サイズのうち20より小さい範囲で最大のサイズ16より、閾値Aである1以上大きい(ステップS205でYes)。従って、スケーラブルフォントによる描画対象の「MEDIUM」のフォントサイズとして、ビットマップフォントの描画可能サイズの中から16が採用される。結果として、「中MEDIUM」はビットマップフォントもスケーラブルフォントもサイズ16で描画される(ステップS207)。   Next, for “medium MEDIAUM”, the designated font size 20 is larger than 12 which is the minimum size that can be drawn with the bitmap font (Yes in step S204). Then, the threshold A is one or more larger than the maximum size 16 in a range smaller than 20 among the drawable sizes (Yes in step S205). Accordingly, 16 of the possible draw sizes of the bitmap font is adopted as the font size of “MEDIAUM” to be drawn by the scalable font. As a result, “medium MEDIAUM” is drawn with a size of 16 for both bitmap fonts and scalable fonts (step S207).

次に「小SMALL」の場合、指定サイズ10は、ビットマップフォントの描画可能サイズのうち最小サイズである12より小さい(ステップS204でNo)。従って、「小SMALL」のうちスケーラブルフォントの描画対象である「SMALL」を描画するフォントサイズとしては、指定サイズの10が採用される(ステップS208)。その結果、「小SMALL」は、「小」はサイズ12で、「SMALL」はサイズ10で描画される(ステップS207)。一連の処理の結果として、図3(b)では、各文字列の表示サイズに統一感があり、デザイン性を損なったり著しく可読性を低下させたりすることなく、文字列の表示が行われている。   Next, in the case of “small SMALL”, the designated size 10 is smaller than 12 which is the minimum size among the drawable sizes of the bitmap font (No in step S204). Therefore, the designated size of 10 is adopted as the font size for drawing “SMALL” which is the drawing target of the scalable font among “small SMALL” (step S208). As a result, “small SMALL” is rendered with size 12 for “small” and size 10 for “SMALL” (step S207). As a result of the series of processing, in FIG. 3B, the display size of each character string has a sense of unity, and the character string is displayed without impairing the design or significantly reducing the readability. .

以上説明したように、本実施形態によれば、ビットマップフォントで描画すべき文字と、スケーラブルフォントで描画すべき文字が混在した文字列は、スケーラブルフォントのフォントサイズをビットマップフォントの描画可能サイズに応じて決定する。これにより、ビットマップフォントとスケーラブルフォントが混在する文字列の可読性を向上することができる。   As described above, according to the present embodiment, a character string in which characters to be drawn with a bitmap font and characters to be drawn with a scalable font are mixed, the font size of the scalable font is set to the drawable size of the bitmap font. To be decided. Thereby, the readability of the character string in which the bitmap font and the scalable font are mixed can be improved.

なお、図2及び図3を参照して説明した上記の例では、入力文字列の描画に用いられるビットマップフォントは特定の1種類であると仮定していた。しかしながら、各文字を複数の異なるビットマップフォントを使って描画しても構わない。その場合には、ステップS203において、各文字に指定されたビットマップフォントの描画可能サイズを取得する。そして、ステップS204からステップS206の処理では、最も描画可能サイズと指定サイズとの差分が大きいビットマップフォントを判定基準として、スケーラブルフォントのフォントサイズを決定する処理を実行すればよい。   In the above example described with reference to FIGS. 2 and 3, it is assumed that the bitmap font used for drawing the input character string is one specific type. However, each character may be drawn using a plurality of different bitmap fonts. In that case, in step S203, the drawable size of the bitmap font designated for each character is acquired. In the process from step S204 to step S206, a process of determining the font size of the scalable font may be executed using the bitmap font having the largest difference between the drawable size and the specified size as a determination criterion.

また、ステップS206では、ビットマップフォントの描画可能サイズのうち1つをそのまま採用するのではなく、ステップS205の閾値A分を加算した値を採用するようにしてもよい。例えば、図3の場合であれば、「大LARGE」の「大」は24に閾値Aの1を足した25を採用するようにしてもよい。   In step S206, one of the drawable sizes of the bitmap font is not adopted as it is, but a value obtained by adding the threshold value A in step S205 may be adopted. For example, in the case of FIG. 3, “Large” of “Large LARGE” may employ 25, which is 24 plus 1 of the threshold A.

また、フォントの中には、フォントデータにビットマップフォントとスケーラブルフォントの両方のデータを含み、指定されたフォントサイズによってスケーラブルフォントとビットマップフォントのいずれを用いるかを切り替えて用いるものが存在する。そのようなフォントの多くは、指定されたフォントサイズがある閾値以下の場合は文字の細かい部分のつぶれを生じさせないためにビットマップフォントのデータを利用し、閾値より大きい場合はスケーラブルフォントのデータを利用する。このようなフォントがスケーラブルフォントでの描画対象の文字に適用される状況では、第1の実施形態で説明した処理によりスケーラブルフォントのフォントサイズを指定サイズより小さい任意のサイズへ変更するのが困難な場合がある。例えば、指定されたフォントサイズがフォントの種類の切り替え基準である閾値に相当した場合、それより小さいフォントサイズで描画するのは、所定のフォントサイズのビットマップフォントの字形データを利用する必要がある。そのため結果的に、隣接する文字の描画に利用される他のビットマップフォントとは見た目の大きさが不揃いになる可能性もある。従って、指定されたフォントサイズがフォントの種類の切り替え基準である閾値に相当し、かつ、ステップS205の判定結果がYesとなった場合、ステップS206ではスケーラブルフォントとして描画可能な最小サイズを採用すればよい。具体的には、指定されたフォントサイズが32以下の場合に、ビットマップフォントに切り替えて描画されるフォントの場合、指定されたフォントサイズが32である場合、ステップS206ではフォントサイズ33を採用する。このように、第1の実施形態には、情報処理装置100が使用するフォントの特徴に合わせた変形を適用させることができる。   Some fonts include both bitmap font and scalable font data in the font data, and switch between using the scalable font and the bitmap font depending on the specified font size. Many of these fonts use bitmap font data to prevent crushing of fine characters if the specified font size is below a certain threshold, and scalable font data if it is larger than the threshold. Use. In a situation where such a font is applied to characters to be drawn in a scalable font, it is difficult to change the font size of the scalable font to an arbitrary size smaller than the specified size by the processing described in the first embodiment. There is a case. For example, when the designated font size corresponds to a threshold value that is a reference for switching the font type, drawing with a smaller font size requires use of bitmap font character data of a predetermined font size. . Therefore, as a result, there is a possibility that the size of the appearance is different from other bitmap fonts used for drawing adjacent characters. Therefore, if the designated font size corresponds to a threshold value that is a reference for switching the font type, and the determination result in step S205 is Yes, in step S206, the minimum size that can be drawn as a scalable font is adopted. Good. Specifically, when the designated font size is 32 or less and the font is drawn by switching to the bitmap font, when the designated font size is 32, the font size 33 is adopted in step S206. . As described above, in the first embodiment, it is possible to apply a modification according to the characteristics of the font used by the information processing apparatus 100.

<第1の実施形態の変形例1>
次に、第1の実施形態の変形例1として、例えば、箇条書きされた複数項目(各項目がひとつの文字列に相当する)など、関連する複数の文字列のまとまりに対して、フォントサイズの調整を施すため場合を説明する。
<Variation 1 of the first embodiment>
Next, as a first modification of the first embodiment, for example, a font size for a group of a plurality of related character strings such as a plurality of item items (each item corresponds to one character string) is used. A case for performing the adjustment will be described.

図4(a)は、情報処理装置100の機能構成の一例を表すブロック図である。図1(b)を参照して説明した機能部に対応するブロックについては、説明を省略する。関連判定部401は、CPU101、ROM102、RAM103等で構成され、複数の入力文字列に対し、それらが互いに関連があるかを判定する。例えば、HTMLの<UL>タグで囲まれた各項目<LI>タグの文字列は、互いに関連のある文字列であると判定する。CPU101による処理に替えて、当該機能部をハードウェアで構成することも可能である。その場合には、以上説明した処理を演算部や回路を利用して実行する構成とすれば良い。   FIG. 4A is a block diagram illustrating an example of a functional configuration of the information processing apparatus 100. Description of the blocks corresponding to the functional units described with reference to FIG. The association determination unit 401 includes a CPU 101, a ROM 102, a RAM 103, and the like, and determines whether or not they are associated with each other for a plurality of input character strings. For example, the character string of each item <LI> tag enclosed by HTML <UL> tags is determined to be a character string related to each other. Instead of the processing by the CPU 101, the functional unit can be configured by hardware. In that case, the above-described processing may be configured to be executed using a calculation unit or a circuit.

図5のフローチャートは、変形例1に係る情報処理装置100によって実行される、文字列を描画する処理の流れを表す示すフローチャートの一例である。図2のフローチャートと同様の処理ステップには同じ番号を付し、詳細な説明を省略する。   The flowchart in FIG. 5 is an example of a flowchart showing a flow of processing for drawing a character string, which is executed by the information processing apparatus 100 according to the first modification. Process steps similar to those in the flowchart of FIG. 2 are assigned the same numbers, and detailed descriptions thereof are omitted.

変形例1では、まずステップS501では、文字列取得部111が、複数の入力文字列の情報を取得する。図2のフローチャートのステップS201と同様、取得される情報には、文字の識別情報、描画に用いるフォントを特定する情報、そしてフォントサイズが含まれる。そして変形例1の場合には、構造化文書の解析等によって得られる文字列同士の関連を示す情報を取得する。なお、ステップS501の1回の処理で取得する文字列の量は、予め用意されたルールに従う。   In the first modification, first, in step S501, the character string acquisition unit 111 acquires information on a plurality of input character strings. Similar to step S201 in the flowchart of FIG. 2, the acquired information includes character identification information, information for specifying a font used for drawing, and font size. And in the case of the modification 1, the information which shows the relationship between the character strings obtained by the analysis etc. of a structured document is acquired. It should be noted that the amount of the character string acquired by one process in step S501 follows a rule prepared in advance.

ステップS502では、関連判定部401が、描画対象となる複数の文字列は互いに関連しているかを判定する。例えば、HTMLを逐次読み込んで処理している際には、<UL>の開始タグを読み込んだら、<UL>の終了タグを読み込むまでに読み込んだ<LI>タグの文字列は関連していると判定する。   In step S502, the association determination unit 401 determines whether a plurality of character strings to be drawn are associated with each other. For example, when sequentially reading and processing HTML, if the <UL> start tag is read, the <LI> tag character string read before the <UL> end tag is read is related. judge.

ステップS503では、決定部113が、取得した複数の入力文字列に指定されたフォントサイズが、全て同じであるかを判定する。複数の入力文字列に指定されたフォントサイズが全て同じであると判定された場合(ステップS503でYes)、ステップS504に進む。複数の入力文字列に指定されたフォントサイズが全て同じではないと判定された場合(ステップS503でNo)、ステップS506に進む。ステップS506では、複数の文字列のそれぞれについて、図2のフローチャートを参照して説明した第1の実施形態の処理を実行し、全体の描画が終了したら終了する。   In step S503, the determination unit 113 determines whether or not the font sizes specified for the acquired plurality of input character strings are all the same. When it is determined that the font sizes specified for the plurality of input character strings are all the same (Yes in step S503), the process proceeds to step S504. When it is determined that the font sizes specified for the plurality of input character strings are not all the same (No in step S503), the process proceeds to step S506. In step S506, the process of the first embodiment described with reference to the flowchart of FIG. 2 is executed for each of the plurality of character strings, and the process ends when the entire drawing is completed.

ステップS504では、決定部113が、文字列取得部111が取得した情報を解析し、入力文字列にビットマップフォントによる描画対象となる文字とスケーラブルフォントによる描画対象となる文字が混在しているかを判定する。混在していると判定された場合(ステップS504でYes)、ステップS203に進む。混在していないと判定された場合(ステップS504でNo)、ステップS208に進む。続くステップS203からステップS208までの処理は、図2のフローチャートにおいて説明したものと同一であるため詳細な説明は省略する。ステップS505では、描画部114が、ステップS206或いはステップS208で決定したサイズでスケーラブルフォントとビットマップフォントの入力文字列を描画し、一連の処理は終了する。表示部106に表示する画像の内容によっては、必要に応じてステップS501からの処理が引き続き繰り返される。   In step S504, the determination unit 113 analyzes the information acquired by the character string acquisition unit 111, and determines whether a character to be drawn with a bitmap font and a character to be drawn with a scalable font are mixed in the input character string. judge. If it is determined that they are mixed (Yes in step S504), the process proceeds to step S203. If it is determined that they are not mixed (No in step S504), the process proceeds to step S208. The subsequent processing from step S203 to step S208 is the same as that described in the flowchart of FIG. In step S505, the drawing unit 114 draws the input character string of the scalable font and the bitmap font with the size determined in step S206 or step S208, and the series of processing ends. Depending on the content of the image displayed on the display unit 106, the processing from step S501 is continuously repeated as necessary.

ここで図6は、描画される文字列の具体例を表す図である。各図は、表示部106に箇条書きで、「大LARGE」、「今日」、及び「TODAY」の3つの入力文字列が表示されている様子を表す。漢字の描画に用いられるビットマップフォントに予め定められた複数の描画可能サイズは、12、16、及び24である。複数の文字列の全体に指定されたフォントサイズは32である。   Here, FIG. 6 is a diagram illustrating a specific example of a character string to be drawn. Each figure represents a state in which three input character strings “large LARGE”, “today”, and “TODAY” are displayed as bullets on the display unit 106. A plurality of drawable sizes predetermined for bitmap fonts used for drawing Chinese characters are 12, 16, and 24. The font size specified for the entire plurality of character strings is 32.

図6(a)は、図3(a)と同様に、第1の実施形態による処理を行っていない場合を表している。「LARGE」、及び「TODAY」はラテン文字でスケーラブルフォントでの描画対象なので、指定されたフォントサイズに従い32で描画されている。一方「大」、及び「今日」は漢字であるためビットマップフォントでの描画対象であるため、指定されたフォントサイズに近い24が選ばれて描画されている。その結果、図6(a)のような場合、1項目の中でも漢字とアルファベットとでフォントサイズが異なり、また、項目同士にもフォントサイズの違いが生じているため、全体のバランスが崩れ、可読性が低下することがある。   FIG. 6A shows a case where the processing according to the first embodiment is not performed, as in FIG. “LARGE” and “TODAY” are Latin characters and are drawn with a scalable font, and are drawn with 32 according to the designated font size. On the other hand, since “Large” and “Today” are kanji characters and are drawn with a bitmap font, 24 close to the designated font size is selected and drawn. As a result, in the case as shown in FIG. 6A, the font size is different between the kanji and the alphabet among the items, and the font size is different between the items. May decrease.

図6(b)は、図6(a)と同じ条件での描画が指示された複数の入力文字列に対して、第1の実施形態による処理(図2のフローチャートの処理)を施した場合の表示結果である。なお、ステップS205の判定に用いる閾値Aは1とする。「大LARGE」、「今日」、及び「TODAY」の各文字列に対して、それぞれ図2のフローチャートの処理が適用された結果、「大LARGE」は図3(b)と同じくサイズが均一の24となり、項目単独で比較すれば図6(a)よりも可読性が向上している。2つ目の項目の「今日」も、24のフォントサイズで描画される。しかしながら、3つ目の項目である「TODAY」は、文字列にビットマップフォントによる描画対象となる文字とスケーラブルフォントによる描画対象となる文字が混在していないため、指定された32というフォントサイズで描画される。その結果、図6(a)と同じく、一連の箇条書きに含まれる複数の文字列において、文字列毎にフォントサイズが異なってしまい、可読性が低下することがある。   FIG. 6B shows a case where the process according to the first embodiment (the process of the flowchart of FIG. 2) is performed on a plurality of input character strings instructed to be drawn under the same conditions as in FIG. Is the display result. Note that the threshold A used for the determination in step S205 is 1. As a result of applying the processing of the flowchart of FIG. 2 to the character strings of “Large LARGE”, “Today”, and “TODAY”, “Large LARGE” has the same size as FIG. 3B. Therefore, the readability is improved as compared with FIG. The second item “Today” is also drawn with a font size of 24. However, the third item “TODAY” has a character size of 32 designated because the character string to be drawn with the bitmap font and the character to be drawn with the scalable font are not mixed. Drawn. As a result, as in FIG. 6A, in a plurality of character strings included in a series of bullets, the font size is different for each character string, and readability may deteriorate.

図6(c)は、図6(a)及び(b)と同じ条件での描画が指示された複数の入力文字列に対して、変形例1(図5のフローチャートの処理)を適用した場合の表示結果である。「大LARGE」、「今日」、及び「TODAY」の3つの文字列は、箇条書きという関連した文字列であると定義されている(ステップS502でYes)。さらに、全体に指定されたフォントサイズは全て32であり(ステップS503でYes)、ビットマップフォントの描画対象の文字とスケーラブルフォントによる描画対象文字が混在する(ステップS504でYes)。指定されたフォントサイズ32は、32により小さいビットマップフォントの複数の描画可能サイズのうち最も大きい24よりも閾値Aである1以上大きい(ステップS205)。従って、図6(c)の例の場合、スケーラブルフォントによって描画する文字のフォントサイズは24に決定され(ステップS206)、表示部106には全ての文字のフォントサイズが24に統一された複数の文字列が表示される(ステップS505)。一連の箇条書きの複数の文字列において、文字の大きさが揃うことで、図6(a)及び(b)に比較して、可読性が向上しているといえる。   FIG. 6C shows a case where Modification 1 (the process of the flowchart of FIG. 5) is applied to a plurality of input character strings instructed to be drawn under the same conditions as those in FIGS. 6A and 6B. Is the display result. The three character strings “Large LARGE”, “Today”, and “TODAY” are defined to be related character strings called bullets (Yes in step S502). Furthermore, the font size designated as a whole is 32 (Yes in step S503), and characters to be drawn in the bitmap font and characters to be drawn in the scalable font are mixed (Yes in step S504). The designated font size 32 is one or more, which is the threshold value A, larger than 24 which is the largest among the plurality of drawable sizes of bitmap fonts smaller than 32 (step S205). Accordingly, in the case of the example of FIG. 6C, the font size of the character drawn by the scalable font is determined to be 24 (step S206), and the display unit 106 has a plurality of font sizes in which the font size of all characters is unified to 24. A character string is displayed (step S505). In a plurality of character strings in a series of bullets, it can be said that the readability is improved as compared with FIGS.

以上説明したように、変形例1によれば、箇条書きの各項目など、関連する複数の文字列において、スケーラブルフォントのフォントサイズをビットマップフォントのフォントサイズに合わせて調整する。これにより、複数の文字列のまとまりとしてのバランスがとれ、可読性の向上を得ることができる。   As described above, according to the first modification, the font size of the scalable font is adjusted in accordance with the font size of the bitmap font in a plurality of related character strings such as each item in the itemized list. As a result, a balance as a group of a plurality of character strings is achieved, and an improvement in readability can be obtained.

<第1の実施形態の変形例2>
第1の実施形態の変形例2では、複数の文字列にビットマップフォントとスケーラブルフォントの文字が混在する場合に、フォントの種類毎に描画される文字数の比率に応じて、スケーラブルフォントを描画するフォントサイズを決定する例を説明する。
<Modification 2 of the first embodiment>
In the second modification of the first embodiment, when a bitmap font and a scalable font are mixed in a plurality of character strings, the scalable font is drawn according to the ratio of the number of characters drawn for each font type. An example of determining the font size will be described.

図4(b)は、変形例2に係る情報処理装置100の機能構成の一例を表すブロック図である。図4(a)と共通する機能ブロックについては、説明を省略する。比率取得部411は、CPU101、ROM102、RAM103等で構成され、複数の入力文字列に対し、入力文字列の全文字数に対する、フォントの種類毎の文字数の比率を算出により取得する。なおCPU101による処理に替えて、当該機能部をハードウェアで構成することも可能である。その場合には、以上説明した処理を演算部や回路を利用して実行する構成とすれば良い。   FIG. 4B is a block diagram illustrating an example of a functional configuration of the information processing apparatus 100 according to the second modification. Description of functional blocks common to FIG. The ratio acquisition unit 411 includes a CPU 101, a ROM 102, a RAM 103, and the like, and acquires a ratio of the number of characters for each type of font with respect to the total number of characters in the input character string for a plurality of input character strings. Note that, instead of the processing by the CPU 101, the functional unit can be configured by hardware. In that case, the above-described processing may be configured to be executed using a calculation unit or a circuit.

図7のフローチャートは、情報処理装置100に、文字列を描画する処理を示すフローチャートの一例である。図5のフローチャートと共通する処理ステップには同じ番号を牛、詳細な説明を省略する。   The flowchart in FIG. 7 is an example of a flowchart illustrating processing for drawing a character string in the information processing apparatus 100. The processing steps common to the flowchart of FIG.

変形例2では、ステップS504において、複数の文字列にビットマップフォントによる描画対象の文字とスケーラブルフォントによる描画対象の文字が混在すると判定された場合(ステップS504でYes)、ステップS701に進む。ステップS701では、比率取得部411が、描画対象となる複数の文字列全体について、全文字数に対するビットマップフォントによる描画対象の文字の数の比率を取得する。続くステップS702では、決定部113が、ステップS701で取得した比率が、所定の閾値B以上かを判定する。ここで用いる閾値Bは、スケーラブルフォントに比べて文字数が小さくなる傾向にあるビットマップフォントが、全体の中で数多く存在することにより、可読性が低下するといえるか否かを判定する基準であって、予め環境に応じた適切な値が設定される。以降の処理は図5のフローチャートと共通する。   In the second modification, if it is determined in step S504 that a plurality of character strings include a character to be drawn with a bitmap font and a character to be drawn with a scalable font (Yes in step S504), the process proceeds to step S701. In step S <b> 701, the ratio acquisition unit 411 acquires the ratio of the number of characters to be drawn with the bitmap font to the total number of characters for the entire plurality of character strings to be drawn. In subsequent step S702, the determination unit 113 determines whether the ratio acquired in step S701 is equal to or greater than a predetermined threshold B. The threshold value B used here is a criterion for determining whether or not it can be said that readability is lowered due to the presence of many bitmap fonts that tend to have a smaller number of characters than scalable fonts. An appropriate value corresponding to the environment is set in advance. The subsequent processing is common to the flowchart of FIG.

図8は、描画される文字列の具体例を表す図である。この例では、表示部106にWebページ内で箇条書きされたリンク先一覧部分の5つの入力文字列が表示されている。入力文字列は5つあり、それぞれ「Deutsch/German」、「Espanol/Spanish」、「Francais/French」、「Italiano/Italian」、及び「中文/Chinese」である。描画に用いられるビットマップフォントに予め定められた描画可能サイズは、単一の12であるとする。複数の文字列全体に指定されたサイズは、32である。またステップS205の処理に利用される閾値Aは1である。   FIG. 8 is a diagram illustrating a specific example of a character string to be drawn. In this example, the display unit 106 displays five input character strings in the link destination list part that is listed in the Web page. There are five input character strings, which are “Deutsch / German”, “Espanol / Spanish”, “Francais / French”, “Italiano / Italian”, and “Chinese / Chinese”, respectively. It is assumed that the drawable size predetermined for the bitmap font used for drawing is a single twelve. The size designated for the entire plurality of character strings is 32. The threshold A used for the processing in step S205 is 1.

まず、図8(a)及び(b)を利用して、変形例2の目的を説明する。図8(a)は、第1の実施形態によるスケーラブルフォントのサイズ調整を行っていない、従来の表示方法を示す。「中文」以外はラテン文字であり、スケーラブルフォントによる描画対象であるので、指定されたフォントサイズの32で描画されている。一方「中文」は漢字であって、ビットマップフォントによる描画対象となるため、フォントサイズ12が選ばれて描画されている。このように、本実施形態を用いない場合、文字列のうちビットマップフォントが用いられる一部の文字の大きさだけが小さくなることで、当該部分の可読性が低くなる可能性がある。しかしながら一方で、ビットマップフォントによって描画される文字は極一部であるため、フォントサイズが小さいことによる全体への影響は小さいとも言える。例えば、リンク先を選択するという目的では、各項目の識別性が高いことが評価できる。   First, the purpose of the modified example 2 will be described with reference to FIGS. FIG. 8A shows a conventional display method in which the scalable font size is not adjusted according to the first embodiment. Other than “Chinese” are Latin characters, and are drawn with a scalable font, so they are drawn with a designated font size of 32. On the other hand, “Chinese” is a Chinese character and is drawn with a bitmap font, so the font size 12 is selected and drawn. Thus, when this embodiment is not used, there is a possibility that the readability of the part may be reduced by reducing only the size of a part of the character string in which the bitmap font is used. However, on the other hand, since the characters drawn by the bitmap font are a very small part, it can be said that the influence on the whole due to the small font size is small. For example, for the purpose of selecting a link destination, it can be evaluated that each item has high identification.

次に図8(b)は、図8(a)と同じ条件での描画が指定された複数の文字列に対して、変形例2の処理(図5のフローチャートの処理)を適用した場合の表示結果である。ステップS205の判定に利用する閾値Aは1とする。各文字列に対して、変形例2の処理を適用した結果、各文字列はビットマップフォントで描画される「中文」と同じ、12というフォントサイズに揃えた状態で描画されている。図8(b)は図8(a)と比較して、全体の文字の大きさが均等になっているという点で、可読性は向上している。しかし、揃えられたフォントサイズが小さいことで、例えば、マウスカーソルや指を使ったリンク先の指定の難易度が高くなってしまう可能性がある。   Next, FIG. 8B shows a case where the process of the modification 2 (the process of the flowchart of FIG. 5) is applied to a plurality of character strings for which drawing under the same conditions as in FIG. 8A is specified. It is a display result. The threshold A used for the determination in step S205 is 1. As a result of applying the processing of the modification 2 to each character string, each character string is drawn in a state where it is aligned with a font size of 12, which is the same as “Chinese” drawn with a bitmap font. In FIG. 8B, the readability is improved in that the overall character size is uniform compared to FIG. 8A. However, if the aligned font size is small, for example, there is a possibility that the difficulty of specifying a link destination using a mouse cursor or a finger becomes high.

このように、ビットマップフォントが極一部にしか用いられていない場合や、ビットマップフォントの描画可能サイズが小さいサイズに限定される場合、スケーラブルフォントの大きさをビットマップフォントに合わせることによる効果が低い場合もある。そこで変形例2では、描画対象となる複数の文字列全体について、全文字数に対するビットマップフォントによる描画対象の文字の数の比率に応じて、スケーラブルフォントのフォントサイズの決定方法を異ならせる。本実施形態では、スケーラブルフォントのフォントサイズを指定されたフォントサイズとするか、ビットマップフォントの描画可能サイズに合わせて変更するかを切り替える。具体的には、当該比率が予め設定したある閾値より低い場合には、スケーラブルフォントのフォントサイズを変更せず、指定された大きさのまま描画に利用することとする。   In this way, when bitmap fonts are used only in a small part or when the drawable size of bitmap fonts is limited to a small size, the effect of matching the size of scalable fonts to bitmap fonts May be low. Therefore, in the second modification, the font size determination method of the scalable font is made different according to the ratio of the number of characters to be drawn by the bitmap font with respect to the entire number of characters to be drawn. In the present embodiment, the font size of the scalable font is switched to the designated font size or to be changed in accordance with the drawable size of the bitmap font. Specifically, when the ratio is lower than a predetermined threshold value, the font size of the scalable font is not changed and is used for drawing with the specified size.

例えば、閾値Bが5%であるとする。すると図8(a)及び(b)で説明した条件で描画することが指示された複数の文字列は、全文字数に対するビットマップフォントの描画対象の文字数の比率は、2文字/70文字=約2.9%と取得される(ステップS701)。閾値Bである5%より小さいため(ステップS702でNo)、スケーラブルフォントで描画される文字のフォントサイズは、指定サイズである32と決定される(ステップS208)。従って、表示結果は図8(a)のようになる。あるいは、閾値Bを2.5%とするなど、変更することによって、表示結果が図8(b)となるように調整することもできる。   For example, assume that the threshold value B is 5%. Then, in the plurality of character strings instructed to be drawn under the conditions described in FIGS. 8A and 8B, the ratio of the number of characters to be drawn in the bitmap font to the total number of characters is 2 characters / 70 characters = about 2.9% is acquired (step S701). Since the threshold value B is smaller than 5% (No in step S702), the font size of the character drawn in the scalable font is determined to be the designated size 32 (step S208). Accordingly, the display result is as shown in FIG. Alternatively, by changing the threshold B to 2.5% or the like, the display result can be adjusted so as to be as shown in FIG.

以上説明したように、変形例2によれば、混在するフォントの種類の割合が全体に与える影響が小さい場合は、スケーラブルフォントのフォントサイズをビットマップフォントと揃える処理を行わないといった選択的な処理が可能となる。これにより、サイズを揃えることによる副作用を抑えることができる。   As described above, according to the second modification, when the influence of the mixed font types on the whole is small, the selective process of not performing the process of aligning the font size of the scalable font with the bitmap font is performed. Is possible. Thereby, the side effect by aligning a size can be suppressed.

<第1の実施形態の変形例3>
第1の実施形態の変形例2では、複数の文字列の中に混在するフォントの種類の割合に応じて、スケーラブルフォントによる描画対象の文字の大きさを調整するか否かを切り替えた。それに対し、第1の実施形態の変形例3では、ビットマップフォントの描画可能サイズを、整数倍に拡大したサイズまで拡張することにより、全体の文字の大きさを揃えた際に、文字が小さくなり過ぎるのを緩和する例を説明する。情報処理装置100の機能構成は図4(a)と略同一となる。ただし、変形例3に係る描画可能サイズ取得部112は、ビットマップフォントに描画可能なフォントサイズとして予め定められた1以上の不連続なフォントサイズの少なくとも1つを整数倍したフォントサイズを含めて、描画可能サイズとして取得する。整数倍する処理の基準N倍(N:所定の整数)、は予め設定されるものとする。
<Modification 3 of the first embodiment>
In the second modification of the first embodiment, whether or not to adjust the size of the character to be drawn with the scalable font is switched according to the ratio of the font types mixed in the plurality of character strings. On the other hand, in the third modification of the first embodiment, the size of the bitmap font that can be drawn is expanded to a size that is enlarged to an integral multiple, thereby reducing the size of the entire character. An example of mitigating over-prediction will be described. The functional configuration of the information processing apparatus 100 is substantially the same as that shown in FIG. However, the drawable size acquisition unit 112 according to the modified example 3 includes a font size obtained by multiplying at least one of one or more discontinuous font sizes predetermined as a font size that can be drawn in a bitmap font. Get as drawable size. It is assumed that the reference N times (N: a predetermined integer) of the process of integer multiplication is set in advance.

図9のフローチャートは、変形例3に係る情報処理装置100が実行する、文字列を描画する処理の流れを示すフローチャートである。変形例1(図5のフローチャート)と共通する処理ステップには同じ番号を付し、説明を省略する。   The flowchart of FIG. 9 is a flowchart illustrating a flow of processing for drawing a character string, which is executed by the information processing apparatus 100 according to the third modification. The same steps as those in the first modification (the flowchart in FIG. 5) are denoted by the same reference numerals, and the description thereof is omitted.

変形例3では、ステップS203において描画可能サイズ取得部112がビットマップフォントに定められた1以上の描画可能サイズを取得したら、ステップS901に進む。ステップS901では、描画可能サイズ取得部112が、取得した描画可能サイズに含まれるサイズの少なくとも一部を、1倍からN倍まで順次整数倍(N:所定の整数)したフォントサイズをさらに取得し、全体を描画可能サイズとして保持する。例えば、保持部115から取得したビットマップフォントに定められた描画可能サイズが12、16、及び24であり、整数倍する処理の基準値が2倍までと設定されている場合は、拡張後の描画可能サイズは12、16、24、32、及び48となる。ステップS204からステップS208の処理は、図5のフローチャートに準じる。   In the third modification, when the drawable size obtaining unit 112 obtains one or more drawable sizes defined in the bitmap font in step S203, the process proceeds to step S901. In step S <b> 901, the drawable size acquisition unit 112 further acquires a font size obtained by sequentially multiplying at least a part of the size included in the acquired drawable size from 1 to N times an integer (N: a predetermined integer). , Keep the whole as a drawable size. For example, when the drawable sizes defined in the bitmap font acquired from the holding unit 115 are 12, 16, and 24, and the reference value for the process of integer multiplication is set to 2 times, The drawable sizes are 12, 16, 24, 32, and 48. The processing from step S204 to step S208 conforms to the flowchart of FIG.

ステップS902では、描画部114が、ステップS206においてスケーラブルフォントに設定されたフォントサイズが、ビットマップフォントの当初の描画可能サイズをN倍したフォントサイズであるかを判定する。ビットマップフォントの当初の描画可能サイズをN倍したフォントサイズであると判定された場合(ステップS902でYes)には、ステップS903に進む。ビットマップフォントの当初の描画可能サイズをN倍したフォントサイズではないと判定された場合(ステップS902でNo)には、ステップS505に進む。ステップS903では、描画部114が、保持部115からビットマップフォントによる描画対象の文字用に予め用意された字形データを取得し、N倍した字形データを生成する。ステップS903の後ステップS505でビットマップフォントによる文字の描画が実行される場合、N倍された字形データが用いられる。   In step S902, the drawing unit 114 determines whether the font size set in the scalable font in step S206 is a font size that is N times the initial drawable size of the bitmap font. If it is determined that the font size is N times the initial drawable size of the bitmap font (Yes in step S902), the process proceeds to step S903. If it is determined that the font size is not N times the initial drawable size of the bitmap font (No in step S902), the process proceeds to step S505. In step S903, the drawing unit 114 obtains character shape data prepared in advance for a character to be drawn with a bitmap font from the holding unit 115, and generates character shape data multiplied by N. When character drawing with a bitmap font is executed in step S505 after step S903, the N-fold character data is used.

図8(c)は、描画される文字列の具体例を表す図である。図8(a)及び(b)と同様、表示部106にWebページ内で箇条書きにされたリンク一覧に相当する複数の入力文字列が表示されている。図8(c)は、図8(a)と同じ条件での描画が指定された複数の文字列に対して、変形例3の処理(図9のフローチャートの処理)を適用した場合の表示結果である。ここで、ビットマップフォントの描画可能サイズを整数倍する処理の基準NはN=2である。ステップS901では、ビットマップフォントの描画可能サイズとして取得されたフォントサイズが12であるので、追加後の描画可能サイズは12、及び24となる。全体に指定されたフォントサイズ32が、12より大きく(ステップS204でYes)、24よりも閾値Aである1以上大きいため(ステップS205でYes)、スケーラブルフォントを描画するフォントサイズは24と決定される(ステップS206)。決定された24というフォントサイズは、当初のフォントサイズを2倍して追加したサイズであるため(ステップS902でYes)、描画部114は、ビットマップフォントの字形データを2倍したデータを取得して描画に利用する(ステップS903)。その結果、図8(c)のような表示結果が得られ、全ての文字列において文字のサイズが揃い、全体としての可読性が向上すると共に、全体のフォントサイズが小さくなりすぎることを緩和できる。   FIG. 8C is a diagram illustrating a specific example of a character string to be drawn. As in FIGS. 8A and 8B, the display unit 106 displays a plurality of input character strings corresponding to a list of links that are itemized in the Web page. FIG. 8C shows a display result when the process of the third modification (the process of the flowchart of FIG. 9) is applied to a plurality of character strings designated to be drawn under the same conditions as in FIG. It is. Here, the reference N for the process of multiplying the drawable size of the bitmap font by an integer is N = 2. In step S901, since the font size acquired as the drawable size of the bitmap font is 12, the drawable sizes after addition are 12 and 24. Since the font size 32 specified for the whole is larger than 12 (Yes in step S204) and larger than 1 which is the threshold A than 24 (Yes in step S205), the font size for drawing the scalable font is determined to be 24. (Step S206). Since the determined font size of 24 is a size obtained by doubling the initial font size (Yes in step S902), the drawing unit 114 obtains data obtained by doubling the character data of the bitmap font. And used for drawing (step S903). As a result, a display result as shown in FIG. 8C is obtained, the character sizes are uniform in all the character strings, the readability as a whole is improved, and the entire font size can be reduced too much.

以上説明したように、変形例3によれば、ビットマップフォントの描画可能サイズを整数倍まで拡張することにより、揃えるサイズが小さくなり過ぎるのを緩和することができる。これにより、複数の文字列全体としてのサイズのバランスが取れ、可読性が向上する。   As described above, according to the third modification, it is possible to relieve the size of the alignment font from becoming too small by extending the drawable size of the bitmap font to an integral multiple. This balances the size of the plurality of character strings as a whole and improves readability.

<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other embodiments>
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

111 文字列情報取得部
112 描画可能サイズ取得部
113 決定部
114 描画部
115 保持部
401 関連判定部
411 比率取得部
111 Character string information acquisition unit 112 Drawable size acquisition unit 113 Determination unit 114 Drawing unit 115 Holding unit 401 Association determination unit 411 Ratio acquisition unit

Claims (13)

スケーラブルフォントと、文字の描画に使用可能な所定のフォントサイズが定められたビットマップフォントとを用いて文字列を描画する情報処理装置であって、
描画対象となる文字列に指定されているフォントサイズを取得する取得手段と、
前記描画対象となる文字列に、前記ビットマップフォントによる描画対象となる文字と、前記スケーラブルフォントによる描画対象となる文字とが混在する場合、前記ビットマップフォントに定められた所定のフォントサイズと、前記取得手段によって取得されたフォントサイズとに基づいて、前記スケーラブルフォントによる描画対象となる文字を描画するフォントサイズを決定する決定手段と、
前記描画対象となる文字列のうち、前記ビットマップフォントによる描画対象となる文字を、前記ビットマップフォントに定められた所定のフォントサイズのいずれかで描画し、前記スケーラブルフォントによる描画対象となる文字を、前記決定手段によって決定されたフォントサイズで描画する描画手段と、
を備えることを特徴とする情報処理装置。
An information processing apparatus that draws a character string using a scalable font and a bitmap font in which a predetermined font size that can be used for drawing a character is defined,
Acquisition means for acquiring the font size specified for the character string to be rendered;
If the character string to be drawn is mixed with characters to be drawn with the bitmap font and characters to be drawn with the scalable font, a predetermined font size defined for the bitmap font; A determining unit that determines a font size for drawing a character to be drawn by the scalable font based on the font size acquired by the acquiring unit;
Of the character string to be drawn, the character to be drawn with the bitmap font is drawn with one of the predetermined font sizes defined for the bitmap font, and the character to be drawn with the scalable font Drawing means for drawing with the font size determined by the determining means;
An information processing apparatus comprising:
前記描画手段は、前記描画対象となる文字列のうち、前記ビットマップフォントによる描画対象となる文字を、前記ビットマップフォントに定められた所定のフォントサイズのうちの、前記取得手段によって取得されたフォントサイズに基づいて特定されるフォントサイズで描画することを特徴とする請求項1に記載の情報処理装置。   The drawing unit acquires a character to be drawn by the bitmap font among the character string to be drawn by the obtaining unit out of a predetermined font size defined for the bitmap font. The information processing apparatus according to claim 1, wherein drawing is performed with a font size specified based on the font size. 前記決定手段は、前記取得手段によって取得されたフォントサイズが所定の基準を満たす場合に、前記スケーラブルフォントによる描画対象となる文字を描画するフォントサイズを、前記ビットマップフォントに定められた所定のフォントサイズのいずれかに決定することを特徴とする請求項1又は2に記載の情報処理装置。   The determining unit determines a font size for rendering a character to be rendered by the scalable font when the font size acquired by the acquiring unit satisfies a predetermined standard as a predetermined font defined in the bitmap font. The information processing apparatus according to claim 1, wherein the information processing apparatus determines one of the sizes. 前記ビットマップフォントに定められた所定のフォントサイズのうち、前記取得手段によって取得されたフォントサイズより小さい範囲で最大のフォントサイズを特定する特定手段を更に備え、
前記基準とは、前記取得手段によって取得されたフォントサイズが、前記特定手段によって特定されたフォントサイズより所定の閾値以上大きいことであることを特徴とする請求項3に記載の情報処理装置。
A specifying unit for specifying a maximum font size within a range smaller than the font size acquired by the acquiring unit among the predetermined font sizes determined for the bitmap font;
The information processing apparatus according to claim 3, wherein the reference is that the font size acquired by the acquiring unit is larger than a font size specified by the specifying unit by a predetermined threshold or more.
前記決定手段は、前記前記取得手段によって取得されたフォントサイズが、前記特定手段によって特定されたフォントサイズより所定の閾値以上大きくない場合、前記取得手段によって取得されたフォントサイズを前記スケーラブルフォントによる描画対象となる文字を描画するフォントサイズとして決定することを特徴とする請求項4に記載の情報処理装置。   When the font size acquired by the acquisition unit is not larger than a predetermined threshold value by the determination unit, the determination unit draws the font size acquired by the acquisition unit using the scalable font. The information processing apparatus according to claim 4, wherein the information processing apparatus determines a font size for drawing a target character. 描画対象となる複数の文字列に関連があるかを判定する関連判定手段を更に備え、
前記決定手段は、前記関連判定手段で関連があると判定された複数の文字列に含まれる文字を描画するフォントサイズが均一となるように、前記スケーラブルフォントによる描画対象となる文字を描画するフォントサイズを決定することを特徴とする請求項1乃至5のいずれか1項に記載の情報処理装置。
It further comprises an association determination means for determining whether or not there are associations between a plurality of character strings to be rendered,
A font for rendering a character to be rendered by the scalable font so that a font size for rendering a character included in a plurality of character strings determined to be related by the relationship determination unit is uniform; 6. The information processing apparatus according to claim 1, wherein a size is determined.
前記決定手段は、前記取得手段によって取得された前記複数の文字列の全ての文字に対して指定されたフォントサイズが同じ場合に、前記前記スケーラブルフォントによる描画対象となる文字を描画するフォントサイズを決定することを特徴とする請求項6に記載の情報処理装置。   The determination unit determines a font size for drawing a character to be drawn by the scalable font when the font size specified for all characters of the plurality of character strings acquired by the acquisition unit is the same. The information processing apparatus according to claim 6, wherein the information processing apparatus is determined. 前記描画対象となる複数の文字列に含まれる全文字数に対する、前記複数の文字列に含まれるビットマップフォントによる描画対象の文字列の数の比率を取得する比率取得手段を更に備え、
前記決定手段は、前記比率取得手段によって取得された比率の大きさに基づいて、前記スケーラブルフォントによる描画対象となる文字を描画するフォントサイズの決定方法を異ならせることを特徴とする請求項6に記載の情報処理装置。
A ratio acquisition means for acquiring a ratio of the number of character strings to be drawn by a bitmap font included in the plurality of character strings with respect to the total number of characters included in the plurality of character strings to be drawn;
7. The method according to claim 6, wherein the determination unit changes a font size determination method for drawing a character to be drawn by the scalable font based on the ratio size acquired by the ratio acquisition unit. The information processing apparatus described.
前記ビットマップフォントに定められた所定のフォントサイズに加えて、該所定のフォントサイズの少なくとも1つを整数倍したフォントサイズを含む複数のフォントサイズを取得する描画可能サイズ取得手段を更に備え、
前記描画手段は、前記ビットマップフォントに予め用意された字形データを拡大した字形データを用いて、前記ビットマップフォントによる描画対象の文字を描画することを特徴とする請求項6に記載の情報処理装置。
In addition to the predetermined font size defined for the bitmap font, further includes a drawable size acquisition means for acquiring a plurality of font sizes including a font size obtained by multiplying at least one of the predetermined font sizes by an integer,
7. The information processing according to claim 6, wherein the drawing means draws a character to be drawn by the bitmap font using character shape data obtained by enlarging character shape data prepared in advance for the bitmap font. apparatus.
前記ビットマップフォントに定められた所定のフォントサイズは、不連続な値に対応する段階的な複数のフォントサイズであることを特徴とする請求項1乃至9のいずれか1項に記載の情報処理装置。   The information processing according to any one of claims 1 to 9, wherein the predetermined font size determined for the bitmap font is a plurality of stepwise font sizes corresponding to discontinuous values. apparatus. スケーラブルフォントと、文字の描画に使用可能な所定のフォントサイズが定められたビットマップフォントとを用いて文字列を描画する情報処理装置の制御方法であって、
取得手段により、描画対象となる文字列に指定されているフォントサイズを取得する取得工程と、
決定手段により、前記描画対象となる文字列に、前記ビットマップフォントによる描画対象となる文字と、前記スケーラブルフォントによる描画対象となる文字とが混在する場合、前記ビットマップフォントに定められた所定のフォントサイズと、前記取得工程において取得されたフォントサイズとに基づいて、前記スケーラブルフォントによる描画対象となる文字を描画するフォントサイズを決定する決定工程と、
描画手段により、前記描画対象となる文字列のうち、前記ビットマップフォントによる描画対象となる文字を、前記ビットマップフォントに定められた所定のフォントサイズのいずれかで描画し、前記スケーラブルフォントによる描画対象となる文字を、前記決定工程において決定されたフォントサイズで描画する描画工程と、
を有すことを特徴とする情報処理装置の制御方法。
A method for controlling an information processing apparatus that draws a character string using a scalable font and a bitmap font in which a predetermined font size that can be used for character drawing is defined,
An acquisition step of acquiring a font size specified in a character string to be rendered by an acquisition unit;
In the case where the character string to be drawn includes a character to be drawn by the bitmap font and a character to be drawn by the scalable font, the determining unit causes a predetermined character string defined for the bitmap font to be used. A determination step of determining a font size for drawing a character to be drawn by the scalable font based on the font size and the font size acquired in the acquisition step;
The drawing means draws the character to be drawn by the bitmap font out of the character string to be drawn by one of the predetermined font sizes defined for the bitmap font, and draws by the scalable font. A drawing step of drawing the target character with the font size determined in the determination step;
A method for controlling an information processing apparatus, comprising:
コンピュータに読み取らせ実行させることによって、前記コンピュータに請求項11に記載の制御方法を実行させるプログラム。   A program for causing a computer to execute the control method according to claim 11 by causing the computer to read and execute the program. 請求項12に記載のプログラムが記憶されたコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 12.
JP2015080438A 2015-04-09 2015-04-09 Information processor and control method thereof, computer program, and recording medium Pending JP2016200704A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015080438A JP2016200704A (en) 2015-04-09 2015-04-09 Information processor and control method thereof, computer program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015080438A JP2016200704A (en) 2015-04-09 2015-04-09 Information processor and control method thereof, computer program, and recording medium

Publications (1)

Publication Number Publication Date
JP2016200704A true JP2016200704A (en) 2016-12-01

Family

ID=57424018

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015080438A Pending JP2016200704A (en) 2015-04-09 2015-04-09 Information processor and control method thereof, computer program, and recording medium

Country Status (1)

Country Link
JP (1) JP2016200704A (en)

Similar Documents

Publication Publication Date Title
JP4896362B2 (en) Font selection method
US9785623B2 (en) Identifying a set of related visible content elements in a markup language document
EP2805258B1 (en) Low resolution placeholder content for document navigation
US9484006B2 (en) Manipulation of textual content data for layered presentation
US9471550B2 (en) Method and apparatus for document conversion with font metrics adjustment for format compatibility
US9619440B2 (en) Document conversion apparatus
CN107562480B (en) Method and system for realizing multilingual of POS machine
US9886426B1 (en) Methods and apparatus for generating an efficient SVG file
KR101229175B1 (en) Method and adaptive for creating handwriting font
JP4812077B2 (en) DATA DISPLAY METHOD, DATA DISPLAY DEVICE, AND PROGRAM
Powers Beginning Css3
WO2017151404A1 (en) Conditional determination of lookups in glyph processing
CN111143749A (en) Webpage display method, device, equipment and storage medium
JP2016200704A (en) Information processor and control method thereof, computer program, and recording medium
US20120166937A1 (en) Document editing apparatus, document editing method, and storage medium
CN106598934A (en) Electronic book data display method and device, and terminal equipment
JP5645481B2 (en) Apparatus, method, and program
US20160170941A1 (en) Replicating the appearance of typographical attributes and text adornments in digital publications
US9978005B2 (en) Printer for drawing bold character, method for controlling the same, and storage medium
JP2007152580A (en) Image forming apparatus and method
US9684986B1 (en) Constructing fonts from scanned images for rendering text
JP6501454B2 (en) INFORMATION PROCESSING APPARATUS, CONTROL METHOD THEREOF, PROGRAM, AND STORAGE MEDIUM
JP2018019212A (en) Information processing apparatus, drawing processing method, and computer program
Ross Digital typeface design and font development for twenty-first century bangla language processing
US20170257521A1 (en) Electronic apparatus and display method of electronic apparatus