13GX_CORE_NAMESPACE_BEGIN()
18#define FONTINFO_TAG_NUM_STACK 16
19#define FONTINFO_TAG_PUSH_VALUE(_Value, _Buffer, _StackInt) \
21 _Buffer[_StackInt] = _Value; \
22 if(_StackInt != (FONTINFO_TAG_NUM_STACK-1)) { _StackInt ++; } \
25#define FONTINFO_TAG_POP_VALUE(_Value, _Buffer, _StackInt) \
27 if(_StackInt != 0){ _StackInt --; \
28 _Value = _Buffer[_StackInt]; } \
29 else{ GX_MEMSET(&_Value, 0, sizeof(_Value)); } \
258 void cleanup(
void)
override;
267 void loadResource(GX_CSTR path);
269 void createFontTable(
void);
271 void releaseFontTable(
void);
273 u32 getCountFontTableObject(
void);
275 u8 getCode(u32 row, u32
byte);
277 void setUnregisteredChar(GX_CSTR chr);
298 GX_CHAR _unregisterChar[5];
330 void cleanup(
void)
override;
339 void loadResource(GX_CSTR pathIcon);
341 void createFontTableIcon(
void);
343 void releaseFontTableIcon(
void);
345 u32 getCountFontTableObjectIcon(
void);
388 : _cursorStart(cursorStart)
389 , _cursorEnd(cursorEnd)
390 , _useGmBlackBox(useGmBlackBox)
391 , _pSelectedRectBuffer(pBuffer)
392 , _selectedRectBufferSize(bufferSize)
400 , _useGmBlackBox(true)
401 , _pSelectedRectBuffer(nullptr)
402 , _selectedRectBufferSize(0)
425 constexpr void setMode(u32 mode) { _mode = mode; }
459 , _useCursorMode(useCursorMode)
460 , _useGmBlackBox(useGmBlackBox)
465 : _useCursorMode(false)
466 , _useGmBlackBox(true)
493 constexpr f32
getRatio(
void)
const {
return _ratio; }
621 void getDrawRect(
const GxFontInformation& information,
GxFloat2& leftTop,
GxFloat2& rightBottom,
b32 isReferencePointIsBaseLine =
false,
b32 useMarginUV =
false,
b32 isIcon =
false);
630 f32 fontScale, f32 scaleWidth = 1.0f,
631 b32 isSjis =
false,
b32 isUseLineBreak =
true,
b32 isReferencePointIsBaseLine =
false,
b32 isUseTextTag =
false );
634 f32 fontScale, f32 scaleWidth = 1.0f,
635 b32 isSjis =
false,
b32 isUseLineBreak =
true,
b32 isReferencePointIsBaseLine =
false,
b32 isUseTextTag =
false,
639 f32 fontScale, f32 scaleWidth = 1.0f,
644 static void releaseCountFontTableObject(GxFontAccessTable* pTable);
646 u8 getCode(u32 row, u32
byte);
648 void getLineInfo(GX_CSTR
string, u32 length,
b32 isSjis,
const GxLineCondition& condition, GxLineInfo& lineInfo);
650 u8 getSizeCRLF(GX_CSTR
string);
662 GxFontInformation* _pFontInformationTable;
671 f32 _maxGlyphOriginY;
673 GX_CHAR _unregisterChar[5];
677 GxFontAccessTable* _pAccessTable;
683 FontCode(u32 value) :_code(value) {}
688 GxFontInformation* _pFontInformationTableIcon;
694 GxFontAccessTable* _pAccessTableIcon;
699GX_CORE_NAMESPACE_END()
#define GX_PROHIBIT_CLASS_BASE_REFERENCE(__CLASS__)
GxClassBaseReference継承の禁止宣言(new以外の生成禁止 + コピー禁止)
Definition GxBase.h:244
オブジェクト基底クラス
Definition GxBase.h:88
参照オブジェクト基底クラス
Definition GxBase.h:122
フォント情報取得用構造体
Definition GxFontTable.h:367
u32 _selectedRectBufferSize
範囲選択矩形バッファの個数(入力)
Definition GxFontTable.h:439
u32 _firstLineByte
最初の1行のバイト数
Definition GxFontTable.h:441
u32 _cursorEnd
カーソル終了位置(入力)
Definition GxFontTable.h:436
u32 _firstLineBreakByte
最初に強制改行が発生した場所。先頭からのバイト数
Definition GxFontTable.h:443
constexpr u32 getOverLines(void) const
エリアからはみ出た行数を取得
Definition GxFontTable.h:421
constexpr void setMode(u32 mode)
検査モードを QUERY_MODE のビットマスクで指定
Definition GxFontTable.h:425
constexpr u32 getSelectedRectCount(void) const
範囲選択矩形バッファの個数を取得
Definition GxFontTable.h:417
GxRect _rect
文字全体の矩形
Definition GxFontTable.h:433
u32 _selectedRectCount
使用された範囲選択矩形バッファの個数を返す
Definition GxFontTable.h:440
constexpr u32 getFirstLineByte(void) const
最初の1行目のバイト数を取得
Definition GxFontTable.h:419
constexpr u32 getFirstLineBreakByte(void) const
強制改行が発生した位置(先頭からのバイト数)を取得
Definition GxFontTable.h:423
GxRect * _pSelectedRectBuffer
範囲選択矩形バッファ(入出力)
Definition GxFontTable.h:438
GX_FORCE_INLINE const GxRect & getRect(void) const
文字全体の矩形を取得
Definition GxFontTable.h:413
GxDrawFontQuery(void)
デフォルトコンストラクタ
Definition GxFontTable.h:397
MODE
検査モードビットマスク
Definition GxFontTable.h:375
u32 _overLines
エリアから下にはみ出た行数
Definition GxFontTable.h:442
u32 _mode
検査モード。QUERY_MODE のビットマスクで指定。
Definition GxFontTable.h:444
GxDrawFontQuery(u32 cursorStart, u32 cursorEnd, b32 useGmBlackBox=true, GxRect *pBuffer=nullptr, u32 bufferSize=0)
コンストラクタ
Definition GxFontTable.h:387
GX_FORCE_INLINE const GxPoint2 & getDrawCursorPosition(void) const
カーソルの描画位置を取得
Definition GxFontTable.h:415
GxPoint2 _cursorPosition
カーソル位置
Definition GxFontTable.h:434
u32 _cursorStart
カーソル開始位置(入力)
Definition GxFontTable.h:435
b32 _useGmBlackBox
rect のサイズにgmBlackBox(文字のぎりぎりサイズ)を使用する
Definition GxFontTable.h:437
フォント当たり判定情報取得用構造体
Definition GxFontTable.h:450
constexpr u32 getCharOffset(void) const
当たった文字列の先頭からのオフセット文字数を取得(先頭は0から、改行は含まない)
Definition GxFontTable.h:488
GxDrawHitQuery(void)
デストラクタ
Definition GxFontTable.h:464
constexpr f32 getRatio(void) const
文字の矩形のどのあたりにヒットしたかの割合(左側0.0~右側1.0)
Definition GxFontTable.h:493
constexpr u32 getCharWidth(void) const
当たった文字の1文字のバイトサイズを取得
Definition GxFontTable.h:491
GX_FORCE_INLINE const GxRect & getRect(void) const
文字の矩形を取得(当たった場合)
Definition GxFontTable.h:482
u32 _charOffset
当たった文字のオフセット文字数
Definition GxFontTable.h:507
GX_FORCE_INLINE b32 getIsHit(void) const
文字に当たったか判定
Definition GxFontTable.h:480
u32 _charWidth
当たった1文字のバイト数
Definition GxFontTable.h:508
GxDrawHitQuery(GxPoint2 &xy, b32 useCursorMode=false, b32 useGmBlackBox=true)
コンストラクタ
Definition GxFontTable.h:457
GX_FORCE_INLINE void setUseCursorMode(b32 use)
カーソル移動制御モードを設定
Definition GxFontTable.h:478
b32 _useGmBlackBox
当たり判定にgmBlackBox(文字のぎりぎりサイズ)を使用する
Definition GxFontTable.h:503
GX_FORCE_INLINE void setPosition(GxPoint2 &position)
検査したいスクリーン座標を設定
Definition GxFontTable.h:476
u32 _byteOffset
当たった文字のオフセットバイト
Definition GxFontTable.h:506
f32 _ratio
当たり場所の文字に対する割合
Definition GxFontTable.h:509
constexpr u32 getByteOffset(void) const
当たった文字列の先頭からのオフセットバイトを取得
Definition GxFontTable.h:485
GxRect _rect
当たった文字の矩形
Definition GxFontTable.h:505
b32 _useCursorMode
カーソル移動制御として改行を判定する(入力)
Definition GxFontTable.h:502
GxPoint2 _position
検査位置 (入力)
Definition GxFontTable.h:501
b32 _isHit
文字に当たったか
Definition GxFontTable.h:504
フォントアクセステーブル
Definition GxFontTable.h:203
フォントテーブルアクセス
Definition GxFontTable.h:35
GxFontTable(void)
コンストラクタ
Definition GxFontTable.cpp:687
TAG_TYPE
タグの種類
Definition GxFontTable.h:98
@ PUSH_ALIGN_HL
[l] 横位置左寄せ 開始 Horizontal Left
@ POP_ALIGN_H
[/c][/r][/l] 横位置アライン 終了
@ PUSH_ALIGN_HR
[r] 横位置右寄せ 開始 Horizontal Right
@ NO_DRAW
サイズ計算に関係のないタグ[#aarrggbb][/#][(エスケープタグ)
@ PUSH_ALIGN_HC
[c] 横位置中央揃え 開始 Horizontal Center
ICON_TABLE
配置テーブル.csv用定義
Definition GxFontTable.h:84
const GxFontTable::GxFontInformation * getFontInformationIcon(const u32 index)
アイコンの文字情報を取得する
Definition GxFontTable.cpp:887
constexpr u32 getTextureNum(void) const
テクスチャの枚数を取得
Definition GxFontTable.h:606
TEXT_ALIGN
テキスト揃え
Definition GxFontTable.h:118
FONT_TABLE
フォントテーブルアクセス用定義
Definition GxFontTable.h:61
constexpr f32 getTmHeight(void) const
文字全体の高さを取得
Definition GxFontTable.h:608
void getUvRect(const GxFontInformation &information, GxFloat2 &leftTop, GxFloat2 &rightBottom, b32 useMarginUV=false, b32 isIcon=false)
UVを求める
Definition GxFontTable.cpp:1015
void getDrawRect(const GxFontInformation &information, GxFloat2 &leftTop, GxFloat2 &rightBottom, b32 isReferencePointIsBaseLine=false, b32 useMarginUV=false, b32 isIcon=false)
描画位置の頂点を求める (文字ギリギリのサイズ)
Definition GxFontTable.cpp:937
constexpr GxFontInformation * getFontInformationTable(void) const
フォントテーブルを取得
Definition GxFontTable.h:616
constexpr GxResTexture * getIconTexture(u32 no) const
アイコンテクスチャ取得
Definition GxFontTable.h:602
const GxFontTable::GxFontInformation * getFontInformation(GX_CSTR text)
文字情報を取得する
Definition GxFontTable.cpp:811
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)
描画に必要な矩形を求める
Definition GxFontTable.cpp:1062
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)
当たりに必要な情報を求める
Definition GxFontTable.cpp:1487
GX_FORCE_INLINE b32 isDistanceFont(void) const
距離フォントか判定
Definition GxFontTable.h:614
constexpr GxResTexture * getFontTexture(u32 no) const
フォントテクスチャ取得
Definition GxFontTable.h:598
constexpr f32 getTmDescent(void) const
文字の下部の高さを取得
Definition GxFontTable.h:610
void getOuterRect(const GxFontInformation &information, GxFloat2 &leftTop, GxFloat2 &rightBottom, b32 isReferencePointIsBaseLine=false)
フォントの外側を求める (_tmHeight x _gmCellIncX の大きさ)
Definition GxFontTable.cpp:970
void getMaxInnerRect(const GxFontInformation &information, GxFloat2 &leftTop, GxFloat2 &rightBottom, b32 isReferencePointIsBaseLine=false)
フォントの最大内側を求める (高さ情報は登録されているフォントを包括するサイズ)
Definition GxFontTable.cpp:992
FONT_INFOMATION
テーブル情報用定義
Definition GxFontTable.h:46
constexpr GxFontInformation * getFontInformationTableIcon(void) const
フォントアイコンテーブルを取得
Definition GxFontTable.h:618
constexpr u32 getFontSize(void) const
フォントサイズ取得
Definition GxFontTable.h:612
ICON_INFOMATION
設定.csv用定義
Definition GxFontTable.h:75
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)
描画に必要な情報を求める
Definition GxFontTable.cpp:1086
void setResource(GxFontTableInformation *pFontTableInformation, GxFontIconTableInformation *pIconTableInformation)
リソースを設定する
Definition GxFontTable.cpp:716
テクスチャリソース
Definition GxResTexture.h:23
2次元浮動小数点数クラス
Definition GxStruct.h:22
行走査条件
Definition GxFontTable.h:551
f32 _fontHeight
フォントの高さ
Definition GxFontTable.h:566
TEXT_ALIGN _alignArea
エリア全体のアライン情報
Definition GxFontTable.h:574
u32 _startIndex
開始インデックス
Definition GxFontTable.h:565
TEXT_ALIGN _align
今の行のアライン情報
Definition GxFontTable.h:573
s32 _widthMax
幅の最大値
Definition GxFontTable.h:569
b32 _isReferencePointIsBaseLine
参照位置がベースラインか
Definition GxFontTable.h:570
f32 _scaleBySizeTag
今の行のサイズタグの値
Definition GxFontTable.h:568
f32 _fontScaleWidth
フォント幅の拡大率
Definition GxFontTable.h:567
b32 _isUseLineBreak
改行を使用するか
Definition GxFontTable.h:571
b32 _isUseTextTag
テキストタグを使用するか
Definition GxFontTable.h:572
行情報
Definition GxFontTable.h:517
TEXT_ALIGN _alignNext
次行のアライン情報
Definition GxFontTable.h:544
GxLineInfo(void)
コンストラクタ
Definition GxFontTable.h:524
u32 _numChar
行の文字数
Definition GxFontTable.h:540
s32 _offsetX
横アラインメントによる位置のずれ量
Definition GxFontTable.h:543
u32 _endIndex
行終了の文字列位置
Definition GxFontTable.h:538
u8 _sizeCRLF
改行文字のバイトサイズ
Definition GxFontTable.h:539
s32 _height
行高さ
Definition GxFontTable.h:542
u32 _lineBreakIndex
行の文字数
Definition GxFontTable.h:541
Definition GxFontTable.h:140
TagInfo(void)
コンストラクタ
Definition GxFontTable.h:147
u32 _fontSize
フォントサイズ
Definition GxFontTable.h:161
u32 _iconIndex
アイコンインデックス
Definition GxFontTable.h:162
TAG_TYPE _type
タグの種類
Definition GxFontTable.h:158
座標
Definition GxStruct.h:867
矩形
Definition GxStruct.h:951
サイズ
Definition GxStruct.h:730
文字列型クラス
Definition GxString.h:18
32bitブーリアン
Definition GxDefine.h:173