orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
orxFont.h
Go to the documentation of this file.
1/* Orx - Portable Game Engine
2 *
3 * Copyright (c) 2008- Orx-Project
4 *
5 * This software is provided 'as-is', without any express or implied
6 * warranty. In no event will the authors be held liable for any damages
7 * arising from the use of this software.
8 *
9 * Permission is granted to anyone to use this software for any purpose,
10 * including commercial applications, and to alter it and redistribute it
11 * freely, subject to the following restrictions:
12 *
13 * 1. The origin of this software must not be misrepresented; you must not
14 * claim that you wrote the original software. If you use this software
15 * in a product, an acknowledgment in the product documentation would be
16 * appreciated but is not required.
17 *
18 * 2. Altered source versions must be plainly marked as such, and must not be
19 * misrepresented as being the original software.
20 *
21 * 3. This notice may not be removed or altered from any source
22 * distribution.
23 */
24
32
41
42
43#ifndef _orxFONT_H_
44#define _orxFONT_H_
45
46#include "orxInclude.h"
47
48#include "display/orxTexture.h"
49#include "math/orxVector.h"
50#include "render/orxShader.h"
51
52
55#define orxFONT_KZ_CONFIG_TEXTURE_NAME "Texture"
56#define orxFONT_KZ_CONFIG_CHARACTER_LIST "CharacterList"
57#define orxFONT_KZ_CONFIG_CHARACTER_SIZE "CharacterSize"
58#define orxFONT_KZ_CONFIG_CHARACTER_HEIGHT "CharacterHeight"
59#define orxFONT_KZ_CONFIG_CHARACTER_WIDTH_LIST "CharacterWidthList"
60#define orxFONT_KZ_CONFIG_CHARACTER_SPACING "CharacterSpacing"
61#define orxFONT_KZ_CONFIG_CHARACTER_PADDING "CharacterPadding"
62#define orxFONT_KZ_CONFIG_TEXTURE_ORIGIN "TextureOrigin"
63#define orxFONT_KZ_CONFIG_TEXTURE_SIZE "TextureSize"
64#define orxFONT_KZ_CONFIG_KEEP_IN_CACHE "KeepInCache"
65#define orxFONT_KZ_CONFIG_TYPEFACE "Typeface"
66#define orxFONT_KZ_CONFIG_SDF "SDF"
67#define orxFONT_KZ_CONFIG_SHADER "Shader"
68
69#define orxFONT_KZ_ASCII "ascii"
70#define orxFONT_KZ_ANSI "ansi"
71
72#define orxFONT_KZ_DEFAULT_FONT_NAME "orx:font:default"
73#define orxFONT_KZ_DEFAULT_TEXTURE_NAME "orx:texture:font:default"
74#define orxFONT_KZ_SDF_SHADER_NAME "orx:shader:font:sdf"
75#define orxFONT_KZ_RESOURCE_GROUP "Font"
76
77
79typedef struct __orxFONT_t orxFONT;
80
81
84extern orxDLLAPI void orxFASTCALL orxFont_Setup();
85
89extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_Init();
90
93extern orxDLLAPI void orxFASTCALL orxFont_Exit();
94
95
99extern orxDLLAPI orxFONT *orxFASTCALL orxFont_Create();
100
105extern orxDLLAPI orxFONT *orxFASTCALL orxFont_CreateFromConfig(const orxSTRING _zConfigID);
106
111extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_Delete(orxFONT *_pstFont);
112
117
118
124extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetTexture(orxFONT *_pstFont, orxTEXTURE *_pstTexture);
125
131extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterList(orxFONT *_pstFont, const orxSTRING _zList);
132
138extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterHeight(orxFONT *_pstFont, orxFLOAT _fCharacterHeight);
139
146extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterWidthList(orxFONT *_pstFont, orxU32 _u32CharacterNumber, const orxFLOAT *_afCharacterWidthList);
147
153extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterSpacing(orxFONT *_pstFont, const orxVECTOR *_pvSpacing);
154
160extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetOrigin(orxFONT *_pstFont, const orxVECTOR *_pvOrigin);
161
167extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetSize(orxFONT *_pstFont, const orxVECTOR *_pvSize);
168
174extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetShader(orxFONT *_pstFont, orxSHADER *_pstShader);
175
181extern orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetShaderFromConfig(orxFONT *_pstFont, const orxSTRING _zShaderID);
182
183
188extern orxDLLAPI orxTEXTURE *orxFASTCALL orxFont_GetTexture(const orxFONT *_pstFont);
189
194extern orxDLLAPI const orxSTRING orxFASTCALL orxFont_GetCharacterList(const orxFONT *_pstFont);
195
200extern orxDLLAPI orxFLOAT orxFASTCALL orxFont_GetCharacterHeight(const orxFONT *_pstFont);
201
207extern orxDLLAPI orxFLOAT orxFASTCALL orxFont_GetCharacterWidth(const orxFONT *_pstFont, orxU32 _u32CharacterCodePoint);
208
214extern orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetCharacterSpacing(const orxFONT *_pstFont, orxVECTOR *_pvSpacing);
215
221extern orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetOrigin(const orxFONT *_pstFont, orxVECTOR *_pvOrigin);
222
228extern orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetSize(const orxFONT *_pstFont, orxVECTOR *_pvSize);
229
234extern orxDLLAPI const orxSHADER *orxFASTCALL orxFont_GetShader(const orxFONT *_pstFont);
235
240extern orxDLLAPI orxBOOL orxFASTCALL orxFont_IsSDF(const orxFONT *_pstFont);
241
242
247extern orxDLLAPI const orxCHARACTER_MAP *orxFASTCALL orxFont_GetMap(const orxFONT *_pstFont);
248
249
254extern orxDLLAPI orxFONT *orxFASTCALL orxFont_Get(const orxSTRING _zName);
255
260extern orxDLLAPI const orxSTRING orxFASTCALL orxFont_GetName(const orxFONT *_pstFont);
261
262#endif /* _orxFONT_H_ */
263
#define orxDLLAPI
Definition orxDecl.h:381
orxDLLAPI const orxSTRING orxFASTCALL orxFont_GetCharacterList(const orxFONT *_pstFont)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterSpacing(orxFONT *_pstFont, const orxVECTOR *_pvSpacing)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetSize(orxFONT *_pstFont, const orxVECTOR *_pvSize)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetShader(orxFONT *_pstFont, orxSHADER *_pstShader)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterHeight(orxFONT *_pstFont, orxFLOAT _fCharacterHeight)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetOrigin(orxFONT *_pstFont, const orxVECTOR *_pvOrigin)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_Delete(orxFONT *_pstFont)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetTexture(orxFONT *_pstFont, orxTEXTURE *_pstTexture)
orxDLLAPI orxFONT *orxFASTCALL orxFont_Get(const orxSTRING _zName)
orxDLLAPI orxFLOAT orxFASTCALL orxFont_GetCharacterHeight(const orxFONT *_pstFont)
orxDLLAPI void orxFASTCALL orxFont_Exit()
orxDLLAPI void orxFASTCALL orxFont_Setup()
orxDLLAPI orxTEXTURE *orxFASTCALL orxFont_GetTexture(const orxFONT *_pstFont)
orxDLLAPI orxFLOAT orxFASTCALL orxFont_GetCharacterWidth(const orxFONT *_pstFont, orxU32 _u32CharacterCodePoint)
orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetSize(const orxFONT *_pstFont, orxVECTOR *_pvSize)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetShaderFromConfig(orxFONT *_pstFont, const orxSTRING _zShaderID)
orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetCharacterSpacing(const orxFONT *_pstFont, orxVECTOR *_pvSpacing)
orxDLLAPI orxFONT *orxFASTCALL orxFont_CreateFromConfig(const orxSTRING _zConfigID)
orxDLLAPI orxFONT *orxFASTCALL orxFont_Create()
orxDLLAPI orxBOOL orxFASTCALL orxFont_IsSDF(const orxFONT *_pstFont)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_Init()
orxDLLAPI orxVECTOR *orxFASTCALL orxFont_GetOrigin(const orxFONT *_pstFont, orxVECTOR *_pvOrigin)
orxDLLAPI const orxCHARACTER_MAP *orxFASTCALL orxFont_GetMap(const orxFONT *_pstFont)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_ClearCache()
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterList(orxFONT *_pstFont, const orxSTRING _zList)
orxDLLAPI orxSTATUS orxFASTCALL orxFont_SetCharacterWidthList(orxFONT *_pstFont, orxU32 _u32CharacterNumber, const orxFLOAT *_afCharacterWidthList)
orxDLLAPI const orxSTRING orxFASTCALL orxFont_GetName(const orxFONT *_pstFont)
orxDLLAPI const orxSHADER *orxFASTCALL orxFont_GetShader(const orxFONT *_pstFont)
#define orxSHADER(STRUCTURE)
#define orxFONT(STRUCTURE)
#define orxTEXTURE(STRUCTURE)
orxSTATUS
Definition orxType.h:270

Generated for orx by doxygen 1.8.11