orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
OrxFont

Macros

#define orxFONT_KZ_ANSI   "ansi"
#define orxFONT_KZ_ASCII   "ascii"
#define orxFONT_KZ_CONFIG_CHARACTER_HEIGHT   "CharacterHeight"
#define orxFONT_KZ_CONFIG_CHARACTER_LIST   "CharacterList"
#define orxFONT_KZ_CONFIG_CHARACTER_PADDING   "CharacterPadding"
#define orxFONT_KZ_CONFIG_CHARACTER_SIZE   "CharacterSize"
#define orxFONT_KZ_CONFIG_CHARACTER_SPACING   "CharacterSpacing"
#define orxFONT_KZ_CONFIG_CHARACTER_WIDTH_LIST   "CharacterWidthList"
#define orxFONT_KZ_CONFIG_KEEP_IN_CACHE   "KeepInCache"
#define orxFONT_KZ_CONFIG_SDF   "SDF"
#define orxFONT_KZ_CONFIG_SHADER   "Shader"
#define orxFONT_KZ_CONFIG_TEXTURE_NAME   "Texture"
#define orxFONT_KZ_CONFIG_TEXTURE_ORIGIN   "TextureOrigin"
#define orxFONT_KZ_CONFIG_TEXTURE_SIZE   "TextureSize"
#define orxFONT_KZ_CONFIG_TYPEFACE   "Typeface"
#define orxFONT_KZ_DEFAULT_FONT_NAME   "orx:font:default"
#define orxFONT_KZ_DEFAULT_TEXTURE_NAME   "orx:texture:font:default"
#define orxFONT_KZ_RESOURCE_GROUP   "Font"
#define orxFONT_KZ_SDF_SHADER_NAME   "orx:shader:font:sdf"

Typedefs

typedef struct __orxFONT_t orxFONT

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxFont_ClearCache ()
orxDLLAPI orxFONT *orxFASTCALL orxFont_Create ()
orxDLLAPI orxFONT *orxFASTCALL orxFont_CreateFromConfig (const orxSTRING _zConfigID)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_Delete (orxFONT *_pstFont)
orxDLLAPI void orxFASTCALL orxFont_Exit ()
orxDLLAPI orxFONT *orxFASTCALL orxFont_Get (const orxSTRING _zName)
orxDLLAPI orxFLOAT orxFASTCALL orxFont_GetCharacterHeight (const orxFONT *_pstFont)
orxDLLAPI const orxSTRING orxFASTCALL orxFont_GetCharacterList (const orxFONT *_pstFont)
orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetCharacterSpacing (const orxFONT *_pstFont, orxVECTOR *_pvSpacing)
orxDLLAPI orxFLOAT orxFASTCALL orxFont_GetCharacterWidth (const orxFONT *_pstFont, orxU32 _u32CharacterCodePoint)
orxDLLAPI const orxCHARACTER_MAP *orxFASTCALL orxFont_GetMap (const orxFONT *_pstFont)
orxDLLAPI const orxSTRING orxFASTCALL orxFont_GetName (const orxFONT *_pstFont)
orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetOrigin (const orxFONT *_pstFont, orxVECTOR *_pvOrigin)
orxDLLAPI const orxSHADER *orxFASTCALL orxFont_GetShader (const orxFONT *_pstFont)
orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetSize (const orxFONT *_pstFont, orxVECTOR *_pvSize)
orxDLLAPI orxTEXTURE *orxFASTCALL orxFont_GetTexture (const orxFONT *_pstFont)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_Init ()
orxDLLAPI orxBOOL orxFASTCALL orxFont_IsSDF (const orxFONT *_pstFont)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterHeight (orxFONT *_pstFont, orxFLOAT _fCharacterHeight)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterList (orxFONT *_pstFont, const orxSTRING _zList)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterSpacing (orxFONT *_pstFont, const orxVECTOR *_pvSpacing)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterWidthList (orxFONT *_pstFont, orxU32 _u32CharacterNumber, const orxFLOAT *_afCharacterWidthList)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetOrigin (orxFONT *_pstFont, const orxVECTOR *_pvOrigin)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetShader (orxFONT *_pstFont, orxSHADER *_pstShader)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetShaderFromConfig (orxFONT *_pstFont, const orxSTRING _zShaderID)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetSize (orxFONT *_pstFont, const orxVECTOR *_pvSize)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetTexture (orxFONT *_pstFont, orxTEXTURE *_pstTexture)
orxDLLAPI void orxFASTCALL orxFont_Setup ()

Detailed Description

Font module Module that handles fonts

Macro Definition Documentation

◆ orxFONT_KZ_ANSI

#define orxFONT_KZ_ANSI   "ansi"

Definition at line 70 of file orxFont.h.

◆ orxFONT_KZ_ASCII

#define orxFONT_KZ_ASCII   "ascii"

Definition at line 69 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_CHARACTER_HEIGHT

#define orxFONT_KZ_CONFIG_CHARACTER_HEIGHT   "CharacterHeight"

Definition at line 58 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_CHARACTER_LIST

#define orxFONT_KZ_CONFIG_CHARACTER_LIST   "CharacterList"

Definition at line 56 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_CHARACTER_PADDING

#define orxFONT_KZ_CONFIG_CHARACTER_PADDING   "CharacterPadding"

Definition at line 61 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_CHARACTER_SIZE

#define orxFONT_KZ_CONFIG_CHARACTER_SIZE   "CharacterSize"

Definition at line 57 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_CHARACTER_SPACING

#define orxFONT_KZ_CONFIG_CHARACTER_SPACING   "CharacterSpacing"

Definition at line 60 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_CHARACTER_WIDTH_LIST

#define orxFONT_KZ_CONFIG_CHARACTER_WIDTH_LIST   "CharacterWidthList"

Definition at line 59 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_KEEP_IN_CACHE

#define orxFONT_KZ_CONFIG_KEEP_IN_CACHE   "KeepInCache"

Definition at line 64 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_SDF

#define orxFONT_KZ_CONFIG_SDF   "SDF"

Definition at line 66 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_SHADER

#define orxFONT_KZ_CONFIG_SHADER   "Shader"

Definition at line 67 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_TEXTURE_NAME

#define orxFONT_KZ_CONFIG_TEXTURE_NAME   "Texture"

Misc defines

Definition at line 55 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_TEXTURE_ORIGIN

#define orxFONT_KZ_CONFIG_TEXTURE_ORIGIN   "TextureOrigin"

Definition at line 62 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_TEXTURE_SIZE

#define orxFONT_KZ_CONFIG_TEXTURE_SIZE   "TextureSize"

Definition at line 63 of file orxFont.h.

◆ orxFONT_KZ_CONFIG_TYPEFACE

#define orxFONT_KZ_CONFIG_TYPEFACE   "Typeface"

Definition at line 65 of file orxFont.h.

◆ orxFONT_KZ_DEFAULT_FONT_NAME

#define orxFONT_KZ_DEFAULT_FONT_NAME   "orx:font:default"

Definition at line 72 of file orxFont.h.

◆ orxFONT_KZ_DEFAULT_TEXTURE_NAME

#define orxFONT_KZ_DEFAULT_TEXTURE_NAME   "orx:texture:font:default"

Definition at line 73 of file orxFont.h.

◆ orxFONT_KZ_RESOURCE_GROUP

#define orxFONT_KZ_RESOURCE_GROUP   "Font"

Definition at line 75 of file orxFont.h.

◆ orxFONT_KZ_SDF_SHADER_NAME

#define orxFONT_KZ_SDF_SHADER_NAME   "orx:shader:font:sdf"

Definition at line 74 of file orxFont.h.

Typedef Documentation

◆ orxFONT

typedef struct __orxFONT_t orxFONT

Internal font structure

Definition at line 79 of file orxFont.h.

Function Documentation

◆ orxFont_ClearCache()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_ClearCache ( )
extern

Clears cache (if any Font is still in active use, it'll remain in memory until not referenced anymore)

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_Create()

orxDLLAPI orxFONT *orxFASTCALL orxFont_Create ( )
extern

Creates an empty font

Returns
orxFONT / orxNULL

◆ orxFont_CreateFromConfig()

orxDLLAPI orxFONT *orxFASTCALL orxFont_CreateFromConfig ( const orxSTRING _zConfigID)
extern

Creates a font from config

Parameters
[in]_zConfigIDConfig ID
Returns
orxFONT / orxNULL

◆ orxFont_Delete()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_Delete ( orxFONT * _pstFont)
extern

Deletes a font

Parameters
[in]_pstFontConcerned font
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_Exit()

orxDLLAPI void orxFASTCALL orxFont_Exit ( )
extern

Exits from the font module

◆ orxFont_Get()

orxDLLAPI orxFONT *orxFASTCALL orxFont_Get ( const orxSTRING _zName)
extern

Gets font given its name

Parameters
[in]_zNameFont name
Returns
orxFONT / orxNULL

◆ orxFont_GetCharacterHeight()

orxDLLAPI orxFLOAT orxFASTCALL orxFont_GetCharacterHeight ( const orxFONT * _pstFont)
extern

Gets font's character height

Parameters
[in]_pstFontConcerned font
Returns
orxFLOAT

◆ orxFont_GetCharacterList()

orxDLLAPI const orxSTRING orxFASTCALL orxFont_GetCharacterList ( const orxFONT * _pstFont)
extern

Gets font's character list

Parameters
[in]_pstFontConcerned font
Returns
Font's character list / orxNULL

◆ orxFont_GetCharacterSpacing()

orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetCharacterSpacing ( const orxFONT * _pstFont,
orxVECTOR * _pvSpacing )
extern

Gets font's character spacing

Parameters
[in]_pstFontConcerned font
[out]_pvSpacingCharacter's spacing
Returns
orxVECTOR / orxNULL

◆ orxFont_GetCharacterWidth()

orxDLLAPI orxFLOAT orxFASTCALL orxFont_GetCharacterWidth ( const orxFONT * _pstFont,
orxU32 _u32CharacterCodePoint )
extern

Gets font's character width

Parameters
[in]_pstFontConcerned font
[in]_u32CharacterCodePointCharacter code point
Returns
orxFLOAT

◆ orxFont_GetMap()

orxDLLAPI const orxCHARACTER_MAP *orxFASTCALL orxFont_GetMap ( const orxFONT * _pstFont)
extern

Gets font's map

Parameters
[in]_pstFontConcerned font
Returns
orxCHARACTER_MAP / orxNULL

◆ orxFont_GetName()

orxDLLAPI const orxSTRING orxFASTCALL orxFont_GetName ( const orxFONT * _pstFont)
extern

Gets font name

Parameters
[in]_pstFontConcerned font
Returns
Font name / orxSTRING_EMPTY

◆ orxFont_GetOrigin()

orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetOrigin ( const orxFONT * _pstFont,
orxVECTOR * _pvOrigin )
extern

Gets font's origin

Parameters
[in]_pstFontConcerned font
[out]_pvOriginFont's origin
Returns
orxVECTOR / orxNULL

◆ orxFont_GetShader()

orxDLLAPI const orxSHADER *orxFASTCALL orxFont_GetShader ( const orxFONT * _pstFont)
extern

Gets font's shader

Parameters
[in]_pstFontConcerned font
Returns
orxSHADER / orxNULL

◆ orxFont_GetSize()

orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetSize ( const orxFONT * _pstFont,
orxVECTOR * _pvSize )
extern

Gets font's size

Parameters
[in]_pstFontConcerned font
[out]_pvSizeFont's size
Returns
orxVECTOR / orxNULL

◆ orxFont_GetTexture()

orxDLLAPI orxTEXTURE *orxFASTCALL orxFont_GetTexture ( const orxFONT * _pstFont)
extern

Gets font's texture

Parameters
[in]_pstFontConcerned font
Returns
Font texture / orxNULL

◆ orxFont_Init()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_Init ( )
extern

Inits the font module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_IsSDF()

orxDLLAPI orxBOOL orxFASTCALL orxFont_IsSDF ( const orxFONT * _pstFont)
extern

Is Font SDF?

Parameters
[in]_pstFontConcerned font
Returns
orxTRUE / orxFALSE

◆ orxFont_SetCharacterHeight()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterHeight ( orxFONT * _pstFont,
orxFLOAT _fCharacterHeight )
extern

Sets font's character height

Parameters
[in]_pstFontConcerned font
[in]_fCharacterHeightCharacter's height
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_SetCharacterList()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterList ( orxFONT * _pstFont,
const orxSTRING _zList )
extern

Sets font's character list

Parameters
[in]_pstFontConcerned font
[in]_zListCharacter list
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_SetCharacterSpacing()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterSpacing ( orxFONT * _pstFont,
const orxVECTOR * _pvSpacing )
extern

Sets font's character spacing

Parameters
[in]_pstFontConcerned font
[in]_pvSpacingCharacter's spacing
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_SetCharacterWidthList()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterWidthList ( orxFONT * _pstFont,
orxU32 _u32CharacterNumber,
const orxFLOAT * _afCharacterWidthList )
extern

Sets font's character width list

Parameters
[in]_pstFontConcerned font
[in]_u32CharacterNumberCharacter's number
[in]_afCharacterWidthListList of widths for all the characters
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_SetOrigin()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetOrigin ( orxFONT * _pstFont,
const orxVECTOR * _pvOrigin )
extern

Sets font's origin

Parameters
[in]_pstFontConcerned font
[in]_pvOriginFont's origin
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_SetShader()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetShader ( orxFONT * _pstFont,
orxSHADER * _pstShader )
extern

Sets font's shader

Parameters
[in]_pstFontConcerned font
[in]_pstShaderShader to set, orxNULL to remove the current one
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_SetShaderFromConfig()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetShaderFromConfig ( orxFONT * _pstFont,
const orxSTRING _zShaderID )
extern

Sets font's shader from config

Parameters
[in]_pstFontConcerned font
[in]_zShaderIDConfig ID of the shader to set, orxNULL to remove the current one
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_SetSize()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetSize ( orxFONT * _pstFont,
const orxVECTOR * _pvSize )
extern

Sets font's size

Parameters
[in]_pstFontConcerned font
[in]_pvSizeFont's size
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_SetTexture()

orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetTexture ( orxFONT * _pstFont,
orxTEXTURE * _pstTexture )
extern

Sets font's texture

Parameters
[in]_pstFontConcerned font
[in]_pstTextureTexture to set
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxFont_Setup()

orxDLLAPI void orxFASTCALL orxFont_Setup ( )
extern

Setups the font module


Generated for orx by doxygen 1.8.11