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 PDFInfo
- 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
Links
Images
Landscapes
- Document Processing Apparatus (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
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.
しかしながら従来は、文字領域毎に、画面毎に、あるいは行毎に、設定されるベースラインの位置が変わってしまい、見た目の統一感が損なわれる場合があるという課題があった。
本発明は、上記課題を鑑みてなされたものであり、文字列によって使用されるフォントが異なる場合でも、統一感のある文字列の表示環境を提供することを目的とする。
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.
以下、本発明の実施形態について図面を参照して説明する。なお、以下の実施の形態は特許請求の範囲に関る本発明を限定するものではなく、また、本実施の形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。なお、同一な構成については、同じ符号を付して説明する。 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
図1(b)は、本実施形態の情報処理装置100の機能構成を示す図である。各機能部は、CPU101が、ROM102に格納されたプログラムをRAM103に展開し、後述する各フローチャートに従った処理を実行することで実現されている。また例えば、CPU101を用いたソフトウェア処理の代替としてハードウェアを構成する場合には、ここで説明する各機能部の処理に対応させた演算部や回路を構成すればよい。
FIG. 1B is a diagram illustrating a functional configuration of the
文字列取得部111は表示画面に描画する文字列を示す情報を取得する。描画する文字列は、予め決められた文言がROM102などに格納されていてもよく、キーボードやタッチパネル、マイクなどの入力デバイスによるユーザからの操作で入力される任意の文言であっても構わない。優先順位取得部118は、情報処理装置100が描画可能な複数のフォントのうち、少なくとも一部の複数のフォントについて、予め定められた優先順位に関する情報を取得する。この優先順位は、表示画面に文字情報を表示させる場合に、優先的に用いることが予め指定されたフォントの優先順位である。フォント決定部112は、文字列を構成する各文字をそれぞれ描画するために、ROM102や記憶部108に予め記憶された1以上のフォントデータから、どのフォントを使用するかを決定する。このとき、優先順位取得部118で取得した優先順位に基づいて使用するフォントを決定する。
The character
属性情報取得部113は、フォントの属性情報をフォントデータから取得する。属性情報はフォントデータに格納されているフォント固有のメトリクス情報であり、例えばUnitsPerEm、アセンド幅、ディセンド幅、格納されている文字の最大の送り幅などがある。各用語の説明は、具体例を用いて後述する。形状情報取得部114は、文字列を構成する各文字に該当する形状情報を、フォント決定部112で決定したフォントデータから取得する。形状情報には文字の描画結果を画像形式で表したものや、文字の輪郭(アウトライン)をベクター形式で表したものなどがあるが、形状情報の形式は限定しない。基準位置取得部115は、文字列の描画位置を決めるための基準となる位置情報を取得する。位置情報は、予め決められていて、ROM102などから読み込むことができる。また、ユーザの操作により入力デバイスを介して取得することができる。言語情報取得部119は、表示する文字列について、言語設定して指定された言語情報を取得する。言語設定で指定された言語情報とは、表示画面に表示する文字情報を、どの言語を用いて表示させるかを示す情報であって、本実施形態では予め装置の設計段階で初期値が設定されていることを想定している。ただし、操作者によって、任意のタイミングで言語設定が変更されてもよい。また、GPS(Global Positioning System)センサにより、装置の現在の位置情報を取得し、位置情報と公用語との対応付け情報を参照することで、言語情報を取得する構成としてもよい。
The attribute
描画位置決定部116は、基準位置取得部115で取得した基準位置と、属性情報取得部113により取得された属性情報とに基づいて、文字列の描画位置を決定する。このとき、情報処理装置100の使用環境において、文字の描画に使用される頻度が高いとみなされる1つ以上のフォントの属性情報に従って、描画位置を決定する。第1の実施形態では、言語情報取得部119で取得された言語情報によって特定されるフォントの属性情報に従って、描画位置を決定する。描画制御部117は、形状情報取得部114で取得した文字の形状情報に基づいて、描画位置決定部116で決定した位置に文字を描画する。描画制御部117による描画結果は、ディスプレイなどの表示部に転送されて表示されることを想定しているが、出力デバイスは限定しない。
The drawing
まず、図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
ここで、本実施形態との比較のため、本実施形態が解決する課題の詳細について図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
そこで、従来、文字列描画で複数のフォントが使用された場合には、実際に使用されるフォントの中で最も広いアセンド幅によって、ベースライン位置を決定して描画するという方法が用いられることがある。この方法を用いて描画を行った結果が図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
しかし、この方法でも課題が生じる。それを、図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
以上のような従来の課題を解決するため、本実施形態では、入力される文字列、使用する優先順位が予め決定されているフォント情報、及びユーザが指定する言語情報を考慮して、ベースラインの基準とするフォントを特定する。本実施形態の処理フローについて図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
ステップ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
なお本実施形態では、画面に表示する画像の構成要素として、文字列が描画される部品が複数存在する等、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
一方、ステップ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
次に、図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
ステップ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
ステップS507では、描画位置決定部116が、ステップS302で取得された優先順位情報において、現在のフォントの次に優先されるフォントの設定があるかを判定する。現在のフォントの次に優先されるフォントの設定があると判定された場合(ステップS507でYES)、ステップS512に進む。ステップS512においては、現在のフォントの次に優先されるフォントを現在のフォントにセットして、ステップS506に戻る。そして、次の優先フォントがなくなるまで、ステップS506からステップS512までの処理を繰り返す。一方、現在のフォントの次に優先されるフォントの設定がないと判定された場合(ステップS507でNO)、処理はステップS511に進む。ステップS511では、描画位置決定部116が、Curの値によってベースライン位置を決定して処理を終了する。本実施形態では、描画位置決定部116は、ベースラインの位置は、基準位置である文字列描画領域の左上座標からCurの値だけy座標を、文字に向かって下側にシフトした位置と決定する。
In step S507, the drawing
以上の処理により、本実施形態では、予め定められた優先度が高かったとしても、入力される文字列の中で使用されないフォントは、ベースラインを決定する処理に考慮しない。その一方で、優先順位を付けられているフォントの中で、ユーザが使用する言語情報に則したフォントのアセンド幅は、当該フォントに使用の有無に関わらず、ベースラインを決定する処理に考慮する。言語設定で指定されている言語は、文字情報を表示するために使用することが指示されている言語であるため、機器に表示される画面において使用頻度が高いとみなすことができる。従って、現在描画している画像に、設定された言語の文字が含まれなかったとしても、例えば画面遷移などにより表示画面に表示した画像の一部、あるいは全体が更新された場合には、当該言語の文字が表示される可能性が高い。そこで本実施形態では、優先順位を付けられているフォントの中で、ユーザが使用する言語情報に則したフォントのアセンド幅は常に文字の描画位置の決定に考慮する。これにより、表示画面の更新の前後において、文字列のベースラインに極端な違いを生じさせず、見た目に統一感を持たせることができる。 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
このような従来例に対し、図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
変形例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
以上の処理により、変形例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
変形例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
この判定処理に用いられる所定の条件について図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,
ステップ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
なお、変形例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
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又は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:
前記描画位置決定手段は、前記基準位置取得手段が取得した基準位置に対して、前記文字列のベースラインをシフトさせる幅を特定することで、前記描画位置として決定することを特徴とする請求項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.
前記描画位置決定手段は、前記属性情報判定手段の判定結果に応じて、前記描画位置を決定する処理に用いる少なくとも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.
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) |
-
2014
- 2014-04-28 JP JP2014092537A patent/JP2015210417A/en active Pending
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 |