mirror of
https://github.com/rvtr/TwlIPL_commit-99.git
synced 2025-10-31 06:21:11 -04:00
805 lines
26 KiB
C
Executable File
805 lines
26 KiB
C
Executable File
/*---------------------------------------------------------------------------*
|
||
Project: NITRO-System - include - nnsys - g2d
|
||
File: g2d_Font.h
|
||
|
||
Copyright 2004-2008 Nintendo. All rights reserved.
|
||
|
||
These coded instructions, statements, and computer programs contain
|
||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||
Company Ltd., and are protected by Federal copyright law. They may
|
||
not be disclosed to third parties or copied or duplicated in any form,
|
||
in whole or in part, without the prior written consent of Nintendo.
|
||
|
||
$Revision: 172 $
|
||
*---------------------------------------------------------------------------*/
|
||
#ifndef G2D_FONT_H_
|
||
#define G2D_FONT_H_
|
||
|
||
#include <nnsys/g2d/g2d_config.h>
|
||
#include <nnsys/g2d/g2di_AssertUtil.h>
|
||
#include <nnsys/g2d/fmt/g2d_Font_data.h>
|
||
#include <nnsys/g2d/g2di_SplitChar.h>
|
||
#include <nnsys/g2d/g2di_Char.h>
|
||
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif
|
||
|
||
//---------------------------------------------------------------------
|
||
|
||
//*****************************************************************************
|
||
// Font ƒ}ƒNƒ<4E>
|
||
//*****************************************************************************
|
||
|
||
#define NNS_G2D_FONT_ASSERT( pFont ) \
|
||
NNS_G2D_ASSERTMSG( \
|
||
((pFont) != NULL) \
|
||
&& (*(((u32*)((pFont)->pRes)) - 2) == NNS_G2D_BINBLK_SIG_FINFDATA) \
|
||
&& ((pFont)->pRes->pGlyph != NULL) \
|
||
&& NNS_G2D_IS_VALID_POINTER((pFont)->cbCharSpliter) \
|
||
, "invalid NNSG2dFont data" )
|
||
|
||
#define NNS_G2D_GLYPH_ASSERT( pGlyph ) \
|
||
NNS_G2D_ASSERTMSG( \
|
||
((pGlyph) != NULL) \
|
||
&& ((pGlyph)->image != NULL) \
|
||
, "invalid NNSG2dGlyph data") \
|
||
|
||
#define NNS_G2D_FONT_MAX_GLYPH_INDEX( pFont ) \
|
||
((*((u32*)(pFont)->pRes->pGlyph - 1) - sizeof(*((pFont)->pRes->pGlyph))) \
|
||
/ (pFont)->pRes->pGlyph->cellSize) \
|
||
|
||
|
||
#define NNS_G2D_GLYPH_INDEX_NOT_FOUND 0xFFFF
|
||
|
||
|
||
|
||
|
||
|
||
//*****************************************************************************
|
||
// Font ’è‹`
|
||
//*****************************************************************************
|
||
|
||
// ƒtƒHƒ“ƒg
|
||
typedef struct NNSG2dFont
|
||
{
|
||
NNSG2dFontInformation* pRes; // “WŠJ<C5A0>ς݃tƒHƒ“ƒgƒŠƒ\<5C>[ƒX‚ւ̃|ƒCƒ“ƒ^
|
||
NNSiG2dSplitCharCallback cbCharSpliter; // •¶Žš—ñƒGƒ“ƒR<C692>[ƒfƒBƒ“ƒO<C692>ˆ—<CB86>ƒR<C692>[ƒ‹ƒoƒbƒN‚ւ̃|ƒCƒ“ƒ^
|
||
}
|
||
NNSG2dFont;
|
||
|
||
|
||
|
||
// ƒOƒŠƒt
|
||
typedef struct NNSG2dGlyph
|
||
{
|
||
const NNSG2dCharWidths* pWidths; // •<><E280A2>î•ñ‚ւ̃|ƒCƒ“ƒ^
|
||
const u8* image; // ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚ւ̃|ƒCƒ“ƒ^
|
||
}
|
||
NNSG2dGlyph;
|
||
|
||
|
||
|
||
// •¶Žš—ñ‹éŒ`
|
||
typedef struct NNSG2dTextRect
|
||
{
|
||
int width; // ‹éŒ`•<>
|
||
int height; // ‹éŒ`<60>‚‚³
|
||
}
|
||
NNSG2dTextRect;
|
||
|
||
|
||
|
||
|
||
|
||
//*****************************************************************************
|
||
// Font <20>\’z
|
||
//*****************************************************************************
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontInit*
|
||
|
||
Description: ƒtƒHƒ“ƒgƒŠƒ\<5C>[ƒX‚©‚çƒtƒHƒ“ƒg‚ð<E2809A>\’z‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
pNftrFile: ƒtƒHƒ“ƒgƒŠƒ\<5C>[ƒX‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒtƒHƒ“ƒg‚Ì<E2809A>\’z‚É<E2809A>¬Œ÷‚µ‚½<E2809A>ê<EFBFBD>‡‚ÍFALSEˆÈŠO‚ð•Ô‚µ‚Ü‚·<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
void NNS_G2dFontInitAuto(NNSG2dFont* pFont, void* pNftrFile);
|
||
void NNS_G2dFontInitUTF8(NNSG2dFont* pFont, void* pNftrFile);
|
||
void NNS_G2dFontInitUTF16(NNSG2dFont* pFont, void* pNftrFile);
|
||
void NNS_G2dFontInitShiftJIS(NNSG2dFont* pFont, void* pNftrFile);
|
||
void NNS_G2dFontInitCP1252(NNSG2dFont* pFont, void* pNftrFile);
|
||
|
||
|
||
|
||
|
||
|
||
//*****************************************************************************
|
||
// Font ‘€<E28098>ì
|
||
//*****************************************************************************
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontFindGlyphIndex
|
||
|
||
Description: •¶ŽšƒR<C692>[ƒh‚©‚ç‘Ήž‚·‚éƒOƒŠƒt‚̃Cƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
c: ƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚·‚é•¶ŽšƒR<C692>[ƒh<C692>B
|
||
|
||
Returns: c ‚ɑΉž‚·‚éƒOƒŠƒt‚ª‘¶<E28098>Ý‚·‚é<E2809A>ê<EFBFBD>‡‚Í‚»‚̃Cƒ“ƒfƒbƒNƒX<C692>B
|
||
‘¶<E28098>Ý‚µ‚È‚¢<E2809A>ê<EFBFBD>‡‚Í NNS_G2D_GLYPH_INDEX_NOT_FOUND<4E>B
|
||
*---------------------------------------------------------------------------*/
|
||
u16 NNS_G2dFontFindGlyphIndex( const NNSG2dFont* pFont, u16 c );
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetCharWidthsFromIndex
|
||
|
||
Description: ƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX‚©‚ç•¶Žš•<C5A1><E280A2>î•ñ‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
idx: ƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX<C692>B
|
||
|
||
Returns: •¶Žš•<C5A1><E280A2>î•ñ‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
*---------------------------------------------------------------------------*/
|
||
const NNSG2dCharWidths* NNS_G2dFontGetCharWidthsFromIndex(
|
||
const NNSG2dFont* pFont, u16 idx );
|
||
|
||
|
||
|
||
|
||
|
||
//*****************************************************************************
|
||
// Font ƒAƒNƒZƒT
|
||
//*****************************************************************************
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetType
|
||
|
||
Description: ƒtƒHƒ“ƒg‚̃^ƒCƒv‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒtƒHƒ“ƒg‚̃^ƒCƒv<C692>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE NNSG2dFontType NNS_G2dFontGetType( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return (NNSG2dFontType)pFont->pRes->fontType;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetLineFeed
|
||
|
||
Description: ƒtƒHƒ“ƒg‚̉ü<E280B0>s•<73>‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒtƒHƒ“ƒg‚̉ü<E280B0>s•<73><E280A2>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE s8 NNS_G2dFontGetLineFeed( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->pRes->linefeed;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetAlternateGlyphIndex
|
||
|
||
Description: ƒtƒHƒ“ƒg‚Ì‘ã‘Ö•¶ŽšƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒtƒHƒ“ƒg‚Ì‘ã‘Ö•¶ŽšƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX<C692>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE u16 NNS_G2dFontGetAlternateGlyphIndex( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->pRes->alterCharIndex;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetDefaultCharWidths
|
||
|
||
Description: ƒfƒtƒHƒ‹ƒg‚Ì•¶Žš•<C5A1><E280A2>î•ñ‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
ƒfƒtƒHƒ‹ƒg‚Ì•¶Žš•<C5A1><E280A2>î•ñ‚Í•¶Žš‚ªŒÅ—L‚Ì•¶Žš•<C5A1><E280A2>î•ñ‚ðŽ<C3B0>‚½‚È‚¢<E2809A>ê<EFBFBD>‡‚É
|
||
Žg—p‚³‚ê‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒfƒtƒHƒ‹ƒg‚Ì•¶Žš•<C5A1><E280A2>î•ñ‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE NNSG2dCharWidths* NNS_G2dFontGetDefaultCharWidths( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return &pFont->pRes->defaultWidth;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetHeight
|
||
|
||
Description: ƒtƒHƒ“ƒg‚Ì<E2809A>‚‚³‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
’Ê<E28099>í<EFBFBD>AƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì<E2809A>‚‚³‚ªƒtƒHƒ“ƒg‚Ì<E2809A>‚‚³‚ɂȂè‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒtƒHƒ“ƒg‚Ì<E2809A>‚‚³<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE u8 NNS_G2dFontGetHeight( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->pRes->pGlyph->cellHeight;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetCellHeight
|
||
|
||
Description: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì<E2809A>‚‚³‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚̑傫‚³‚̓tƒHƒ“ƒg“à‚Ì‘S‚Ă̕¶Žš‚Å‹¤’ʂł·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì<E2809A>‚‚³<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE u8 NNS_G2dFontGetCellHeight( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->pRes->pGlyph->cellHeight;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetCellWidth
|
||
|
||
Description: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì•<C38C>‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚̑傫‚³‚̓tƒHƒ“ƒg“à‚Ì‘S‚Ă̕¶Žš‚Å‹¤’ʂł·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì•<C38C><E280A2>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE u8 NNS_G2dFontGetCellWidth( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->pRes->pGlyph->cellWidth;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetBaselinePos
|
||
|
||
Description: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì<E2809A>ã’[‚©‚ç‚Ý‚½ƒx<C692>[ƒXƒ‰ƒCƒ“‚̈ʒu‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì<E2809A>ã’[‚ð 0 ‚Æ‚µ‚½ƒx<C692>[ƒXƒ‰ƒCƒ“‚̈ʒu
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE int NNS_G2dFontGetBaselinePos( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT( pFont );
|
||
return pFont->pRes->pGlyph->baselinePos;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNSi_G2dFontGetGlyphDataSize
|
||
|
||
Description: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì1•¶Žš‚ ‚½‚è‚̃oƒCƒgƒTƒCƒY‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚̑傫‚³‚̓tƒHƒ“ƒg“à‚Ì‘S‚Ă̕¶Žš‚Å‹¤’ʂł·<E2809A>B
|
||
|
||
(CellWidth * CellHeight * bpp + 7) / 8 ‚Æ“™‚µ‚‚È‚è‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì1•¶Žš‚ ‚½‚è‚̃oƒCƒgƒTƒCƒY<C692>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE int NNSi_G2dFontGetGlyphDataSize( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->pRes->pGlyph->cellSize;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetMaxCharWidth
|
||
|
||
Description: ƒtƒHƒ“ƒg’†‚Ì<E2809A>Å‘å•¶Žš•<C5A1>‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒtƒHƒ“ƒg’†‚Ì<E2809A>Å‘å•¶Žš•<C5A1><E280A2>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE u8 NNS_G2dFontGetMaxCharWidth( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->pRes->pGlyph->maxCharWidth;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetBpp
|
||
|
||
Description: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì1ƒhƒbƒg‚ ‚½‚è‚̃rƒbƒg<C692>”‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚Ì1ƒhƒbƒg‚ ‚½‚è‚̃rƒbƒg<C692>”<EFBFBD>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE u8 NNS_G2dFontGetBpp( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->pRes->pGlyph->bpp;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNSi_G2dFontGetEncoding
|
||
|
||
Description: ƒtƒHƒ“ƒg‚ª‘Ήž‚·‚é•¶Žš—ñƒGƒ“ƒR<C692>[ƒfƒBƒ“ƒO‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒtƒHƒ“ƒg‚ª‘Ήž‚·‚é•¶Žš—ñƒGƒ“ƒR<C692>[ƒfƒBƒ“ƒO<C692>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE NNSG2dFontEncoding NNSi_G2dFontGetEncoding( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return (NNSG2dFontEncoding)pFont->pRes->encoding;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNSi_G2dFontGetSpliter
|
||
|
||
Description: •¶Žš—ñƒGƒ“ƒR<C692>[ƒfƒBƒ“ƒO<C692>ˆ—<CB86>ƒR<C692>[ƒ‹ƒoƒbƒNŠÖ<C5A0>”‚ւ̃|ƒCƒ“ƒ^‚ð
|
||
Žæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: •¶Žš—ñƒGƒ“ƒR<C692>[ƒfƒBƒ“ƒO<C692>ˆ—<CB86>ƒR<C692>[ƒ‹ƒoƒbƒNŠÖ<C5A0>”‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE NNSiG2dSplitCharCallback NNSi_G2dFontGetSpliter( const NNSG2dFont* pFont )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->cbCharSpliter;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetGlyphImageFromIndex
|
||
|
||
Description: ƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX‚©‚çƒOƒŠƒtƒCƒ<43><C692>[ƒW‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
idx: ƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX<C692>B
|
||
|
||
Returns: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE const u8* NNS_G2dFontGetGlyphImageFromIndex(
|
||
const NNSG2dFont* pFont, u16 idx )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
NNS_G2D_ASSERT( idx < NNS_G2D_FONT_MAX_GLYPH_INDEX(pFont) );
|
||
return pFont->pRes->pGlyph->glyphTable + idx * NNSi_G2dFontGetGlyphDataSize(pFont);
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetFlags
|
||
|
||
Description: ƒOƒŠƒt‚Ì“Á’¥ƒtƒ‰ƒO‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒOƒŠƒt‚Ì“Á’¥ƒtƒ‰ƒO‚ð•Ô‚µ‚Ü‚·<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE u8 NNS_G2dFontGetFlags(const NNSG2dFont* pFont)
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
return pFont->pRes->pGlyph->flags;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontSetLineFeed
|
||
|
||
Description: ƒtƒHƒ“ƒg‚̉ü<E280B0>s•<73>‚ð<E2809A>ݒ肵‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
linefeed: <20>V‚µ‚¢‰ü<E280B0>s•<73>
|
||
|
||
Returns: ƒtƒHƒ“ƒg‚̉ü<E280B0>s•<73><E280A2>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE void NNS_G2dFontSetLineFeed( NNSG2dFont* pFont, s8 linefeed )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
pFont->pRes->linefeed = linefeed;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontSetDefaultCharWidths
|
||
|
||
Description: ƒfƒtƒHƒ‹ƒg‚Ì•¶Žš•<C5A1><E280A2>î•ñ‚ð<E2809A>ݒ肵‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
gw: <20>V‚µ‚¢ƒfƒtƒHƒ‹ƒg•¶Žš•<C5A1><E280A2>î•ñ<E280A2>B
|
||
|
||
Returns: ‚È‚µ<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE void NNS_G2dFontSetDefaultCharWidths(
|
||
NNSG2dFont* pFont, NNSG2dCharWidths cw)
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
pFont->pRes->defaultWidth = cw;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontSetAlternateGlyphIndex
|
||
|
||
Description: ƒtƒHƒ“ƒg‚Ì‘ã‘Ö•¶ŽšƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX‚ð<E2809A>ݒ肵‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
idx: <20>V‚µ‚¢‘ã‘Ö•¶ŽšƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX<C692>B
|
||
|
||
Returns: ‚È‚µ<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE void NNS_G2dFontSetAlternateGlyphIndex( NNSG2dFont* pFont, u16 idx )
|
||
{
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
NNS_G2D_ASSERT( idx < NNS_G2D_FONT_MAX_GLYPH_INDEX(pFont) );
|
||
pFont->pRes->alterCharIndex = idx;
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
//*****************************************************************************
|
||
// inline function
|
||
//*****************************************************************************
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetGlyphIndex
|
||
|
||
Description: •¶ŽšƒR<C692>[ƒh‚©‚çƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
c: •¶ŽšƒR<C692>[ƒh<C692>B
|
||
|
||
Returns: ƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX<C692>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE u16 NNS_G2dFontGetGlyphIndex( const NNSG2dFont* pFont, u16 c )
|
||
{
|
||
const u16 idx = NNS_G2dFontFindGlyphIndex(pFont, c);
|
||
|
||
return (idx != NNS_G2D_GLYPH_INDEX_NOT_FOUND) ?
|
||
idx :
|
||
pFont->pRes->alterCharIndex ;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetGlyphFromIndex
|
||
|
||
Description: ƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX‚©‚çƒOƒŠƒt‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pGlyph: ƒOƒŠƒt‚ðŠi”[‚·‚éƒoƒbƒtƒ@‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
idx: Žæ“¾‚·‚éƒOƒŠƒt‚̃OƒŠƒtƒCƒ“ƒfƒbƒNƒX<C692>B
|
||
|
||
Returns: ƒOƒŠƒt‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE void NNS_G2dFontGetGlyphFromIndex(
|
||
NNSG2dGlyph* pGlyph, const NNSG2dFont* pFont, u16 idx )
|
||
{
|
||
NNS_G2D_FONT_ASSERT( pFont );
|
||
NNS_G2D_POINTER_ASSERT( pGlyph );
|
||
pGlyph->pWidths = NNS_G2dFontGetCharWidthsFromIndex(pFont, idx);
|
||
pGlyph->image = NNS_G2dFontGetGlyphImageFromIndex(pFont, idx);
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetCharWidths
|
||
|
||
Description: •¶ŽšƒR<C692>[ƒh‚©‚ç•¶Žš•<C5A1><E280A2>î•ñ‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
c: •¶Žš•<C5A1><E280A2>î•ñ‚ðŽæ“¾‚·‚é•¶Žš‚Ì•¶ŽšƒR<C692>[ƒh
|
||
|
||
Returns: •¶Žš•<C5A1><E280A2>î•ñ<E280A2>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE const NNSG2dCharWidths* NNS_G2dFontGetCharWidths(
|
||
const NNSG2dFont* pFont, u16 c )
|
||
{
|
||
u16 iGlyph;
|
||
|
||
NNS_G2D_FONT_ASSERT( pFont );
|
||
|
||
iGlyph = NNS_G2dFontGetGlyphIndex( pFont, c );
|
||
return NNS_G2dFontGetCharWidthsFromIndex( pFont, iGlyph );
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetCharWidth
|
||
|
||
Description: •¶ŽšƒR<C692>[ƒh‚©‚ç•¶Žš•<C5A1>‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
c: •¶Žš•<C5A1>‚ðŽæ“¾‚·‚é•¶Žš‚Ì•¶ŽšƒR<C692>[ƒh
|
||
|
||
Returns: ƒsƒNƒZƒ‹’PˆÊ‚Ì•¶Žš•<C5A1><E280A2>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE int NNS_G2dFontGetCharWidth( const NNSG2dFont* pFont, u16 c )
|
||
{
|
||
const NNSG2dCharWidths* pWidths;
|
||
|
||
NNS_G2D_FONT_ASSERT( pFont );
|
||
|
||
pWidths = NNS_G2dFontGetCharWidths(pFont, c);
|
||
return pWidths->charWidth;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetCharWidthFromIndex
|
||
|
||
Description: ƒOƒŠƒtƒCƒ“ƒfƒbƒNƒX‚©‚ç•¶Žš•<C5A1>‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
idx: •¶Žš•<C5A1>‚ðŽæ“¾‚·‚é•¶Žš‚̃OƒŠƒtƒCƒ“ƒfƒbƒNƒX
|
||
|
||
Returns: ƒsƒNƒZƒ‹’PˆÊ‚Ì•¶Žš•<C5A1><E280A2>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE int NNS_G2dFontGetCharWidthFromIndex( const NNSG2dFont* pFont, u16 idx )
|
||
{
|
||
const NNSG2dCharWidths* pWidths;
|
||
|
||
NNS_G2D_FONT_ASSERT( pFont );
|
||
|
||
pWidths = NNS_G2dFontGetCharWidthsFromIndex(pFont, idx);
|
||
return pWidths->charWidth;
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetGlyphImage
|
||
|
||
Description: •¶ŽšƒR<C692>[ƒh‚©‚çƒOƒŠƒtƒCƒ<43><C692>[ƒW‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: ƒOƒŠƒtƒCƒ<43><C692>[ƒW‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE const u8* NNS_G2dFontGetGlyphImage( const NNSG2dFont* pFont, u16 c )
|
||
{
|
||
u16 iGlyph;
|
||
|
||
NNS_G2D_FONT_ASSERT( pFont );
|
||
|
||
iGlyph = NNS_G2dFontGetGlyphIndex( pFont, c );
|
||
return NNS_G2dFontGetGlyphImageFromIndex( pFont, iGlyph );
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetGlyph
|
||
|
||
Description: •¶ŽšƒR<C692>[ƒh‚©‚çƒOƒŠƒt‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pGlyph: ƒOƒŠƒt‚ðŠi”[‚·‚éƒoƒbƒtƒ@‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
ccode: ƒOƒŠƒt‚ðŽæ“¾‚·‚é•¶Žš‚Ì•¶ŽšƒR<C692>[ƒh
|
||
|
||
Returns: ƒOƒŠƒt‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE void NNS_G2dFontGetGlyph(
|
||
NNSG2dGlyph* pGlyph, const NNSG2dFont* pFont, u16 ccode )
|
||
{
|
||
u16 iGlyph;
|
||
|
||
NNS_G2D_FONT_ASSERT( pFont );
|
||
NNS_G2D_POINTER_ASSERT( pGlyph );
|
||
|
||
iGlyph = NNS_G2dFontGetGlyphIndex(pFont, ccode);
|
||
NNS_G2dFontGetGlyphFromIndex(pGlyph, pFont, iGlyph);
|
||
}
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontSetAlternateChar
|
||
|
||
Description: ‘ã‘Ö•¶Žš‚ðŽw’肵‚½•¶ŽšƒR<C692>[ƒh‚Ì•¶Žš‚É’u‚«Š·‚¦‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
c: <20>V‚µ‚¢‘ã‘Ö•¶Žš‚Ì•¶ŽšƒR<C692>[ƒh<C692>B
|
||
|
||
Returns: ‘ã‘Ö•¶Žš‚Ì’u‚«Š·‚¦‚É<E2809A>¬Œ÷‚·‚ê‚Î TRUE<55>B
|
||
ƒtƒHƒ“ƒg“à‚É c ‚ɑΉž‚·‚é•¶Žš‚ª‘¶<E28098>Ý‚µ‚È‚¢<E2809A>ê<EFBFBD>‡‚ÉŽ¸”s‚µ‚Ü‚·<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNS_G2D_INLINE BOOL NNS_G2dFontSetAlternateChar( NNSG2dFont* pFont, u16 c )
|
||
{
|
||
u16 iGlyph;
|
||
|
||
NNS_G2D_FONT_ASSERT(pFont);
|
||
|
||
iGlyph = NNS_G2dFontFindGlyphIndex(pFont, c);
|
||
|
||
if( iGlyph == NNS_G2D_GLYPH_INDEX_NOT_FOUND )
|
||
{
|
||
return FALSE;
|
||
}
|
||
|
||
pFont->pRes->alterCharIndex = iGlyph;
|
||
return TRUE;
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNS_G2dFontGetCharWidthFromIndex
|
||
|
||
Description: ‘ã‘Ö•¶Žš‚ðŽw’肵‚½•¶ŽšƒR<C692>[ƒh‚Ì•¶Žš‚É’u‚«Š·‚¦‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: ƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
c: <20>V‚µ‚¢‘ã‘Ö•¶Žš‚Ì•¶ŽšƒR<C692>[ƒh<C692>B
|
||
|
||
Returns: ‘ã‘Ö•¶Žš‚Ì’u‚«Š·‚¦‚É<E2809A>¬Œ÷‚·‚ê‚Î TRUE<55>B
|
||
ƒtƒHƒ“ƒg“à‚É c ‚ɑΉž‚·‚é•¶Žš‚ª‘¶<E28098>Ý‚µ‚È‚¢<E2809A>ê<EFBFBD>‡‚ÉŽ¸”s‚µ‚Ü‚·<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
|
||
|
||
|
||
|
||
|
||
//*****************************************************************************
|
||
// inline function
|
||
//*****************************************************************************
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNSi_G2dFontGetStringWidth
|
||
|
||
Description: Žw’肳‚ꂽ<E2809A>ðŒ<C3B0>‚Å•¶Žš—ñ‚ð1<C3B0>s•`‰æ‚µ‚½<E2809A>ê<EFBFBD>‡‚Ì•<C38C>‚ð‹<C3B0>‚߂܂·<E2809A>B
|
||
“¯Žž‚É<E2809A>s‚Ì<E2809A>I’[ˆÊ’u‚̃|ƒCƒ“ƒ^‚ðŽæ“¾‚µ‚Ü‚·<E2809A>B
|
||
|
||
Arguments: pFont: •¶Žš—ñ•<C3B1>‚ÌŒvŽZ‚É—p‚¢‚éƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
hSpace: ƒsƒNƒZƒ‹’PˆÊ‚Ì•¶Žš‚Æ•¶Žš‚ÌŠÔŠu<C5A0>B
|
||
str: •¶Žš—ñ•<C3B1>‚ð‹<C3B0>‚ß‚é•¶Žš—ñ‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
pPos: <20>s<EFBFBD>I’[ˆÊ’u‚ւ̃|ƒCƒ“ƒ^‚ðŽó‚¯Žæ‚éƒoƒbƒtƒ@‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
NULLŽw’è‰Â<E280B0>B
|
||
|
||
Returns: str ‚©‚ç1<C3A7>s•ª‚Ì•¶Žš—ñ‚ð•`‰æ‚µ‚½<E2809A>ê<EFBFBD>‡‚̃sƒNƒZƒ‹’PˆÊ‚ł̕<C38C><E280A2>B
|
||
*---------------------------------------------------------------------------*/
|
||
int NNSi_G2dFontGetStringWidth(
|
||
const NNSG2dFont* pFont,
|
||
int hSpace,
|
||
const void* str,
|
||
const void** pPos
|
||
);
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNSi_G2dFontGetTextHeight
|
||
|
||
Description: Žw’肳‚ꂽ<E2809A>ðŒ<C3B0>‚Å•¶Žš—ñ‚ð•`‰æ‚µ‚½<E2809A>ê<EFBFBD>‡‚Ì<E2809A>‚‚³‚ð‹<C3B0>‚߂܂·<E2809A>B
|
||
|
||
Arguments: pFont: •¶Žš—ñ•<C3B1>‚ÌŒvŽZ‚É—p‚¢‚éƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
vSpace: ƒsƒNƒZƒ‹’PˆÊ‚Ì<E2809A>s‚Æ<E2809A>s‚ÌŠÔŠu<C5A0>B
|
||
txt: •¶Žš—ñ•<C3B1>‚ð‹<C3B0>‚ß‚é•¶Žš—ñ‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: •¶Žš—ñ‚ð•`‰æ‚µ‚½<E2809A>ê<EFBFBD>‡‚̃sƒNƒZƒ‹’PˆÊ‚Å‚Ì<E2809A>‚‚³<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
int NNSi_G2dFontGetTextHeight(
|
||
const NNSG2dFont* pFont,
|
||
int vSpace,
|
||
const void* txt
|
||
);
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNSi_G2dFontGetTextWidth
|
||
|
||
Description: Žw’肳‚ꂽ<E2809A>ðŒ<C3B0>‚Å•¶Žš—ñ‚ð•`‰æ‚µ‚½<E2809A>ê<EFBFBD>‡‚Ì•<C38C>‚ð‹<C3B0>‚߂܂·<E2809A>B
|
||
|
||
Arguments: pFont: •¶Žš—ñ•<C3B1>‚ÌŒvŽZ‚É—p‚¢‚éƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
hSpace: ƒsƒNƒZƒ‹’PˆÊ‚Ì•¶Žš‚Æ•¶Žš‚ÌŠÔŠu<C5A0>B
|
||
txt: •¶Žš—ñ•<C3B1>‚ð‹<C3B0>‚ß‚é•¶Žš—ñ‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: •¶Žš—ñ‚ð•`‰æ‚µ‚½<E2809A>ê<EFBFBD>‡‚̃sƒNƒZƒ‹’PˆÊ‚ł̕<C38C><E280A2>B
|
||
‚±‚ê‚ÍŠe<C5A0>s‚Ì•<C38C>‚Ì‚¤‚¿<E2809A>Å‘å‚Ì‚à‚Ì‚ðˆÓ–¡‚µ‚Ü‚·<E2809A>B
|
||
*---------------------------------------------------------------------------*/
|
||
int NNSi_G2dFontGetTextWidth(
|
||
const NNSG2dFont* pFont,
|
||
int hSpace,
|
||
const void* txt
|
||
);
|
||
|
||
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: NNSi_G2dFontGetTextRect
|
||
|
||
Description: Žw’肳‚ꂽ<E2809A>ðŒ<C3B0>‚Å•¶Žš—ñ‚ð•`‰æ‚µ‚½<E2809A>ê<EFBFBD>‡‚Ì•<C38C>‚Æ<E2809A>‚‚³‚ð‹<C3B0>‚߂܂·<E2809A>B
|
||
|
||
Arguments: pFont: •¶Žš—ñ•<C3B1>‚ÌŒvŽZ‚É—p‚¢‚éƒtƒHƒ“ƒg‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
hSpace: ƒsƒNƒZƒ‹’PˆÊ‚Ì•¶Žš‚Æ•¶Žš‚ÌŠÔŠu<C5A0>B
|
||
vSpace: ƒsƒNƒZƒ‹’PˆÊ‚Ì<E2809A>s‚Æ<E2809A>s‚ÌŠÔŠu<C5A0>B
|
||
txt: •¶Žš—ñ•<C3B1>‚ð‹<C3B0>‚ß‚é•¶Žš—ñ‚ւ̃|ƒCƒ“ƒ^<5E>B
|
||
|
||
Returns: •¶Žš—ñ‚ð•`‰æ‚µ‚½<E2809A>ê<EFBFBD>‡‚̃sƒNƒZƒ‹’PˆÊ‚ł̕<C38C>‚Æ<E2809A>‚‚³‚ðŠi”[‚µ‚½
|
||
<20>\‘¢‘Ì<E28098>B
|
||
*---------------------------------------------------------------------------*/
|
||
NNSG2dTextRect NNSi_G2dFontGetTextRect(
|
||
const NNSG2dFont* pFont,
|
||
int hSpace,
|
||
int vSpace,
|
||
const void* txt
|
||
);
|
||
|
||
|
||
|
||
//---------------------------------------------------------------------
|
||
|
||
NNS_G2D_INLINE int NNS_G2dFontGetStringWidth( const NNSG2dFont* pFont, int hSpace, const NNSG2dChar* str, const NNSG2dChar** pPos )
|
||
{ return NNSi_G2dFontGetStringWidth(pFont, hSpace, str, (const void**)pPos); }
|
||
NNS_G2D_INLINE int NNS_G2dFontGetTextHeight( const NNSG2dFont* pFont, int vSpace, const NNSG2dChar* txt )
|
||
{ return NNSi_G2dFontGetTextHeight(pFont, vSpace, txt); }
|
||
NNS_G2D_INLINE int NNS_G2dFontGetTextWidth( const NNSG2dFont* pFont, int hSpace, const NNSG2dChar* txt )
|
||
{ return NNSi_G2dFontGetTextWidth(pFont, hSpace, txt); }
|
||
NNS_G2D_INLINE NNSG2dTextRect NNS_G2dFontGetTextRect( const NNSG2dFont* pFont, int hSpace, int vSpace, const NNSG2dChar* txt )
|
||
{ return NNSi_G2dFontGetTextRect(pFont, hSpace, vSpace, txt); }
|
||
|
||
//---------------------------------------------------------------------
|
||
|
||
|
||
|
||
|
||
//---------------------------------------------------------------------
|
||
|
||
#ifdef __cplusplus
|
||
}/* extern "C" */
|
||
#endif
|
||
|
||
#endif // G2D_FONT_H_
|
||
|