JP2015210417A - Information processing device, control method thereof, computer program, and storage medium - Google Patents

Information processing device, control method thereof, computer program, and storage medium Download PDF

Info

Publication number
JP2015210417A
JP2015210417A JP2014092537A JP2014092537A JP2015210417A JP 2015210417 A JP2015210417 A JP 2015210417A JP 2014092537 A JP2014092537 A JP 2014092537A JP 2014092537 A JP2014092537 A JP 2014092537A JP 2015210417 A JP2015210417 A JP 2015210417A
Authority
JP
Japan
Prior art keywords
font
character string
information
fonts
character
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
JP2014092537A
Other languages
Japanese (ja)
Inventor
亙 鈴木
Wataru Suzuki
亙 鈴木
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 JP2014092537A priority Critical patent/JP2015210417A/en
Publication of JP2015210417A publication Critical patent/JP2015210417A/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 provide a character string display environment having the sense of unity even when the used font differs depending on a character string.SOLUTION: An information processing device 100 according to the present invention comprises: a character string acquisition unit 111 capable of drawing a character string using a plurality of fonts and acquiring information indicating the character string displayed on a display screen; a language information acquisition unit 119 for acquiring the language information that is set in the information processing device; a font determination unit 112 for determining the font, among the plurality of fonts, that is used for drawing each of characters included in the character string displayed on the display screen; a drawing position determination unit 116 for determining, on the basis of the attribute information of the front corresponding to the acquired language information and the attribute information of the determined font among the plurality of fonts, a drawing position at which the character string is drawn; and a drawing control unit 117 for drawing the character string in accordance with the determined drawing position.

Description

本発明はフォントデータを用いて文字を描画する技術に関する。   The present invention relates to a technique for drawing characters using font data.

機器の表示画面に文字を表示するには、フォントの種類・表示する位置・大きさなどの指定を受け、フォントデータから表示させる文字に該当する形状情報を取得し、指定された表示位置や大きさなどに合わせるように描画した画像を表示画面に出力する。   To display characters on the display screen of the device, the font type, display position, size, etc. are specified, the shape information corresponding to the characters to be displayed is obtained from the font data, and the specified display position and size are displayed. The image drawn so as to match the size is output to the display screen.

一般的には、文字を並べて表示させて文字列とする場合、各文字のベースラインが揃うように描画されることが望ましい。ベースラインとは、文字列の位置揃えの基準となる仮想的な線をいう。各文字が、全て同じ大きさの画像(イメージデータ)として用意されたビットマップフォントの場合、文字の画像をタイルのように並べるだけでベースラインが揃うようにデザインされている。しかし、フォントの全体のデータサイズを抑えるために、画像の大きさが文字によって異なる場合もある。そこで特許文献1では、各文字の画像に対してベースラインより上の幅と下の幅の情報を保持しておくことで、ウムラウト文字やベースラインより下にはみ出る文字が混在した文字列でも、ベースラインを揃えて表示する方法が提案されている。   In general, when characters are arranged and displayed as a character string, it is desirable that the characters be drawn so that the baselines of the characters are aligned. A baseline is a virtual line that serves as a reference for aligning character strings. In the case of a bitmap font in which each character is prepared as an image (image data) of the same size, it is designed so that the baseline is aligned only by arranging the character images like tiles. However, in order to reduce the overall data size of the font, the size of the image may differ from character to character. Therefore, in Patent Document 1, by maintaining information on the width above and below the base line for each character image, even a character string in which umlaut characters and characters that protrude below the base line are mixed, A method has been proposed in which the baselines are aligned and displayed.

また1つの文字列に複数のフォントが使用されると、フォント毎にデザインされたベースラインの位置や文字の高さが異なるため、並べて描画された際にずれて見えることがある。そこで特許文献2では、入力された文字列に和文書体と欧文書体が含まれていることを検出し、欧文文字をビットマップ展開した後の文字上端と下端の幅に基づいて、和文書体の高さを変倍することでベースラインを揃えて印字する方法が提案されている。   In addition, when a plurality of fonts are used for one character string, the positions of the baselines and the heights of the characters designed for each font are different, so that they may appear to be shifted when drawn side by side. Therefore, in Patent Document 2, it is detected that the input character string includes a Japanese document body and a European document body, and the Japanese document body is based on the widths of the upper and lower ends of the character after bitmap expansion of the European characters. A method has been proposed in which the baseline is aligned by changing the height of the image.

特開2000−267645号公報JP 2000-267645 A 特開2007−72576号公報JP 2007-72576 A

しかしながら従来は、文字領域毎に、画面毎に、あるいは行毎に、設定されるベースラインの位置が変わってしまい、見た目の統一感が損なわれる場合があるという課題があった。
本発明は、上記課題を鑑みてなされたものであり、文字列によって使用されるフォントが異なる場合でも、統一感のある文字列の表示環境を提供することを目的とする。
However, conventionally, there has been a problem that the position of the set baseline is changed for each character area, for each screen, or for each line, and the sense of unity may be lost.
The present invention has been made in view of the above problems, and an object of the present invention is to provide a character string display environment with a sense of unity even when fonts used by character strings are different.

上記課題を解決するために、本発明に係る情報処理装置は、複数のフォントを用いて文字列を描画可能であって、表示画面に表示させる文字列を示す情報を取得する文字列取得手段と、前記情報処理装置において設定された言語情報を取得する言語情報取得手段と、
前記複数のフォントのうち、前記表示画面に表示させる文字列に含まれる各文字のそれぞれの描画に用いるフォントを決定するフォント決定手段と、前記複数のフォントのうち、前記言語情報取得手段によって取得された言語情報に対応するフォントの属性情報、及び、前記フォント決定手段によって決定されたフォントの属性情報に基づいて、前記文字列を描画する描画位置を決定する描画位置決定手段と、前記描画位置決定手段によって決定された描画位置に従って、前記文字列取得手段によって取得された情報が示す文字列の各文字のそれぞれを、前記フォント決定手段によって決定されたフォントを用いて描画する描画手段とを備える。
In order to solve the above-described problem, an information processing apparatus according to the present invention is capable of drawing a character string using a plurality of fonts, and a character string acquisition unit that acquires information indicating a character string to be displayed on a display screen; Linguistic information acquisition means for acquiring linguistic information set in the information processing apparatus;
Of the plurality of fonts, a font determination unit that determines a font used for drawing each character included in a character string to be displayed on the display screen; and the language information acquisition unit among the plurality of fonts is acquired by the language information acquisition unit. A drawing position determining means for determining a drawing position for drawing the character string, based on the font attribute information corresponding to the language information and the font attribute information determined by the font determining means; and the drawing position determination. In accordance with the drawing position determined by the means, a drawing means for drawing each character of the character string indicated by the information acquired by the character string acquisition means using the font determined by the font determination means.

本発明により、文字列によって使用されるフォントが異なる場合でも、統一感のある文字列の表示環境を提供することが可能となる。   According to the present invention, it is possible to provide a character string display environment with a sense of unity even when fonts used by character strings are different.

本実施形態のハードウェア構成及び機能構成の一例を示すブロック図A block diagram showing an example of a hardware configuration and a functional configuration of the present embodiment フォントデータを用いて描画される文字の詳細を表す図Diagram showing details of characters drawn using font data 文字列を描画する処理の流れの例を示すフローチャートA flowchart showing an example of a flow of processing for drawing a character string 文字の形状情報を取得する処理の流れの例を示すフローチャートThe flowchart which shows the example of the flow of the process which acquires the shape information of a character 文字の描画位置を決定する処理の流れの例を示すフローチャートThe flowchart which shows the example of the flow of the process which determines the drawing position of a character 本実施形態による文字列の描画結果の一例を示した図The figure which showed an example of the drawing result of the character string by this embodiment 文字の描画位置を決定する処理の流れの例を示すフローチャートThe flowchart which shows the example of the flow of the process which determines the drawing position of a character 文字の描画位置を決定する処理の流れの例を示すフローチャートThe flowchart which shows the example of the flow of the process which determines the drawing position of a character アセンド幅の大きいフォントの属性情報の一例を示した図Figure showing an example of attribute information for a font with a large ascend width 変形例における情報処理装置の機能構成の一例を示した図The figure which showed an example of the function structure of the information processing apparatus in a modification 従来の方法での文字の描画結果の一例を示した図The figure which showed an example of the drawing result of the character by the conventional method 従来の方法での文字の描画結果の一例を示した図The figure which showed an example of the drawing result of the character by the conventional method

以下、本発明の実施形態について図面を参照して説明する。なお、以下の実施の形態は特許請求の範囲に関る本発明を限定するものではなく、また、本実施の形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。なお、同一な構成については、同じ符号を付して説明する。   Embodiments of the present invention will be described below with reference to the drawings. The following embodiments do not limit the present invention related to the scope of claims, and all combinations of features described in the present embodiments are essential to the solution means of the present invention. Not necessarily. In addition, about the same structure, the same code | symbol is attached | subjected and demonstrated.

<第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.

本実施形態の情報処理装置100の構成について、図1を参照して説明する。図1(a)は、情報処理装置100のハードウェア構成を示す図である。CPU101はシステム制御部であり、システムバス107を介して接続される各ユニットを制御する。ROM102は変更を必要としないプログラムやパラメータを格納する読み取り専用のメモリである。RAM103は外部装置などから供給されるプログラムやデータを一時記憶する書き換え可能なメモリである。描画処理部104は、GUP(Graphics Processing Unit)等であり、プログラムによって描画したグラフィックスを出力する。描画処理部104で描画したグラフィックスやユーザインターフェースを表示するためのモニタやプロジェクタとのインターフェースである表示部105が構成に加わってもよい。また、描画処理部104で描画する対象となる文字列の入力として、キーボードやタッチパネルなどの入力部106が構成に加わってもよい。記憶部108はハードディスクドライブ、またはネットワークで接続された外部記憶装置などであり、本実施形態に係る各種データを記憶する。説明した構成に対して、プログラムコードを供給するための記憶媒体としてROM102のほかに以下のものがある。例えば、フレキシブルディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、CD−R、磁気テープ、メモリカード、DVDなどが本実施形態の情報処理装置の構成に加わってもよい。   The configuration of the information processing apparatus 100 according to the present embodiment will be described with reference to FIG. FIG. 1A is a diagram illustrating a hardware configuration of the information processing apparatus 100. The CPU 101 is a system control unit and controls each unit connected via the system bus 107. The ROM 102 is a read-only memory that stores programs and parameters that do not need to be changed. The RAM 103 is a rewritable memory that temporarily stores programs and data supplied from an external device. The drawing processing unit 104 is a GUP (Graphics Processing Unit) or the like, and outputs graphics drawn by a program. A display unit 105 that is an interface with a monitor or a projector for displaying graphics or a user interface drawn by the drawing processing unit 104 may be added to the configuration. In addition, an input unit 106 such as a keyboard or a touch panel may be added to the configuration as an input of a character string to be drawn by the drawing processing unit 104. The storage unit 108 is a hard disk drive or an external storage device connected via a network, and stores various data according to the present embodiment. In addition to the ROM 102, there are the following in addition to the ROM 102 as a storage medium for supplying program code to the configuration described. For example, a flexible disk, hard disk, optical disk, magneto-optical disk, CD-ROM, CD-R, magnetic tape, memory card, DVD, and the like may be added to the configuration of the information processing apparatus of this embodiment.

図1(b)は、本実施形態の情報処理装置100の機能構成を示す図である。各機能部は、CPU101が、ROM102に格納されたプログラムをRAM103に展開し、後述する各フローチャートに従った処理を実行することで実現されている。また例えば、CPU101を用いたソフトウェア処理の代替としてハードウェアを構成する場合には、ここで説明する各機能部の処理に対応させた演算部や回路を構成すればよい。   FIG. 1B is a diagram illustrating a functional configuration of the information processing apparatus 100 according to the present embodiment. 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. In addition, for example, when configuring hardware as an alternative to software processing using the CPU 101, it is only necessary to configure arithmetic units and circuits corresponding to the processing of each functional unit described here.

文字列取得部111は表示画面に描画する文字列を示す情報を取得する。描画する文字列は、予め決められた文言がROM102などに格納されていてもよく、キーボードやタッチパネル、マイクなどの入力デバイスによるユーザからの操作で入力される任意の文言であっても構わない。優先順位取得部118は、情報処理装置100が描画可能な複数のフォントのうち、少なくとも一部の複数のフォントについて、予め定められた優先順位に関する情報を取得する。この優先順位は、表示画面に文字情報を表示させる場合に、優先的に用いることが予め指定されたフォントの優先順位である。フォント決定部112は、文字列を構成する各文字をそれぞれ描画するために、ROM102や記憶部108に予め記憶された1以上のフォントデータから、どのフォントを使用するかを決定する。このとき、優先順位取得部118で取得した優先順位に基づいて使用するフォントを決定する。   The character string acquisition unit 111 acquires information indicating a character string to be drawn on the display screen. As the character string to be drawn, a predetermined word may be stored in the ROM 102 or the like, or an arbitrary word inputted by an operation from a user using an input device such as a keyboard, a touch panel, or a microphone. The priority order acquisition unit 118 acquires information regarding a predetermined priority order for at least some of the plurality of fonts that can be drawn by the information processing apparatus 100. This priority order is a priority order of fonts designated in advance to be preferentially used when displaying character information on the display screen. The font determining unit 112 determines which font to use from one or more font data stored in advance in the ROM 102 or the storage unit 108 in order to draw each character constituting the character string. At this time, the font to be used is determined based on the priority order acquired by the priority order acquisition unit 118.

属性情報取得部113は、フォントの属性情報をフォントデータから取得する。属性情報はフォントデータに格納されているフォント固有のメトリクス情報であり、例えばUnitsPerEm、アセンド幅、ディセンド幅、格納されている文字の最大の送り幅などがある。各用語の説明は、具体例を用いて後述する。形状情報取得部114は、文字列を構成する各文字に該当する形状情報を、フォント決定部112で決定したフォントデータから取得する。形状情報には文字の描画結果を画像形式で表したものや、文字の輪郭(アウトライン)をベクター形式で表したものなどがあるが、形状情報の形式は限定しない。基準位置取得部115は、文字列の描画位置を決めるための基準となる位置情報を取得する。位置情報は、予め決められていて、ROM102などから読み込むことができる。また、ユーザの操作により入力デバイスを介して取得することができる。言語情報取得部119は、表示する文字列について、言語設定して指定された言語情報を取得する。言語設定で指定された言語情報とは、表示画面に表示する文字情報を、どの言語を用いて表示させるかを示す情報であって、本実施形態では予め装置の設計段階で初期値が設定されていることを想定している。ただし、操作者によって、任意のタイミングで言語設定が変更されてもよい。また、GPS(Global Positioning System)センサにより、装置の現在の位置情報を取得し、位置情報と公用語との対応付け情報を参照することで、言語情報を取得する構成としてもよい。   The attribute information acquisition unit 113 acquires font attribute information from the font data. The attribute information is metric information unique to the font stored in the font data, and includes, for example, UnitsPerEm, ascend width, descend width, and maximum feed width of stored characters. Explanation of each term will be described later using a specific example. The shape information acquisition unit 114 acquires shape information corresponding to each character constituting the character string from the font data determined by the font determination unit 112. The shape information includes a character drawing result in an image format and a character outline (outline) in a vector format, but the shape information format is not limited. The reference position acquisition unit 115 acquires position information serving as a reference for determining the drawing position of the character string. The position information is determined in advance and can be read from the ROM 102 or the like. Moreover, it can acquire via an input device by a user's operation. The language information acquisition unit 119 acquires the language information specified by setting the language for the character string to be displayed. The language information specified in the language setting is information indicating which language is used to display the character information displayed on the display screen. In this embodiment, initial values are set in advance in the device design stage. Assuming that However, the language setting may be changed at an arbitrary timing by the operator. Moreover, it is good also as a structure which acquires language information by acquiring the present position information of an apparatus with a GPS (Global Positioning System) sensor, and referring the matching information of position information and an official language.

描画位置決定部116は、基準位置取得部115で取得した基準位置と、属性情報取得部113により取得された属性情報とに基づいて、文字列の描画位置を決定する。このとき、情報処理装置100の使用環境において、文字の描画に使用される頻度が高いとみなされる1つ以上のフォントの属性情報に従って、描画位置を決定する。第1の実施形態では、言語情報取得部119で取得された言語情報によって特定されるフォントの属性情報に従って、描画位置を決定する。描画制御部117は、形状情報取得部114で取得した文字の形状情報に基づいて、描画位置決定部116で決定した位置に文字を描画する。描画制御部117による描画結果は、ディスプレイなどの表示部に転送されて表示されることを想定しているが、出力デバイスは限定しない。   The drawing position determination unit 116 determines the drawing position of the character string based on the reference position acquired by the reference position acquisition unit 115 and the attribute information acquired by the attribute information acquisition unit 113. At this time, in the usage environment of the information processing apparatus 100, the drawing position is determined according to attribute information of one or more fonts that are considered to be frequently used for character drawing. In the first embodiment, the drawing position is determined according to the attribute information of the font specified by the language information acquired by the language information acquisition unit 119. The drawing control unit 117 draws the character at the position determined by the drawing position determination unit 116 based on the character shape information acquired by the shape information acquisition unit 114. Although it is assumed that the drawing result by the drawing control unit 117 is transferred to a display unit such as a display for display, the output device is not limited.

まず、図2を参照して、フォントデータを用いて描画される文字の詳細を説明する。機器の表示画面において、図2(a)のようなボタンを模した部品201や、図2(b)のような文字列編集領域を囲っている矩形202上に文字列を重畳させて表示することがある。その際、文字列の表示位置を示す座標は、部品201や矩形202から文字列がはみ出て表示されるのを避けるため、部品や矩形に関する座標を基準として指定されることが多い。ここでは、文字列を重ねる部品や矩形の左上座標を、文字列を表示する基準位置とする。図2(a)では部品201の左上位置203が基準位置であり、図2(b)では矩形202の左上204の座標が基準位置である。次に、フォントデータの属性情報について図2(c)を参照して具体的に説明する。図2(c)は左からアルファベットフォント、漢字フォント、数字フォントの3種類の異なるフォントデータに格納されている形状情報「p」「日」「3」を画像化したものである。形状情報の形式はアウトライン形式でも画像形式でも構わない。フォントの属性情報の1つにUnitsPerEmがある。これは活字のサイズを一辺とする正方形を、組版における相対的な長さの単位としたものがemであり、1emあたりの長さを定義したものがUnitsPerEmである。図2(c)に示す幅222がUnitsPerEmであり、図2(c)に示す3種類のフォントのUnitsPerEmは全て同じ値とする。ベースラインは文字列の位置揃えの基準となる仮想的な線のことであり、図2(c)において、線211、214、217は各フォントのベースラインを示したものである。線220は文字の上端を示すアセンダラインであり、線221は文字の下端を示すディセンダラインである。ベースラインからアセンダラインまでの高さをアセンド幅、ベースラインからディセンダラインまでの高さをディセンド幅と呼ぶ。一般的にアセンド幅とディセンド幅を足したものがUnitsPerEmとなるフォントが多い。図2(c)において、幅212、215、218は各フォントのアセンダ幅を示したものであり、幅213、216、219はディセンダ幅を示したものである。   First, the details of characters drawn using font data will be described with reference to FIG. On the display screen of the device, a character string is superimposed and displayed on a part 201 imitating a button as shown in FIG. 2A or a rectangle 202 surrounding a character string editing area as shown in FIG. Sometimes. At this time, the coordinates indicating the display position of the character string are often specified on the basis of the coordinates relating to the component or rectangle in order to avoid the character string protruding from the component 201 or the rectangle 202. Here, the upper left coordinate of the part or rectangle on which the character string is superimposed is set as a reference position for displaying the character string. In FIG. 2A, the upper left position 203 of the component 201 is the reference position, and in FIG. 2B, the coordinates of the upper left 204 of the rectangle 202 are the reference position. Next, the attribute information of the font data will be specifically described with reference to FIG. FIG. 2C is an image of shape information “p”, “date”, and “3” stored in three different font data of alphabet font, kanji font, and numeric font from the left. The format of the shape information may be an outline format or an image format. One of the font attribute information is UnitsPerEm. In this case, a square whose side is the size of a type is a unit of relative length in typesetting, and em is a unit that defines a length per em. The width 222 shown in FIG. 2C is UnitsPerEm, and the UnitsPerEm of the three types of fonts shown in FIG. The baseline is a virtual line that serves as a reference for aligning character strings. In FIG. 2C, lines 211, 214, and 217 indicate the baseline of each font. A line 220 is an ascender line indicating the upper end of the character, and a line 221 is a descender line indicating the lower end of the character. The height from the base line to the ascender line is called the ascend width, and the height from the base line to the descender line is called the descend width. In general, there are many fonts whose UnitsPerEm is the sum of the ascend width and the descend width. In FIG. 2C, the widths 212, 215, and 218 indicate the ascender widths of the respective fonts, and the widths 213, 216, and 219 indicate the descender widths.

ここで、本実施形態との比較のため、本実施形態が解決する課題の詳細について図11及び図12を用いて説明する。図11は、文字種ごとに図2(c)に示したアルファベットフォントと漢字フォントを使って、文字列「Jp」「Jp日本」を描画した様子を表す。図2(a)または(b)に示したような部品や矩形領域の左上座標が、基準位置1101として指定された場合を想定し、アセンダラインを合わせるように複数の文字が並べられている。図11(a)の左は、基準位置1101のy座標にアルファベットフォントのアセンダラインが合わせられている。従って、基準位置1101から、アルファベットフォントのアセンド幅212だけ下にシフトしたい位置にベースライン位置1102が来るように文字列「Jp」を描画したものである。一方で図11(a)の右は、文字列「Jp」を描画した段階でアルファベットフォントのデザインに基づいて決定されたベースライン位置1102を維持した状態で、続けて文字列「日本」を漢字フォントで描画した結果を示す。アルファベットフォントと比べて漢字フォントはアセンド幅が広いため、漢字は基準位置1101のy座標を超える可能性がある。つまり、部品201や矩形202からはみ出してしまう場合が生じる。   Here, for comparison with the present embodiment, details of the problem solved by the present embodiment will be described with reference to FIGS. 11 and 12. FIG. 11 shows a state in which the character strings “Jp” and “Jp Japan” are drawn using the alphabet font and the kanji font shown in FIG. 2C for each character type. Assuming that the upper left coordinate of the part or rectangular area as shown in FIG. 2A or 2B is designated as the reference position 1101, a plurality of characters are arranged so that the ascender lines are aligned. On the left in FIG. 11A, an ascender line of an alphabet font is aligned with the y coordinate of the reference position 1101. Therefore, the character string “Jp” is drawn so that the base line position 1102 comes to a position to be shifted downward from the reference position 1101 by the ascending width 212 of the alphabet font. On the other hand, the right side of FIG. 11A shows the character string “Japan” in the kanji state while maintaining the baseline position 1102 determined based on the alphabet font design when the character string “Jp” is drawn. Indicates the result of drawing in font. Since the kanji font has a wider ascending width than the alphabet font, the kanji may exceed the y coordinate of the reference position 1101. That is, the part 201 or the rectangle 202 may be protruded.

そこで、従来、文字列描画で複数のフォントが使用された場合には、実際に使用されるフォントの中で最も広いアセンド幅によって、ベースライン位置を決定して描画するという方法が用いられることがある。この方法を用いて描画を行った結果が図11(b)である。図11(b)左のベースライン位置1103は、アルファベットフォントのアセンド幅に基づく位置であり、図11(b)右のベースライン位置1104は、アルファベットフォントよりアセンド幅の広い漢字フォントに基づく描画位置である。この方法では、文字列「Jp」と「Jp日本」とで幅1105だけベースライン位置のずれが生じる。つまり、例えばアルファベットフォントだけで構成される文字列が配置された部品と、アルファベットフォントと漢字フォントとで構成される文字列が配置された部品とでは、ベースライン位置が異なる。そのため、並べて表示された場合には見た目の統一感が損なわれる。さらに、この課題を解決するために、従来、文字列の描画で使用される可能性のある全てのフォントを考慮し、その中で最も広いアセンド幅によってベースライン位置を決定するという考え方があった。この方法を用いた場合の描画結果が図11(c)である。文字列「Jp」、「Jp日本」ともに、アセンド幅の大きい漢字フォントによってベースライン位置を決定するため、描画する文字列によってベースライン位置1106は変わらない。ここで、使用する可能性がある全てのフォントを考慮する方法としては、予め登録されたフォントや、装置に記憶されている全てのフォントを考慮することができる。例えば、フォントリストと呼ばれる技術を利用することができる。ここで、フォントリストについて説明する。1つのフォントデータに、入力される全ての文字の情報が格納されているとは限らない。従って、フォントデータに格納されていない文字が入力された場合、その文字は代替文字(Missing−Glyph)に置き換わるため、所望とされる文字列を正しく表示できない。そこで、複数のフォントに対して予め使用する優先順位を設定しておき、優先順位の高いフォントデータに格納されていない文字は、次に優先順位の高いフォントデータを用いた描画に置き換える。このようにして、代替文字へ置換される事象を低減させる技術を、複数のフォントデータを一覧として管理することから、フォントリストと呼ぶ。従って、フォントリストとして指定された複数のフォントの全てを、文字列の描画で使用される可能性のある全てのフォントであるとみなすことができる。   Therefore, conventionally, when a plurality of fonts are used for character string drawing, a method of determining and drawing a baseline position with the widest ascend width among the fonts actually used may be used. is there. FIG. 11B shows the result of drawing using this method. The left base line position 1103 in FIG. 11B is a position based on the ascending width of the alphabet font, and the right base line position 1104 in FIG. 11B is a drawing position based on a kanji font having a wider ascending width than the alphabet font. It is. In this method, the baseline position is shifted by a width 1105 between the character strings “Jp” and “Jp Japan”. That is, for example, the base line position is different between a component in which a character string composed only of alphabet fonts is arranged and a component in which a character string composed of alphabet fonts and kanji fonts is arranged. Therefore, when the images are displayed side by side, the sense of unity of appearance is impaired. Furthermore, in order to solve this problem, conventionally, there has been a concept of taking into consideration all fonts that may be used in character string drawing and determining the baseline position with the widest ascend width among them. . FIG. 11C shows a drawing result when this method is used. In both the character strings “Jp” and “Jp Japan”, the base line position is determined by the character string to be drawn because the base line position is determined by the kanji font having a large ascend width. Here, as a method of considering all fonts that may be used, it is possible to consider pre-registered fonts or all fonts stored in the apparatus. For example, a technique called a font list can be used. Here, the font list will be described. Information on all characters to be input is not necessarily stored in one font data. Therefore, when a character that is not stored in the font data is input, the character is replaced with a substitute character (Missing-Glyph), so that a desired character string cannot be displayed correctly. Therefore, priorities to be used are set in advance for a plurality of fonts, and characters that are not stored in the font data with the highest priority are replaced with drawing using the font data with the next highest priority. In this way, the technique for reducing the phenomenon of substitution with substitute characters is called a font list because a plurality of font data is managed as a list. Therefore, all of the plurality of fonts specified as the font list can be regarded as all the fonts that may be used in drawing the character string.

しかし、この方法でも課題が生じる。それを、図12(a)を参照して説明する。図12の左右の文字列はともに、文字列「eg」を描画する基準位置1201は同じ座標であるが、図12左はアルファベットフォントだけを考慮してベースライン位置を決めて、文字列「eg」を描画した結果である。一方、図12右は使用するフォントの優先順位をアルファベットフォント、漢字フォント、数字フォントの順に、フォントリストが設定されていることを想定して、図11(c)で説明したような方法でベースライン位置を決めて描画した結果である。描画する文字列「eg」には、アルファベットよりアセンド幅の大きいフォントを使用する文字は含まれていないが、図12(b)では、使用する可能性があるという理由から、ベースライン位置を低い位置に定めている。そのため、図12左のベースライン位置1202と比べて、図12右のベースライン位置1203は下がっている。このように、使用する可能性があっても、実際には使用されないフォントを考慮してベースラインを決定すると、図12右のように、文字列上部のスペース1204部分に必要以上の空白が存在するように感じられることがある。このように、使用頻度が低く、かつアセンド幅が広いフォントを考慮してしまうと、空白部分が増え、描画領域を有効に活用できなくなる場合がある。   However, this method also has problems. This will be described with reference to FIG. In both the left and right character strings in FIG. 12, the reference position 1201 for drawing the character string “eg” has the same coordinates, but the left side of FIG. 12 determines the baseline position in consideration of only the alphabet font, and the character string “eg” "Is the result of drawing. On the other hand, the right side of FIG. 12 assumes that the font list is set in the order of alphabet fonts, kanji fonts, and numeric fonts in the order of priority of fonts to be used, as described in FIG. 11C. This is the result of drawing with the line position determined. The character string “eg” to be drawn does not include characters that use a font having a larger ascending width than the alphabet, but in FIG. 12B, the baseline position is low because of the possibility of use. The position is fixed. Therefore, the baseline position 1203 on the right in FIG. 12 is lower than the baseline position 1202 on the left in FIG. In this way, even if there is a possibility of use, if a baseline is determined in consideration of a font that is not actually used, there is more blank space than necessary in the space 1204 at the top of the character string as shown in the right of FIG. May feel like. As described above, if a font having a low use frequency and a wide ascend width is taken into consideration, there are cases where the blank area increases and the drawing area cannot be used effectively.

以上のような従来の課題を解決するため、本実施形態では、入力される文字列、使用する優先順位が予め決定されているフォント情報、及びユーザが指定する言語情報を考慮して、ベースラインの基準とするフォントを特定する。本実施形態の処理フローについて図3、図4、図5を用いて説明する。   In order to solve the conventional problems as described above, in the present embodiment, a baseline is considered in consideration of an input character string, font information in which priority to be used is determined in advance, and language information specified by the user. Specifies the font used as the reference for The processing flow of this embodiment will be described with reference to FIGS. 3, 4, and 5.

図3は本実施形態の文字列描画の処理フローの一例を示している。本実施形態では、装置の電源が起動、あるいは特定のアプリケーションが実行され、表示画面に表示する画像の描画処理が開始されたことに応じて、図3のフローチャートが開始される。なお、本実施形態では、上述したフォントリスト技術によって、入力される文字列に対し、優先順位が定められた複数のフォントが指定されることを想定している。   FIG. 3 shows an example of the processing flow of character string drawing of this embodiment. In the present embodiment, the flowchart of FIG. 3 is started in response to activation of the power supply of the apparatus or execution of a specific application to start drawing processing of an image displayed on the display screen. In the present embodiment, it is assumed that a plurality of fonts having priorities are specified for an input character string by the font list technique described above.

ステップS301で、文字列取得部111が、描画する文字列を示す情報を取得する。例えば、ROM102や記憶部108などに格納された画面情報(例えば構造化文書)を解析することで、描画される文字列の各文字を示す文字コードを取得する。あるいは、キーボードやタッチパネルなどの入力デバイスから、ユーザによる指示を取得し、解析することで情報を取得する。次に、ステップS302では、優先順位取得部118が、使用する可能性のあるフォントの優先順位情報を取得する。本実施形態では、優先順位は少なくとも1つ以上のフォントに対して、フォントリストの形式で設定される。ステップS303では、基準位置取得部115が、ステップS301で取得された文字列の描画位置を決めるための基準位置を取得する。本実施形態では、文字列の表示領域の左上座標を、基準位置として取得する。ただし、基準位置は領域の左上座標に限定されるわけではない。基準位置とフォントの属性情報とを参照することによって、文字列の描画位置が一意に決まる座標であればよい。本実施形態における描画位置とは、描画する文字列のベースライン位置である。ステップS304では、描画位置決定部116が、優先順位情報に含まれるフォントのうち、少なくとも1つ以上のフォントに関する属性情報によって文字列の描画位置を決定する。本実施形態の場合は、描画位置として、文字列を配置する基準となるベースラインの位置を決定する。本実施形態において、ステップS304で属性情報を考慮する少なくとも1つ以上のフォントは、情報処理装置100の使用環境において、文字列の描画に用いる頻度の高いフォントが選択される。第1の実施形態では、言語設定で設定されている言語に対応づけられたフォントのアセンド幅を考慮して、ベースラインを決定する例を説明する。第1の実施形態のステップS304において実行される処理の詳細な内容は、図4を参照して後述する。   In step S301, the character string acquisition unit 111 acquires information indicating a character string to be drawn. For example, by analyzing screen information (for example, a structured document) stored in the ROM 102 or the storage unit 108, a character code indicating each character of the character string to be drawn is acquired. Alternatively, information is acquired by acquiring and analyzing a user instruction from an input device such as a keyboard or a touch panel. Next, in step S302, the priority level acquisition unit 118 acquires priority level information of fonts that may be used. In this embodiment, the priority is set in the form of a font list for at least one font. In step S303, the reference position acquisition unit 115 acquires a reference position for determining the drawing position of the character string acquired in step S301. In the present embodiment, the upper left coordinate of the display area of the character string is acquired as the reference position. However, the reference position is not limited to the upper left coordinate of the area. Any coordinates may be used as long as the drawing position of the character string is uniquely determined by referring to the reference position and the attribute information of the font. The drawing position in the present embodiment is a baseline position of a character string to be drawn. In step S304, the drawing position determination unit 116 determines the drawing position of the character string based on the attribute information regarding at least one font among the fonts included in the priority order information. In the case of this embodiment, the position of the baseline serving as a reference for arranging the character string is determined as the drawing position. In the present embodiment, as the at least one font for which attribute information is considered in step S304, a font that is frequently used for drawing a character string is selected in the usage environment of the information processing apparatus 100. In the first embodiment, an example will be described in which the baseline is determined in consideration of the ascending width of the font associated with the language set in the language setting. Detailed contents of the processing executed in step S304 of the first embodiment will be described later with reference to FIG.

ステップS305では、形状情報取得部114が、ステップS301で取得した文字列の各文字の情報のうち、先頭文字を現在の文字としてセットする。すなわち、先頭の文字を示す文字コードをカレント処理の対象文字を示す情報としてRAM103に保持する。ステップS306では、形状情報取得部114が、現在の文字に該当する形状情報を、優先順位情報に含まれるフォントから取得する。本実施形態で扱うフォントデータでは、文字コードに関連付けられたアウトライン形式のデータが形状情報として格納されていることを想定している。ただし、形状情報は画像形式であっても構わない。ステップS306におけるフォントからの形状情報の取得処理の詳細は後述する。ステップS307では、描画制御部117が、現在の文字に該当する形状情報に基づいて、ステップS304で決定された描画位置に文字を描画する。ステップS308では、形状情報取得部114が、文字列に含まれる全ての文字に対して描画処理を終えたか判定する。全ての文字を処理したと判定された場合(ステップS308でYES)は、処理を終了する。一方、全ての文字を処理したと判定された場合(ステップS308でYES)は、すなわち、取得された文字列に未処理の文字が残っている場合は、ステップS309に進む。ステップS309では、形状情報取得部114が、次の文字を現在の文字にセットして処理をステップS306に移す。そして、文字列に含まれる全ての文字が処理されるまで、ステップS306からステップS309の処理を繰り返す。   In step S305, the shape information acquisition unit 114 sets the first character as the current character among the information on each character of the character string acquired in step S301. That is, the character code indicating the first character is stored in the RAM 103 as information indicating the target character of the current process. In step S306, the shape information acquisition unit 114 acquires the shape information corresponding to the current character from the font included in the priority order information. In the font data handled in this embodiment, it is assumed that outline format data associated with a character code is stored as shape information. However, the shape information may be an image format. Details of the processing for acquiring shape information from the font in step S306 will be described later. In step S307, the drawing control unit 117 draws a character at the drawing position determined in step S304 based on the shape information corresponding to the current character. In step S308, the shape information acquisition unit 114 determines whether drawing processing has been completed for all characters included in the character string. If it is determined that all characters have been processed (YES in step S308), the process ends. On the other hand, if it is determined that all characters have been processed (YES in step S308), that is, if unprocessed characters remain in the acquired character string, the process proceeds to step S309. In step S309, the shape information acquisition unit 114 sets the next character as the current character, and the process proceeds to step S306. Then, the processes from step S306 to step S309 are repeated until all the characters included in the character string are processed.

なお本実施形態では、画面に表示する画像の構成要素として、文字列が描画される部品が複数存在する等、1以上の独立した文字列が存在する場合でも、ステップS301において全ての要素の文字列の情報を取得して、後に続く描画処理を行う。これにより、1画面の中の1以上の独立した文字列が含まれる画面においても、統一された描画位置に沿って文字が描画されるので、処理負荷を低減しつつ、各文字列の見た目の統一性を向上させることができる。さらに、本実施形態では、ユーザ操作などに応じて、既に描画処理を終え表示された画像の一部に再描画の必要が生じた場合は、再描画により更新される部分に対して図3のフローチャートの処理が実行されるとする。ただし、1以上の独立した文字列についてそれぞれ図3のフローチャートの処理を行う場合、ステップS304が実行される度に、同一の描画位置が決定されるので、各文字列の見た目の統一性を向上させることができる。   In this embodiment, even if one or more independent character strings exist, such as when there are a plurality of parts on which a character string is drawn, as the components of the image displayed on the screen, the characters of all the elements in step S301 The column information is acquired, and subsequent drawing processing is performed. As a result, even on a screen including one or more independent character strings in one screen, characters are drawn along a uniform drawing position, so that the appearance of each character string is reduced while reducing the processing load. Unity can be improved. Furthermore, in the present embodiment, when it is necessary to redraw a part of the displayed image after finishing the drawing process in response to a user operation or the like, the part shown in FIG. It is assumed that the process of the flowchart is executed. However, when the processing of the flowchart of FIG. 3 is performed for each of one or more independent character strings, the same drawing position is determined each time step S304 is executed, so the visual uniformity of each character string is improved. Can be made.

次に、ステップS306において実行される、文字の形状情報の取得処理の詳細な流れを図4のフローチャートを参照して説明する。なお本実施形態では、優先順位情報に少なくとも1つ以上のフォントが含まれているものとする。以下では、本実施形態で扱うフォントの一例として、TrueType形式のアウトラインフォントを想定し、TrueType形式のフォントに由来する用語を用いて処理を説明する。ただし、用いるフォントはこれに限定されない。   Next, the detailed flow of the character shape information acquisition process executed in step S306 will be described with reference to the flowchart of FIG. In the present embodiment, it is assumed that at least one font is included in the priority order information. In the following, assuming that a TrueType outline font is assumed as an example of the font handled in the present embodiment, processing will be described using terms derived from the TrueType font. However, the font to be used is not limited to this.

ステップS401では、フォント決定部112が、ステップS302で取得された優先順位情報のうち、最優先に使用することが定義されたフォントを現在の(その時点での描画処理の対象とされている)フォントにセットする。ステップS402では、フォント決定部112が、ROM102や記憶部108に記憶されている1以上のフォントのフォントデータのうち、現在のフォントのフォントデータから、現在の文字に該当するグリフインデックスを取得する。グリフインデックスとは、フォントデータに格納されている、各文字の形状情報と、文字コードとをマッピングするための識別情報である。以降、グリフインデックスはGIDと表記する。フォント決定部112は、本実施形態の現在の文字に該当する形状情報が、現在のフォントに格納されていれば0ではないGIDを取得し、該当する形状情報がなければ0を返す。TrueType形式のフォントにおいては、GIDが0にマッピングされている形状情報は代替文字(Missing−Glyph)と呼ばれ、該当する形状情報が存在しない文字に対しては、この代替文字の形状情報が取得される仕組みとなっている。ステップS403では、フォント決定部112が、GIDが0か否かを判定する。GIDが0でないと判定された場合(ステップS403でNO)、現在の文字に該当する形状情報が、現在のフォントのフォントデータに格納されている。従って、フォント決定部112は、現在のフォントを、現在の文字を描画するのに用いるフォントとして決定することができる。この場合、ステップS404において、形状情報取得部114が、GIDに該当する文字の形状情報を取得する。   In step S401, the font determining unit 112 uses the current font defined to be used with the highest priority among the priority order information acquired in step S302 (which is the target of the rendering process at that time). Set to font. In step S <b> 402, the font determination unit 112 acquires a glyph index corresponding to the current character from the font data of the current font among the font data of one or more fonts stored in the ROM 102 or the storage unit 108. The glyph index is identification information for mapping the shape information of each character and the character code stored in the font data. Hereinafter, the glyph index is expressed as GID. The font determination unit 112 acquires a non-zero GID if the shape information corresponding to the current character of this embodiment is stored in the current font, and returns 0 if there is no corresponding shape information. In TrueType fonts, the shape information with GID mapped to 0 is called a substitute character (Missing-Glyph). For characters for which there is no corresponding shape information, the shape information of this substitute character is acquired. It is a mechanism to be done. In step S403, the font determination unit 112 determines whether or not the GID is 0. If it is determined that the GID is not 0 (NO in step S403), shape information corresponding to the current character is stored in the font data of the current font. Therefore, the font determination unit 112 can determine the current font as the font used to draw the current character. In this case, in step S404, the shape information acquisition unit 114 acquires the shape information of the character corresponding to the GID.

一方、ステップS403で、GIDが0であると判定された場合(ステップS403でYES)、処理はステップS405に進む。ステップS405において、フォント決定部112が、ステップS302で取得された優先順位情報において、現在のフォントの次に優先されるフォントが設定されているかを判定する。現在のフォントの次に優先されるフォントが設定されていると判定された場合(ステップS405でYES)、ステップS406に進む。ステップS406でフォント決定部112は、現在のフォントの次に優先されるフォントを現在のフォントにセットし、処理をステップS402に移す。そして、優先順位情報に含まれるフォントがなくなるか、0ではないGIDが取得できるまで、ステップS402〜ステップS406までの処理を繰り返す。一方、現在のフォントの次に優先されるフォントが設定されてないと判定された場合(ステップS405でNO)、処理はステップS407に進み、フォント決定部112は、優先順位情報で定義されている最優先フォントを現在のフォントにセットする。この場合はステップS404で、フォント決定部112が、GIDが0に該当する形状情報として、代替文字の形状情報を取得して処理を終了する。   On the other hand, if it is determined in step S403 that GID is 0 (YES in step S403), the process proceeds to step S405. In step S405, the font determination unit 112 determines whether or not a priority font next to the current font is set in the priority order information acquired in step S302. If it is determined that the next priority font is set after the current font (YES in step S405), the process proceeds to step S406. In step S406, the font determination unit 112 sets the next priority font after the current font as the current font, and the process proceeds to step S402. Then, the processing from step S402 to step S406 is repeated until there is no font included in the priority information or a non-zero GID can be acquired. On the other hand, if it is determined that the next priority font after the current font is not set (NO in step S405), the process proceeds to step S407, and the font determination unit 112 is defined by the priority information. Set the highest priority font to the current font. In this case, in step S404, the font determination unit 112 acquires the substitute character shape information as the shape information corresponding to GID of 0, and ends the process.

次に、図3のステップS304において実行される、描画位置を決定する処理の流れを、図5のフローチャートを参照して説明する。ステップS501において、描画位置決定部116が、現在のアセンド幅を示す変数Curを0に初期化する。次に、ステップS502において、言語情報取得部119が、描画する文字列に対する言語情報を取得する。本実施形態の情報処理装置100では、機器の表示画面における文字情報を表す言語を、言語設定として、操作者などが意図して設定可能である。言語情報取得部119は、英語、日本語、アラビア語などを示す言語情報を取得する。ステップS503では、言語情報取得部119が、ステップS302で取得された優先順位情報に含まれるフォントの中に、取得した言語情報の代表文字に該当する形状情報を含んだフォントがあるか判定する。本実施形態では、一例として、コンピュータでの利用を目的とした8ビット文字コードの標準であるISO/IEC8859で分類されているコードポイントに従い、各言語の代表文字を決定する。そして、代表文字に該当する形状情報を、優先順位情報に含まれるフォントから検索し、見つかれば言語情報の代表文字の形状情報を含んだフォントがあると判定する。優先順位情報に含まれるフォントの中に、取得した言語情報の代表文字の形状情報を含んだフォントがあると判定された場合(ステップS503でYES)、処理はステップS504に進む。ステップS504では、属性情報取得部113が、取得された言語情報の代表文字を含んだフォントの属性情報を取得して、アセンド幅をCurにセットする。一方、優先順位情報に含まれるフォントの中に、取得した言語情報の代表文字の形状情報を含んだフォントがないと判定された場合(ステップS503でNO)、ステップS504の処理を省略し、処理はステップS505に進む。   Next, the flow of processing for determining the drawing position executed in step S304 in FIG. 3 will be described with reference to the flowchart in FIG. In step S501, the drawing position determination unit 116 initializes a variable Cur indicating the current ascending width to zero. Next, in step S502, the language information acquisition unit 119 acquires language information for the character string to be drawn. In the information processing apparatus 100 of the present embodiment, the language representing the character information on the display screen of the device can be set as the language setting by the operator or the like. The language information acquisition unit 119 acquires language information indicating English, Japanese, Arabic, and the like. In step S503, the language information acquisition unit 119 determines whether there is a font including shape information corresponding to the representative character of the acquired language information among the fonts included in the priority order information acquired in step S302. In this embodiment, as an example, representative characters of each language are determined according to code points classified by ISO / IEC 8859, which is an 8-bit character code standard intended for use in computers. Then, the shape information corresponding to the representative character is searched from the fonts included in the priority information, and if it is found, it is determined that there is a font including the shape information of the representative characters of the language information. If it is determined that there is a font including shape information of the representative character of the acquired language information among the fonts included in the priority order information (YES in step S503), the process proceeds to step S504. In step S504, the attribute information acquisition unit 113 acquires font attribute information including the representative characters of the acquired language information, and sets the ascend width to Cur. On the other hand, if it is determined that there is no font that includes the shape information of the representative characters of the acquired language information among the fonts included in the priority order information (NO in step S503), the process of step S504 is omitted and the process is performed. Advances to step S505.

ステップS505では、描画位置決定部116が、優先順位情報で最優先に定義されているフォントを、現在のフォントにセットする。ステップS506では、描画位置決定部116が、現在のフォントが図3のステップS301で取得した文字列の描画で実際に使用されるか否かを判定する。具体的には、ステップS301で取得した文字コードに基づいて、現在のフォントのフォントデータに当該文字コードに対応する形状情報が格納されているかを判定する。取得した文字列のうち1文字でも、該当する形状情報が現在のフォントに格納されている場合は、現在のフォントは実際に使用されると判定する。現在のフォントは実際には使用されないと判定された場合(ステップS506でNO)は、処理はステップS507に進む。現在のフォントは実際に使用されると判定された場合(ステップS506でYES)は、処理はステップS508に進む。ステップS508では、属性情報取得部113が、現在のフォントのアセンド幅を取得する。ステップS509では、描画位置決定部116が、取得されたアセンド幅がCurにセットされている値より大きいか否かを判定する。アセンド幅がCurにセットされている値より大きいと判定された場合(ステップS509でYES)、ステップS510に進む。アセンド幅がCurにセットされている値より小さいと判定された場合(ステップS509でNO)は、ステップS507に進む。ステップS510では、属性情報取得部113が、ステップS508で取得したアセンド幅をCurにセットして、ステップS507に進む。   In step S505, the drawing position determination unit 116 sets the font defined with the highest priority in the priority order information as the current font. In step S506, the drawing position determination unit 116 determines whether or not the current font is actually used for drawing the character string acquired in step S301 of FIG. Specifically, based on the character code acquired in step S301, it is determined whether or not shape information corresponding to the character code is stored in the font data of the current font. If even one character of the acquired character string has the corresponding shape information stored in the current font, it is determined that the current font is actually used. If it is determined that the current font is not actually used (NO in step S506), the process proceeds to step S507. If it is determined that the current font is actually used (YES in step S506), the process proceeds to step S508. In step S508, the attribute information acquisition unit 113 acquires the ascend width of the current font. In step S509, the drawing position determination unit 116 determines whether or not the acquired ascend width is larger than the value set in Cur. If it is determined that the ascending width is larger than the value set in Cur (YES in step S509), the process proceeds to step S510. If it is determined that the ascend width is smaller than the value set in Cur (NO in step S509), the process proceeds to step S507. In step S510, the attribute information acquisition unit 113 sets the ascend width acquired in step S508 to Cur, and the process proceeds to step S507.

ステップS507では、描画位置決定部116が、ステップS302で取得された優先順位情報において、現在のフォントの次に優先されるフォントの設定があるかを判定する。現在のフォントの次に優先されるフォントの設定があると判定された場合(ステップS507でYES)、ステップS512に進む。ステップS512においては、現在のフォントの次に優先されるフォントを現在のフォントにセットして、ステップS506に戻る。そして、次の優先フォントがなくなるまで、ステップS506からステップS512までの処理を繰り返す。一方、現在のフォントの次に優先されるフォントの設定がないと判定された場合(ステップS507でNO)、処理はステップS511に進む。ステップS511では、描画位置決定部116が、Curの値によってベースライン位置を決定して処理を終了する。本実施形態では、描画位置決定部116は、ベースラインの位置は、基準位置である文字列描画領域の左上座標からCurの値だけy座標を、文字に向かって下側にシフトした位置と決定する。   In step S507, the drawing position determination unit 116 determines whether or not there is a font setting prioritized next to the current font in the priority order information acquired in step S302. If it is determined that there is a font setting prioritized next to the current font (YES in step S507), the process proceeds to step S512. In step S512, the font that is prioritized after the current font is set to the current font, and the process returns to step S506. Then, the processing from step S506 to step S512 is repeated until there is no next priority font. On the other hand, if it is determined that there is no setting of a font to be prioritized next to the current font (NO in step S507), the process proceeds to step S511. In step S511, the drawing position determination unit 116 determines the baseline position based on the value of Cur and ends the process. In the present embodiment, the drawing position determination unit 116 determines that the position of the baseline is a position obtained by shifting the y coordinate downward from the upper left coordinates of the character string drawing area, which is the reference position, by the value of Cur toward the character. To do.

以上の処理により、本実施形態では、予め定められた優先度が高かったとしても、入力される文字列の中で使用されないフォントは、ベースラインを決定する処理に考慮しない。その一方で、優先順位を付けられているフォントの中で、ユーザが使用する言語情報に則したフォントのアセンド幅は、当該フォントに使用の有無に関わらず、ベースラインを決定する処理に考慮する。言語設定で指定されている言語は、文字情報を表示するために使用することが指示されている言語であるため、機器に表示される画面において使用頻度が高いとみなすことができる。従って、現在描画している画像に、設定された言語の文字が含まれなかったとしても、例えば画面遷移などにより表示画面に表示した画像の一部、あるいは全体が更新された場合には、当該言語の文字が表示される可能性が高い。そこで本実施形態では、優先順位を付けられているフォントの中で、ユーザが使用する言語情報に則したフォントのアセンド幅は常に文字の描画位置の決定に考慮する。これにより、表示画面の更新の前後において、文字列のベースラインに極端な違いを生じさせず、見た目に統一感を持たせることができる。   With the above processing, in this embodiment, even if the predetermined priority is high, fonts that are not used in the input character string are not considered in the processing for determining the baseline. On the other hand, among the prioritized fonts, the font ascending width according to the language information used by the user is considered in the process of determining the baseline regardless of whether the font is used or not. . Since the language specified in the language setting is a language instructed to be used for displaying character information, it can be considered that the frequency of use is high on the screen displayed on the device. Therefore, even if the currently drawn image does not include characters in the set language, if part or all of the image displayed on the display screen is updated due to, for example, screen transition, the Language characters are likely to be displayed. Therefore, in the present embodiment, the ascending width of the font in accordance with the language information used by the user among the fonts given priority is always considered in determining the character drawing position. Thereby, before and after updating the display screen, it is possible to give a sense of unity to the appearance without causing an extreme difference in the baseline of the character string.

本実施形態を適用した場合と、従来法を用いた場合とでの描画結果の違いを図12と図6の比較により示す。文字列「Jp」「Jp日本」を描画するにあたり、英語フォント、日本語フォント、アラビア語フォントの順で優先順位を設定し、これらのUnitsPerEm値は全て1024とする。英語フォントのアセンド幅とディセンド幅が624px、400px、日本語フォントでは750px、274px、アラビア語フォントで924px、100pxとする。基準位置601の座標を(0、0)とし、言語設定は日本語で、フォントサイズは1024pxとする。図12(b)は、従来法に沿って、使用の有無に関わらず優先順位情報に含まれる全てのフォントの属性情報を考慮してベースライン位置を決めた時の描画結果であって、図12(a)の左の状態に相当する状態である。描画する文字列にはアラビア語が含まれていないが、アセンド幅が最も大きいアラビア語フォントによってベースライン位置が決まるので、基準位置から924px下にベースライン位置がある。そのため、文字列上部が少し空いて見える。また、図12(c)は、従来法に沿って、優先順位情報に含まれるフォントのうち、入力文字列中で実際に使用されるフォントの属性情報によってベースライン位置を決定した時の描画結果である。描画する文字列によって使用するフォントが異なるためにベースライン位置も異なってしまう。上述したように、ここで想定されている使用環境では、ユーザは言語設定を日本語としているため、「Jp」のように和文書体が含まれない文字列が入力されても、その周囲等には和文書体が含まれる文字列が配置される可能性が十分高い。その場合、見た目に統一感が損なわれてしまう。   The difference in the drawing result between the case where this embodiment is applied and the case where the conventional method is used is shown by comparison between FIG. 12 and FIG. In drawing the character strings “Jp” and “Jp Japan”, priorities are set in the order of English font, Japanese font, and Arabic font, and these UnitsPerEm values are all set to 1024. Assume that the ascending width and descending width of the English font are 624px and 400px, 750px and 274px for the Japanese font, and 924px and 100px for the Arabic font. The coordinates of the reference position 601 are (0, 0), the language setting is Japanese, and the font size is 1024 px. FIG. 12B is a drawing result when the baseline position is determined in consideration of the attribute information of all fonts included in the priority order information regardless of the presence or absence of use according to the conventional method. This is a state corresponding to the left state of 12 (a). The character string to be drawn does not include Arabic, but the baseline position is determined by the Arabic font having the largest ascend width, and therefore the baseline position is 924 px below the reference position. Therefore, the upper part of the character string looks a little empty. FIG. 12C shows the rendering result when the baseline position is determined by the attribute information of the font actually used in the input character string among the fonts included in the priority order information in accordance with the conventional method. It is. Since the font to be used is different depending on the character string to be drawn, the baseline position is also different. As described above, in the usage environment assumed here, the user sets the language setting to Japanese. Therefore, even if a character string that does not include a Japanese document such as “Jp” is input, its surroundings, etc. It is highly likely that a character string including a Japanese document is placed in. In that case, the sense of unity will be impaired.

このような従来例に対し、図6は、本実施形態に従い図5のフローチャートに示した処理によって描画された結果の例を示す。主として情報交換用の2バイト符号化文字集合を規定する日本工業規格であるJIS X 0208に割り当てられたコードポイントに対する形状情報を持つ日本語フォントのアセンド幅を少なくとも考慮してベースラインを決定する。そのため、文字列「Jp」のように日本語が含まれていなくても、日本語フォントのアセンド幅を考慮したベースライン位置となるため、和文書体を含む文字列が配置された場合には統一感を損なわない。使用頻度が低いアラビア文字の文字列の描画が指示される場合でのみベースラインが変更されるが、ほとんどの場合においてベースライン位置は揃い、文字列上部の余分なスペースも生じない。   In contrast to such a conventional example, FIG. 6 shows an example of a result rendered by the processing shown in the flowchart of FIG. 5 according to the present embodiment. The baseline is determined taking into account at least the ascend width of Japanese fonts having shape information for code points assigned to JIS X 0208, which is a Japanese industrial standard that mainly defines a 2-byte encoded character set for information exchange. Therefore, even if Japanese characters are not included as in the character string “Jp”, the base line position takes into account the ascending width of the Japanese font, so when a character string including a Japanese document is placed. Does not impair unity. Although the base line is changed only when drawing of a character string of an Arabic character that is used infrequently is instructed, the base line position is aligned in most cases, and no extra space above the character string is generated.

以上説明したように、本実施形態では、入力文字列に対して実際に使用される文字に応じたフォントと、入力される頻度が高いことが推定される言語設定に対応したフォントを考慮して、ベースラインを決定する。   As described above, in the present embodiment, the font corresponding to the character actually used for the input character string and the font corresponding to the language setting estimated to be frequently input are considered. Determine the baseline.

<変形例1>
第1の実施形態では、文字の描画位置を決定するために、属性情報を参照する文字列の描画に用いられ頻度の高いとみなされる少なくとも1つ以上のフォントとして、言語設定により指定されている言語に対応づけられたフォントを選択した。それに対し、変形例1として、予め優先することが定められた複数のフォントのうち、優先順位の高い所定の数(所定の数は複数)のフォントを選択する例を説明する。
<Modification 1>
In the first embodiment, in order to determine a character drawing position, at least one or more fonts that are used to draw a character string that refers to attribute information and is considered to be frequently used are specified by language setting. The font associated with the language was selected. On the other hand, as a first modification, an example will be described in which a predetermined number (a predetermined number is a plurality) of high-priority fonts is selected from among a plurality of fonts that are determined to be prioritized in advance.

変形例1に係る情報処理装置100のハードウェア構成は、実施形態1で説明した図1(a)に準ずるため、詳細な説明を省略する。変形例1に係る情報処理装置100の機能構成は、図10(a)に示される。ただし、実施形態1の図1(b)と共通する機能部については、同番号を付し、説明を省略する。CPU101のソフトウェア処理によって実現されるフォント数取得部1001は、文字列の描画位置を決定するために考慮するフォント数を取得する。本実施形態では、フォント数は予め定められ、ROM102に格納されている。描画位置決定部116はこのフォント数までの優先順位の高い複数のフォントの属性情報によって描画位置を決定する。   Since the hardware configuration of the information processing apparatus 100 according to the first modification conforms to FIG. 1A described in the first embodiment, detailed description thereof is omitted. A functional configuration of the information processing apparatus 100 according to the first modification is illustrated in FIG. However, functional units that are the same as those in FIG. 1B of the first embodiment are given the same numbers, and descriptions thereof are omitted. A font number acquisition unit 1001 realized by software processing of the CPU 101 acquires the number of fonts to be considered for determining the drawing position of the character string. In this embodiment, the number of fonts is predetermined and stored in the ROM 102. The drawing position determination unit 116 determines the drawing position based on attribute information of a plurality of fonts having a high priority up to the number of fonts.

変形例1においても、文字を描画する処理は図3のフローチャートに従って実行される。ただし、ステップS304における描画位置を決定する処理は、図7のフローチャートに従う。なお、図7において、図5と同じステップ番号が付してある処理については、図5のフローチャートと同様の処理が行われるため、説明を省略する。   Also in the modification 1, the process of drawing a character is performed according to the flowchart of FIG. However, the process of determining the drawing position in step S304 follows the flowchart of FIG. In FIG. 7, processes with the same step numbers as in FIG. 5 are the same as those in the flowchart of FIG.

ステップS701では、フォント数取得部1001が、描画位置を決定するためのフォント数Nを取得する。本実施形態では、優先順位の高いフォントから数えてN番目までのフォントによって描画位置を決定する。ステップS702では、属性情報取得部113が、N番目までのフォントのアセンド幅で最も大きい値を取得し、Curにセットする。図6で説明した描画する文字列、使用するフォントの優先順位、基準位置の座標で、描画位置を決定するためのフォントを第2優先フォントまでとしたときに本実施形態を適用した場合の描画結果は、図6と同じになる。本実施形態は、描画する文字列のほとんどが、指定した優先順位のフォントで網羅できる場合に有用である。   In step S701, the font number acquisition unit 1001 acquires the font number N for determining the drawing position. In the present embodiment, the drawing position is determined by the Nth font counted from the fonts with the highest priority. In step S702, the attribute information acquisition unit 113 acquires the largest value of the ascending widths of the Nth fonts and sets them to Cur. Drawing when the present embodiment is applied when the character string to be drawn, the priority order of fonts to be used, and the coordinates of the reference position described in FIG. The result is the same as in FIG. This embodiment is useful when most of the character strings to be drawn can be covered with the fonts having the specified priority order.

以上の処理により、変形例1においては、優先順位を付けられているフォントのうち、優先順位が高い1以上のフォントのうち最大のアセンド幅を、当該フォントに使用の有無に関わらず、ベースラインを決定する処理に考慮する。予め優先順位を付けられているフォントのうち、優先順位が上位のものは、特に使用される可能性が高いとみなすことができる。そのうちアセンド幅が最大のフォントに合わせて描画位置を決定することで、優先順位が上位のフォントのうちいずれを用いた描画の場合でも、文字列のベースラインに極端な違いが生じさせず、見た目に統一感を持たせることができる。   As a result of the above processing, in Modification 1, the highest ascending width of one or more high-priority fonts among the prioritized fonts is used regardless of whether the font is used or not. Is considered in the process of determining. Of the fonts that have been given priority in advance, those with higher priority can be regarded as being particularly likely to be used. By determining the drawing position according to the font with the largest ascend width, even if drawing using any of the higher priority fonts, there will be no significant difference in the baseline of the string, and the appearance will be Can have a sense of unity.

<変形例2>
第1の実施形態、及びその変形例1では、文字の描画位置を決定するために必ず考慮するフォントを決定する例を説明した。それに対し、第1の実施形態の変形例2として、文字の描画位置を決定するために用いる少なくとも1つ以上のフォントから、除外するフォントを特定する例を説明する。
<Modification 2>
In the first embodiment and the first modification thereof, an example has been described in which a font that must be considered in order to determine a character drawing position is determined. On the other hand, as a second modification of the first embodiment, an example will be described in which a font to be excluded is specified from at least one or more fonts used for determining a character drawing position.

変形例2に係る情報処理装置100のハードウェア構成もまた、実施形態1で説明した図1(a)に準ずるため、詳細な説明を省略する。変形例2に係る情報処理装置100の機能構成は、図10(b)に示される。ただし、実施形態1の図1(b)と共通する機能部については、同番号を付し、説明を省略する。属性情報判定部1002は、属性情報取得部113で取得した属性情報が所定の条件を満たすか否かを判定する。判定の条件は後述するが、判定結果に応じて、当該属性情報が、描画位置決定部116により描画位置を決定する処理に用いられるか否かが決定される。   Since the hardware configuration of the information processing apparatus 100 according to the modification 2 is also similar to that of FIG. 1A described in the first embodiment, detailed description thereof is omitted. A functional configuration of the information processing apparatus 100 according to Modification 2 is illustrated in FIG. However, functional units that are the same as those in FIG. 1B of the first embodiment are given the same numbers, and descriptions thereof are omitted. The attribute information determination unit 1002 determines whether the attribute information acquired by the attribute information acquisition unit 113 satisfies a predetermined condition. Although the determination condition will be described later, whether or not the attribute information is used for the process of determining the drawing position by the drawing position determination unit 116 is determined according to the determination result.

変形例1においても、文字を描画する処理は図3のフローチャートに従って実行される。ただし、ステップS304における描画位置を決定する処理は、図8のフローチャートに従う。なお、図8において、図5及び図7と同じステップ番号が付してある処理については、上述した同番号のステップと同様の処理が行われるため、ここでは説明を省略する。   Also in the modification 1, the process of drawing a character is performed according to the flowchart of FIG. However, the process of determining the drawing position in step S304 follows the flowchart of FIG. In FIG. 8, the processes with the same step numbers as those in FIGS. 5 and 7 are the same as the steps with the same numbers described above, and thus the description thereof is omitted here.

変形例2では、ステップS509で、現在のフォントのアセンド幅がCurより大きいと判定される場合、ステップS801で、属性情報判定部1002が、アセンド幅が所定の条件を満たしているか否かを判定する。   In the second modification, when it is determined in step S509 that the ascend width of the current font is larger than Cur, in step S801, the attribute information determination unit 1002 determines whether or not the ascend width satisfies a predetermined condition. To do.

この判定処理に用いられる所定の条件について図9を用いて説明する。図9は優先順位情報に含まれているフォントの1つに関して、そのフォントに格納されている文字の中で最大の高さをもつ文字(ここではÅとする)の形状情報を画像化したものである。線901はベースライン、線902はアセンダライン、線903はディセンダラインを表す。文字の形状情報は、それをデザインするフォントデザイナーによって大きく異なる。例えば、フォントのUnitsPerEmが1024px、アセンド幅とディセンド幅がそれぞれ924px、100pxであったとする。ところが、デザインされた文字形状の最大の高さが図9のように400pxしかなく、アセンダライン1302までの間が大きく空いていても、フォント自体の妥当性を損なうものではない。本実施形態では、ステップS801の所定の条件として、フォントに格納されている文字の中で、高さが最大の文字の高さの値よりも、フォントにデザインされたアセンド幅の方が、所定の閾値以上大きいかを判定する。アセンド幅と、高さが最大の文字の高さの値の差分の絶対値が、所定の閾値より大きいかを判定する。差分が所定の閾値より大きい場合には、当該アセンド幅は、描画位置を決める上で適切なフォントのアセンド幅ではないとみなし、ベースラインの決定には考慮しない。なお、所定の閾値は、ユーザあるいは表示画面に表示させる画像の設計者によって予め指定されていても構わない。   The predetermined conditions used for this determination process will be described with reference to FIG. FIG. 9 is an image of the shape information of the character having the maximum height (here, “そ の”) among the characters stored in the font for one of the fonts included in the priority information. It is. Line 901 represents a base line, line 902 represents an ascender line, and line 903 represents a descender line. Character shape information varies greatly depending on the font designer who designs it. For example, it is assumed that the font unit PersEm is 1024 px and the ascend width and the descend width are 924 px and 100 px, respectively. However, even if the maximum height of the designed character shape is only 400 px as shown in FIG. 9 and the space up to the ascender line 1302 is large, the validity of the font itself is not impaired. In the present embodiment, as the predetermined condition in step S801, the ascend width designed for the font is higher than the height value of the character with the maximum height among the characters stored in the font. It is determined whether it is larger than the threshold value. It is determined whether the absolute value of the difference between the ascending width and the height value of the character having the maximum height is greater than a predetermined threshold. When the difference is larger than a predetermined threshold, the ascend width is regarded as not an appropriate font ascend width for determining the drawing position, and is not considered in determining the baseline. Note that the predetermined threshold value may be designated in advance by the user or the designer of the image to be displayed on the display screen.

ステップS801で、アセンド幅が条件を満たしていないと判定された場合(ステップS801でNO)、処理はステップS507に進み、条件を満たしていると判定された場合(ステップS801でYES)、ステップS802に進む。ステップS802では、属性情報取得部113が、現在のフォントのアセンド幅をCurにセットして、処理をステップS507に移す。以降の処理は、図5での説明と重複するため省略する。なお、所定の条件の一例として、フォントに格納された文字形状の最大高さとアセンド幅との関係から閾値を設ける例を説明したが、他の条件に基づいて判定しても構わない。   If it is determined in step S801 that the ascend width does not satisfy the condition (NO in step S801), the process proceeds to step S507. If it is determined that the condition is satisfied (YES in step S801), step S802 is performed. Proceed to In step S802, the attribute information acquisition unit 113 sets the ascending width of the current font to Cur, and the process proceeds to step S507. The subsequent processing is omitted because it overlaps with the description in FIG. As an example of the predetermined condition, the example in which the threshold value is provided from the relationship between the maximum height of the character shape stored in the font and the ascend width has been described, but the determination may be made based on other conditions.

なお、変形例2は、第1の実施形態またはその変形例1と組み合わせることが可能である。すなわち、第1の実施形態の図5のフローチャート、あるいは変形例の図7のフローチャートにおいて、ステップS509の判定がYESであった場合、ステップS510の処理の前に、ステップS801を実行すればよい。   Note that Modification 2 can be combined with the first embodiment or Modification 1 thereof. That is, if the determination in step S509 is YES in the flowchart of FIG. 5 of the first embodiment or the flowchart of FIG. 7 of the modification, step S801 may be executed before the process of step S510.

<その他の実施形態>
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
<Other embodiments>
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

111 文字列取得部
112 フォント決定部
113 属性情報取得部
114 形状情報取得部
115 基準位置取得部
116 描画位置決定部
117 描画処理部
118 優先順位取得部
119 言語情報取得部
1001 フォント数取得部
1002 属性情報判定部
DESCRIPTION OF SYMBOLS 111 Character string acquisition part 112 Font determination part 113 Attribute information acquisition part 114 Shape information acquisition part 115 Reference position acquisition part 116 Drawing position determination part 117 Drawing processing part 118 Priority acquisition part 119 Language information acquisition part 1001 Font number acquisition part 1002 Attributes Information judgment unit

Claims (12)

複数のフォントを用いて文字列を描画可能な情報処理装置であって、
表示画面に表示させる文字列を示す情報を取得する文字列取得手段と、
前記情報処理装置において設定された言語情報を取得する言語情報取得手段と、
前記複数のフォントのうち、前記表示画面に表示させる文字列に含まれる各文字のそれぞれの描画に用いるフォントを決定するフォント決定手段と、
前記複数のフォントのうち、前記言語情報取得手段によって取得された言語情報に対応するフォントの属性情報、及び、前記フォント決定手段によって決定されたフォントの属性情報に基づいて、前記文字列を描画する描画位置を決定する描画位置決定手段と、
前記描画位置決定手段によって決定された描画位置に従って、前記文字列取得手段によって取得された情報が示す文字列の各文字のそれぞれを、前記フォント決定手段によって決定されたフォントを用いて描画する描画手段と
を備えることを特徴とする情報処理装置。
An information processing apparatus capable of drawing a character string using a plurality of fonts,
A character string acquisition means for acquiring information indicating a character string to be displayed on the display screen;
Language information acquisition means for acquiring language information set in the information processing apparatus;
Font determining means for determining a font to be used for drawing each character included in the character string to be displayed on the display screen among the plurality of fonts;
The character string is drawn based on the attribute information of the font corresponding to the language information acquired by the language information acquisition unit and the attribute information of the font determined by the font determination unit among the plurality of fonts. Drawing position determining means for determining the drawing position;
A drawing unit that draws each character of the character string indicated by the information acquired by the character string acquisition unit using the font determined by the font determination unit according to the drawing position determined by the drawing position determination unit. An information processing apparatus comprising:
前記描画位置決定手段は、前記言語情報取得手段によって取得された言語情報に対応するフォントとして、前記言語情報取得手段によって取得された言語情報が示す言語の代表文字の形状情報が格納されたフォントを特定し、前記特定したフォントのアセンド幅と、前記フォント決定手段によって決定されたフォントのアセンド幅のうち、最大のアセンド幅に基づいて、前記文字列を描画するベースラインを決定することを特徴とする請求項1に記載の情報処理装置。   The drawing position determination unit is a font that stores shape information of a representative character of the language indicated by the language information acquired by the language information acquisition unit as a font corresponding to the language information acquired by the language information acquisition unit. And determining a baseline for drawing the character string based on a maximum ascending width among the ascending width of the specified font and the ascending width of the font determined by the font determining unit. The information processing apparatus according to claim 1. 前記複数のフォントのうち、少なくとも一部の複数のフォントのそれぞれについて、予め定められた優先順位を取得する優先順位取得手段を更に備え、
前記フォント決定手段は、前記優先順位取得手段が取得した優先順位に基づいて、前記文字列に含まれる各文字のそれぞれの描画に用いるフォントを決定することを特徴とする請求項1又は2に記載の情報処理装置。
A priority order acquisition means for acquiring a predetermined priority order for each of at least some of the plurality of fonts;
3. The font determination unit according to claim 1, wherein the font determination unit determines a font to be used for rendering each character included in the character string based on the priority order acquired by the priority order acquisition unit. Information processing device.
複数のフォントを用いて文字列を描画可能な情報処理装置であって、
表示画面に表示させる文字列を示す情報を取得する文字列取得手段と、
前記複数のフォントのうち、少なくとも一部の複数のフォントのそれぞれについて、予め定められた優先順位を取得する優先順位取得手段と、
前記複数のフォントのうち、前記表示画面に表示させる文字列に含まれる各文字のそれぞれの描画に用いるフォントを決定するフォント決定手段と、
前記優先順位取得手段によって取得された優先順位のうち、上位から2以上の所定の数の優先順位に対応する各フォントの属性情報、及び、前記フォント決定手段によって決定されたフォントの属性情報に基づいて、前記文字列を描画する描画位置を決定する描画位置決定手段と、
前記描画位置決定手段によって決定された描画位置に従って、前記文字列取得手段によって取得された情報が示す文字列の各文字のそれぞれを、前記フォント決定手段によって決定されたフォントを用いて描画する描画手段と
を備えることを特徴とする情報処理装置。
An information processing apparatus capable of drawing a character string using a plurality of fonts,
A character string acquisition means for acquiring information indicating a character string to be displayed on the display screen;
Priority order obtaining means for obtaining a predetermined priority order for each of at least some of the plurality of fonts;
Font determining means for determining a font to be used for drawing each character included in the character string to be displayed on the display screen among the plurality of fonts;
Based on the attribute information of each font corresponding to a predetermined number of priority numbers of two or more from the top among the priority levels acquired by the priority level acquisition unit, and the font attribute information determined by the font determination unit Drawing position determining means for determining a drawing position for drawing the character string;
A drawing unit that draws each character of the character string indicated by the information acquired by the character string acquisition unit using the font determined by the font determination unit according to the drawing position determined by the drawing position determination unit. An information processing apparatus comprising:
前記描画位置決定手段は、前記優先順位取得手段が取得した優先順位のうち、上位から2以上の所定の数の優先順位に対応する各フォントのアセンド幅のうち最大のアセンド幅と、前記フォント決定手段によって決定されたフォントのアセンド幅のうち、大きいアセンド幅に基づいて、前記文字列を描画するベースラインを決定することを特徴とする請求項4に記載の情報処理装置。   The drawing position determining means includes a maximum ascending width of the ascending widths of the fonts corresponding to a predetermined number of priority orders of two or more from the top among the priorities acquired by the priority order acquiring means, and the font determination 5. The information processing apparatus according to claim 4, wherein a base line for drawing the character string is determined based on a large ascending width among the ascending widths of the fonts determined by the means. 前記表示画面に表示させる文字列を配置する基準となる基準位置を取得する基準位置取得手段を更に備え、
前記描画位置決定手段は、前記基準位置取得手段が取得した基準位置に対して、前記文字列のベースラインをシフトさせる幅を特定することで、前記描画位置として決定することを特徴とする請求項1乃至5のいずれか1項に記載の情報処理装置。
Reference position acquisition means for acquiring a reference position serving as a reference for arranging a character string to be displayed on the display screen,
The drawing position determining means determines the drawing position by specifying a width by which a baseline of the character string is shifted with respect to the reference position acquired by the reference position acquiring means. The information processing apparatus according to any one of 1 to 5.
前記基準位置取得手段は、前記文字列が重畳される領域に関する座標を、前記基準位置として取得することを特徴とする請求項6に記載の情報処理装置。   The information processing apparatus according to claim 6, wherein the reference position acquisition unit acquires, as the reference position, coordinates related to a region where the character string is superimposed. 前記複数のフォントのうち、前記描画位置を決定する処理に用いる少なくとも1つ以上のフォントの属性情報判定手段を更に備え、
前記描画位置決定手段は、前記属性情報判定手段の判定結果に応じて、前記描画位置を決定する処理に用いる少なくとも1つ以上のフォントから除外するフォントを特定することを特徴とする請求項1乃至7のいずれか1項に記載の情報処理装置。
Of the plurality of fonts, further comprising attribute information determination means for at least one font used for the process of determining the drawing position,
The drawing position determination unit specifies a font to be excluded from at least one or more fonts used in the process of determining the drawing position according to a determination result of the attribute information determination unit. 8. The information processing apparatus according to any one of items 7.
複数のフォントを用いて文字列を描画可能な情報処理装置の制御方法であって、
文字列取得手段により、表示画面に表示させる文字列を示す情報を取得する文字列取得工程と、
言語情報取得手段により、前記情報処理装置において設定された言語情報を取得する言語情報取得工程と、
フォント決定手段により、前記複数のフォントのうち、前記表示画面に表示させる文字列に含まれる各文字のそれぞれの描画に用いるフォントを決定するフォント決定工程と、
描画位置決定手段により、前記言語情報取得工程において取得された言語情報に対応するフォントの属性情報、及び、前記フォント決定工程において決定されたフォントの属性情報に基づいて、前記文字列を描画する描画位置を決定する描画位置決定工程と、
描画手段により、前記描画位置決定工程において決定された描画位置に従って、前記文字列取得工程において取得された情報が示す文字列の各文字のそれぞれを、前記フォント決定工程において決定されたフォントを用いて描画する描画工程と
を備えることを特徴とする情報処理装置の制御方法。
An information processing apparatus control method capable of drawing a character string using a plurality of fonts,
A character string acquisition step of acquiring information indicating a character string to be displayed on the display screen by the character string acquisition means;
A language information acquisition step of acquiring language information set in the information processing apparatus by language information acquisition means;
A font determining step for determining a font to be used for drawing each character included in the character string to be displayed on the display screen among the plurality of fonts by the font determining means;
Drawing that draws the character string based on the font attribute information corresponding to the language information acquired in the language information acquisition step and the font attribute information determined in the font determination step by the drawing position determination means A drawing position determining step for determining the position;
Each character of the character string indicated by the information acquired in the character string acquisition step is used by the drawing unit according to the drawing position determined in the drawing position determination step, using the font determined in the font determination step. An information processing apparatus control method comprising: a drawing step of drawing.
複数のフォントを用いて文字列を描画可能な情報処理装置の制御方法であって、
文字列取得手段により、表示画面に表示させる文字列を示す情報を取得する文字列取得工程と、
優先順位取得手段により、前記複数のフォントのうち、少なくとも一部の複数のフォントのそれぞれについて、予め定められた優先順位を取得する優先順位取得工程と、
フォント決定手段により、前記複数のフォントのうち、前記表示画面に表示させる文字列に含まれる各文字のそれぞれの描画に用いるフォントを決定するフォント決定工程と、
描画位置決定手段により、前記優先順位取得工程において取得された優先順位のうち、上位から2以上の所定の数の優先順位に対応する各フォントの属性情報、及び、前記フォント決定工程において決定されたフォントの属性情報に基づいて、前記文字列を描画する描画位置を決定する描画位置決定工程と、
描画手段により、前記描画位置決定工程において決定された描画位置に従って、前記文字列取得工程において取得された情報が示す文字列の各文字のそれぞれを、前記フォント決定工程において決定されたフォントを用いて描画する描画工程と
を備えることを特徴とする情報処理装置の制御方法。
An information processing apparatus control method capable of drawing a character string using a plurality of fonts,
A character string acquisition step of acquiring information indicating a character string to be displayed on the display screen by the character string acquisition means;
A priority order obtaining step of obtaining a predetermined priority order for each of at least some of the plurality of fonts by the priority order obtaining means;
A font determining step for determining a font to be used for drawing each character included in the character string to be displayed on the display screen among the plurality of fonts by the font determining means;
The drawing position determination means determines the attribute information of each font corresponding to a predetermined number of priorities of two or more from the top among the priorities acquired in the priority order acquisition step, and is determined in the font determination step. A drawing position determining step for determining a drawing position for drawing the character string based on the attribute information of the font;
Each character of the character string indicated by the information acquired in the character string acquisition step is used by the drawing unit according to the drawing position determined in the drawing position determination step, using the font determined in the font determination step. An information processing apparatus control method comprising: a drawing step of drawing.
コンピュータに読み込ませ実行させることで、前記コンピュータを請求項1又は4に記載の情報処理装置として機能させるためのプログラム。   A program for causing a computer to function as the information processing apparatus according to claim 1 by being read and executed by the computer. 請求項11に記載されたプログラムを格納したコンピュータが読み取り可能な記憶媒体。   A computer-readable storage medium storing the program according to claim 11.
JP2014092537A 2014-04-28 2014-04-28 Information processing device, control method thereof, computer program, and storage medium Pending JP2015210417A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014092537A JP2015210417A (en) 2014-04-28 2014-04-28 Information processing device, control method thereof, computer program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014092537A JP2015210417A (en) 2014-04-28 2014-04-28 Information processing device, control method thereof, computer program, and storage medium

Publications (1)

Publication Number Publication Date
JP2015210417A true JP2015210417A (en) 2015-11-24

Family

ID=54612627

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014092537A Pending JP2015210417A (en) 2014-04-28 2014-04-28 Information processing device, control method thereof, computer program, and storage medium

Country Status (1)

Country Link
JP (1) JP2015210417A (en)

Similar Documents

Publication Publication Date Title
US8375298B2 (en) Method and apparatus for processing layout and storage medium
US10504258B2 (en) Information processing device editing map acquired from server
US9619440B2 (en) Document conversion apparatus
KR101205034B1 (en) Program generation device, program generation method, and computer-readable storage medium
US10210141B2 (en) Stylizing text by replacing glyph with alternate glyph
CN107729297B (en) Method and device for generating font with changeable style
US9245361B2 (en) Consolidating glyphs of a font
JP2006267228A (en) Raster map retrieving device
JP2008197990A (en) Document edit device, program, and storage medium
EP2835796A2 (en) Information processing apparatus, programmable display apparatus, data processing method, and program
JP2008256964A (en) Image generation system, projector, program, information memory medium and image generation method
JP2006163651A (en) Display device, control method of display device, program and font data
JP6422228B2 (en) Image processing apparatus, image processing method, and program
JP2015210417A (en) Information processing device, control method thereof, computer program, and storage medium
JP2008140158A (en) Document editing device and program
JP4770285B2 (en) Image processing apparatus and control program therefor
JP6501454B2 (en) INFORMATION PROCESSING APPARATUS, CONTROL METHOD THEREOF, PROGRAM, AND STORAGE MEDIUM
US20180189251A1 (en) Automatic multi-lingual editing method for cartoon content
JP5612975B2 (en) Serif data generation apparatus, serif data generation method, and program
JP6213380B2 (en) Display device, image forming apparatus, display control program, and image forming program
JP2020115260A (en) Information processing device and information processing program
JP5176390B2 (en) Character input device and computer program
JP2008102657A (en) Character input device and method
JP5361315B2 (en) Information processing apparatus and information processing method
JP2015075884A (en) Drawing device, drawing method and program