OROCHI
 
Loading...
Searching...
No Matches
GxFontTable Class Reference

フォントテーブルアクセス More...

#include <GxFontTable.h>

Inheritance diagram for GxFontTable:
Collaboration diagram for GxFontTable:

Classes

class  GxDrawFontQuery
 フォント情報取得用構造体 More...
 
class  GxDrawHitQuery
 フォント当たり判定情報取得用構造体 More...
 
class  GxFontAccessTable
 フォントアクセステーブル More...
 
class  GxFontIconTableInformation
 フォントアイコンテーブル情報 More...
 
struct  GxFontInformation
 フォント情報 More...
 
class  GxFontTableInformation
 フォントテーブル情報 More...
 
struct  GxLineCondition
 行走査条件 More...
 
struct  GxLineInfo
 行情報 More...
 
struct  TagInfo
 

Public Types

定義
enum class  FONT_INFOMATION {
  HEIGHT = 0 , DESCENT , FONTSIZE , TEXTURE_NUM ,
  IS_DISTANCE , MARGIN_U , MARGIN_V , MAX_ORIGIN_Y ,
  MAX_BLACKBOX_Y , USE_ICON
}
 テーブル情報用定義 More...
 
enum class  FONT_TABLE {
  CODE = 0 , TEXTURE_ID , START_U , START_V ,
  BLACKBOX_X , BLACKBOX_Y , GLYPHORIGIN_X , GLYPHORIGIN_Y ,
  CELLINC_X
}
 フォントテーブルアクセス用定義 More...
 
enum class  ICON_INFOMATION { VERSION = 0 , TEXTURE_NUM , MARGIN_U , MARGIN_V }
 設定.csv用定義 More...
 
enum class  ICON_TABLE {
  CODE = 0 , TEXTURE_ID , START_U , START_V ,
  BLACKBOX_X , BLACKBOX_Y , GLYPHORIGIN_X , GLYPHORIGIN_Y ,
  CELLINC_X
}
 配置テーブル.csv用定義 More...
 
enum class  TAG_TYPE {
  NONE = 0 , LINE_BREAK , NO_DRAW , PUSH_ALIGN_HC ,
  PUSH_ALIGN_HR , PUSH_ALIGN_HL , POP_ALIGN_H , PUSH_SIZE ,
  POP_SIZE , ICON , PUSH_FONT , POP_FONT ,
  PUSH_RUBY , POP_RUBY
}
 タグの種類 More...
 
enum class  TEXT_ALIGN {
  LEFT_TOP = 0 , LEFT_CENTER = 1 , LEFT_BOTTOM = 2 , CENTER_TOP = 4 ,
  CENTER_CENTER = 5 , CENTER_BOTTOM = 6 , RIGHT_TOP = 8 , RIGHT_CENTER = 9 ,
  RIGHT_BOTTOM = 10 , LEFT_TOP_CENTER = 16 , LEFT_CENTER_CENTER = 17 , LEFT_BOTTOM_CENTER = 18 ,
  JUSTIFY_TOP = 32 , MAX = 13
}
 テキスト揃え More...
 

Public Member Functions

初期化
 GxFontTable (void)
 コンストラクタ
 
void setResource (GxFontTableInformation *pFontTableInformation, GxFontIconTableInformation *pIconTableInformation)
 リソースを設定する
 
- Public Member Functions inherited from GxClassBase
constexpr GxClassBase (void)
 コンストラクタ
 
constexpr GxClassBase (const GxClassBase &base)
 コピーコンストラクタ
 
 ~GxClassBase (void) override
 デストラクタ
 
- Public Member Functions inherited from GxClassBaseRoot
constexpr GxClassBaseRoot (void)
 コンストラクタ
 
constexpr GxClassBaseRoot (const GxClassBaseRoot &)
 コピーコンストラクタ
 
virtual ~GxClassBaseRoot (void)
 デストラクタ
 
constexpr GxClassBaseRootoperator= (const GxClassBaseRoot &)
 代入演算子
 
virtual GxRttigetRtti (void) const =0
 Rttiの取得
 
virtual GX_FORCE_INLINE const GxTypedObjectgetDefaultObject (void)
 デフォルトオブジェクトを取得
 
GX_FORCE_INLINE b32 isDefaultObject (void)
 デフォルトオブジェクト判定
 

アクセサ

constexpr GxResTexturegetFontTexture (u32 no) const
 フォントテクスチャ取得
 
const GxFontTable::GxFontInformationgetFontInformation (GX_CSTR text)
 文字情報を取得する
 
constexpr GxResTexturegetIconTexture (u32 no) const
 アイコンテクスチャ取得
 
const GxFontTable::GxFontInformationgetFontInformationIcon (const u32 index)
 アイコンの文字情報を取得する
 
constexpr u32 getTextureNum (void) const
 テクスチャの枚数を取得
 
constexpr f32 getTmHeight (void) const
 文字全体の高さを取得
 
constexpr f32 getTmDescent (void) const
 文字の下部の高さを取得
 
constexpr u32 getFontSize (void) const
 フォントサイズ取得
 
GX_FORCE_INLINE b32 isDistanceFont (void) const
 距離フォントか判定
 
constexpr GxFontInformationgetFontInformationTable (void) const
 フォントテーブルを取得
 
constexpr GxFontInformationgetFontInformationTableIcon (void) const
 フォントアイコンテーブルを取得
 
void getDrawRect (const GxFontInformation &information, GxFloat2 &leftTop, GxFloat2 &rightBottom, b32 isReferencePointIsBaseLine=false, b32 useMarginUV=false, b32 isIcon=false)
 描画位置の頂点を求める (文字ギリギリのサイズ)
 
void getOuterRect (const GxFontInformation &information, GxFloat2 &leftTop, GxFloat2 &rightBottom, b32 isReferencePointIsBaseLine=false)
 フォントの外側を求める (_tmHeight x _gmCellIncX の大きさ)
 
void getMaxInnerRect (const GxFontInformation &information, GxFloat2 &leftTop, GxFloat2 &rightBottom, b32 isReferencePointIsBaseLine=false)
 フォントの最大内側を求める (高さ情報は登録されているフォントを包括するサイズ)
 
void getUvRect (const GxFontInformation &information, GxFloat2 &leftTop, GxFloat2 &rightBottom, b32 useMarginUV=false, b32 isIcon=false)
 UVを求める
 
void getDrawRectString (GxRect &dstRect, const GxPoint2 &position, GX_CSTR string, f32 fontScale, f32 scaleWidth=1.0f, b32 isSjis=false, b32 isUseLineBreak=true, b32 isReferencePointIsBaseLine=false, b32 isUseTextTag=false)
 描画に必要な矩形を求める
 
void getDrawQueryString (GxFontTable::GxDrawFontQuery &dstQuery, const GxSize &drawArea, const GxPoint2 &position, GX_CSTR string, f32 fontScale, f32 scaleWidth=1.0f, b32 isSjis=false, b32 isUseLineBreak=true, b32 isReferencePointIsBaseLine=false, b32 isUseTextTag=false, TEXT_ALIGN align=TEXT_ALIGN::LEFT_TOP, s32 lineOffset=0)
 描画に必要な情報を求める
 
void getDrawHitString (GxFontTable::GxDrawHitQuery &dstQuery, const GxSize &drawArea, const GxPoint2 &position, GX_CSTR string, f32 fontScale, f32 scaleWidth=1.0f, b32 isSjis=false, b32 isUseLineBreak=true, b32 isReferencePointIsBaseLine=false, b32 isUseTextTag=false, TEXT_ALIGN align=TEXT_ALIGN::LEFT_TOP, s32 lineOffset=0)
 当たりに必要な情報を求める
 

Additional Inherited Members

- Static Public Member Functions inherited from GxClassBaseRoot
static GX_FORCE_INLINE GxRtti__getStaticRtti (void)
 Rttiの取得
 

Detailed Description

フォントテーブルアクセス

Member Enumeration Documentation

◆ FONT_INFOMATION

enum class GxFontTable::FONT_INFOMATION
strong

テーブル情報用定義

Enumerator
HEIGHT 

高さ

DESCENT 

基準ラインから下の高さ

FONTSIZE 

フォントサイズ

TEXTURE_NUM 

テクスチャ番号

IS_DISTANCE 

距離フォントか

MARGIN_U 

U方向のマージン

MARGIN_V 

V方向のマージン

MAX_ORIGIN_Y 

基準ラインからの高さ

MAX_BLACKBOX_Y 

内包する高さ

USE_ICON 

ユーザーアイコン

◆ FONT_TABLE

enum class GxFontTable::FONT_TABLE
strong

フォントテーブルアクセス用定義

Enumerator
CODE 

文字コード

TEXTURE_ID 

テクスチャID

START_U 

開始U座標

START_V 

開始V座標

BLACKBOX_X 

内包矩形のX座標

BLACKBOX_Y 

内包矩形のY座標

GLYPHORIGIN_X 

基準X座標

GLYPHORIGIN_Y 

基準Y座標

CELLINC_X 

セルのX座標

◆ ICON_INFOMATION

enum class GxFontTable::ICON_INFOMATION
strong

設定.csv用定義

Enumerator
VERSION 

バージョン

TEXTURE_NUM 

テクスチャ番号

MARGIN_U 

U座標マージン

MARGIN_V 

V座標マージン

◆ ICON_TABLE

enum class GxFontTable::ICON_TABLE
strong

配置テーブル.csv用定義

Enumerator
CODE 

文字コード

TEXTURE_ID 

テクスチャID

START_U 

開始U座標

START_V 

開始V座標

BLACKBOX_X 

内包矩形のX座標

BLACKBOX_Y 

内包矩形のY座標

GLYPHORIGIN_X 

基準X座標

GLYPHORIGIN_Y 

基準Y座標

CELLINC_X 

セルのX座標

◆ TAG_TYPE

enum class GxFontTable::TAG_TYPE
strong

タグの種類

Enumerator
NONE 

タグなし

LINE_BREAK 

改行するタグ [~]

NO_DRAW 

サイズ計算に関係のないタグ[#aarrggbb][/#][(エスケープタグ)

PUSH_ALIGN_HC 

[c] 横位置中央揃え 開始 Horizontal Center

PUSH_ALIGN_HR 

[r] 横位置右寄せ 開始 Horizontal Right

PUSH_ALIGN_HL 

[l] 横位置左寄せ 開始 Horizontal Left

POP_ALIGN_H 

[/c][/r][/l] 横位置アライン 終了

PUSH_SIZE 

[s] size 開始

POP_SIZE 

[/s] size 終了

ICON 

アイコンタグ

PUSH_FONT 

フォント開始

POP_FONT 

フォント終了

PUSH_RUBY 

ルビ開始

POP_RUBY 

ルビ終了

◆ TEXT_ALIGN

enum class GxFontTable::TEXT_ALIGN
strong

テキスト揃え

Enumerator
LEFT_TOP 

左上

LEFT_CENTER 

左中央

LEFT_BOTTOM 

左下

CENTER_TOP 

中央上

CENTER_CENTER 

中央

CENTER_BOTTOM 

中央下

RIGHT_TOP 

右上

RIGHT_CENTER 

右中央

RIGHT_BOTTOM 

右下

LEFT_TOP_CENTER 

左上中央

LEFT_CENTER_CENTER 

左中央

LEFT_BOTTOM_CENTER 

左下中央

JUSTIFY_TOP 

MAX 

定義数

Member Function Documentation

◆ getDrawHitString()

void GxFontTable::getDrawHitString ( GxFontTable::GxDrawHitQuery & dstQuery,
const GxSize & drawArea,
const GxPoint2 & position,
GX_CSTR string,
f32 fontSize,
f32 scaleWidth = 1.0f,
b32 isSjis = false,
b32 isUseLineBreak = true,
b32 isReferencePointIsBaseLine = false,
b32 isUseTextTag = false,
TEXT_ALIGN align = TEXT_ALIGN::LEFT_TOP,
s32 lineOffset = 0 )

当たりに必要な情報を求める

Parameters
dstQuery[out] 描画情報
drawArea[in] 描画領域
position[in] 座標
string[in] 文字列
fontSize[in] フォントサイズ
scaleWidth[in] スケール幅
isSjis[in] SJISならtrue
isUseLineBreak[in] 改行を使うならtrue
isReferencePointIsBaseLine[in] ベースラインを参照するならtrue
isUseTextTag[in] テキストタグを使うならtrue
align[in] テキスト揃え
lineOffset[in] ラインオフセット
Here is the call graph for this function:

◆ getDrawQueryString()

void GxFontTable::getDrawQueryString ( GxFontTable::GxDrawFontQuery & dstQuery,
const GxSize & drawArea,
const GxPoint2 & position,
GX_CSTR string,
f32 fontSize,
f32 scaleWidth = 1.0f,
b32 isSjis = false,
b32 isUseLineBreak = true,
b32 isReferencePointIsBaseLine = false,
b32 isUseTextTag = false,
TEXT_ALIGN align = TEXT_ALIGN::LEFT_TOP,
s32 lineOffset = 0 )

描画に必要な情報を求める

Parameters
dstQuery[out] 描画情報
drawArea[in] 描画領域
position[in] 座標
string[in] 文字列
fontSize[in] フォントサイズ
scaleWidth[in] スケール幅
isSjis[in] SJISならtrue
isUseLineBreak[in] 改行を使うならtrue
isReferencePointIsBaseLine[in] ベースラインを参照するならtrue
isUseTextTag[in] テキストタグを使うならtrue
align[in] テキスト揃え
lineOffset[in] ラインオフセット
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDrawRect()

void GxFontTable::getDrawRect ( const GxFontInformation & information,
GxFloat2 & leftTop,
GxFloat2 & rightBottom,
b32 isReferencePointIsBaseLine = false,
b32 useMarginUV = false,
b32 isIcon = false )

描画位置の頂点を求める (文字ギリギリのサイズ)

Parameters
information[in] 文字情報
leftTop[out] 左上座標
rightBottom[out] 右下座標
isReferencePointIsBaseLine[in] ベースラインを参照するならtrue
useMarginUV[in] UVのマージンを使うならtrue
isIcon[in] アイコンならtrue
Here is the caller graph for this function:

◆ getDrawRectString()

void GxFontTable::getDrawRectString ( GxRect & dstRect,
const GxPoint2 & position,
GX_CSTR string,
f32 fontSize,
f32 scaleWidth = 1.0f,
b32 isSjis = false,
b32 isUseLineBreak = true,
b32 isReferencePointIsBaseLine = false,
b32 isUseTextTag = false )

描画に必要な矩形を求める

Parameters
dstRect[out] 矩形
position[in] 座標
string[in] 文字列
fontSize[in] フォントサイズ
scaleWidth[in] スケール幅
isSjis[in] SJISならtrue
isUseLineBreak[in] 改行を使うならtrue
isReferencePointIsBaseLine[in] ベースラインを参照するならtrue
isUseTextTag[in] テキストタグを使うならtrue
Here is the call graph for this function:

◆ getFontInformation()

const GxFontTable::GxFontInformation * GxFontTable::getFontInformation ( GX_CSTR str)

文字情報を取得する

Parameters
str[in] 文字
Returns
文字情報
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFontInformationIcon()

const GxFontTable::GxFontInformation * GxFontTable::getFontInformationIcon ( const u32 index)

アイコンの文字情報を取得する

Parameters
index[in] インデックス
Returns
文字情報
Here is the caller graph for this function:

◆ getMaxInnerRect()

void GxFontTable::getMaxInnerRect ( const GxFontInformation & information,
GxFloat2 & leftTop,
GxFloat2 & rightBottom,
b32 isReferencePointIsBaseLine = false )

フォントの最大内側を求める (高さ情報は登録されているフォントを包括するサイズ)

Parameters
information[in] 文字情報
leftTop[out] 左上座標
rightBottom[out] 右下座標
isReferencePointIsBaseLine[in] ベースラインを参照するならtrue

◆ getOuterRect()

void GxFontTable::getOuterRect ( const GxFontInformation & information,
GxFloat2 & leftTop,
GxFloat2 & rightBottom,
b32 isReferencePointIsBaseLine = false )

フォントの外側を求める (_tmHeight x _gmCellIncX の大きさ)

Parameters
information[in] 文字情報
leftTop[out] 左上座標
rightBottom[out] 右下座標
isReferencePointIsBaseLine[in] ベースラインを参照するならtrue

◆ getUvRect()

void GxFontTable::getUvRect ( const GxFontInformation & information,
GxFloat2 & leftTop,
GxFloat2 & rightBottom,
b32 useMarginUV = false,
b32 isIcon = false )

UVを求める

Parameters
information[in] 文字情報
leftTop[out] 左上座標
rightBottom[out] 右下座標
useMarginUV[in] ベースラインを参照するならtrue
isIcon[in] アイコンならtrue
Here is the call graph for this function:

◆ setResource()

void GxFontTable::setResource ( GxFontTableInformation * pFont,
GxFontIconTableInformation * pIcon )

リソースを設定する

Parameters
pFont[in] フォントテーブル情報
pIcon[in] フォントアイコンテーブル情報

The documentation for this class was generated from the following files: