Bitmap font class Uses an input Image file with the atlas of characters, and an XML file with the configuration in AngelCode .fnt format (compatible with AngelCode BMFont, ShoeBox, Hiero, etc). Credits for some parts of the code: http://www.angelcode.com/.
More...
|
void | GetTextVertices (string pText, Vector3 pTextPosition, Vector3 axisX, Vector3 axisY, float pTextHeightWorldCoords, out Vector3[] verts, out Vector2[] texCoords) |
| Builds the 3D vertices and texture coords needed to draw text in 2D, using a BitmapFont.
|
|
void | GetTextVertices (string pText, Vector2 pTextPosition, Vector2 pAxisX, Vector2 pAxisY, float pTextHeightWorldCoords, out Vector2[] verts, out Vector2[] texCoords, bool pRightAlign=false) |
| Builds the 2D vertices and texture coords needed to draw text in 2D, using a BitmapFont.
|
|
|
Texture2D | mFontImage |
|
int | FontSizeToPixelsOffset = 2 |
| FontSizes differ slightly from pixel sizes, this parameter allows to adjust this offset. A value of 2 means that a fontSize of 18 will be treated internally as 20.
|
|
Bitmap font class Uses an input Image file with the atlas of characters, and an XML file with the configuration in AngelCode .fnt format (compatible with AngelCode BMFont, ShoeBox, Hiero, etc). Credits for some parts of the code: http://www.angelcode.com/.
◆ FromXml()
static BitmapFont GraphicDNA.BitmapFont.FromXml |
( |
TextAsset |
pFontConfigXmlFile, |
|
|
Texture2D |
pFontImage |
|
) |
| |
|
inlinestatic |
- Parameters
-
pFontConfigXmlFile | |
pFontImage | |
- Returns
◆ GetTextVertices() [1/2]
void GraphicDNA.BitmapFont.GetTextVertices |
( |
string |
pText, |
|
|
Vector2 |
pTextPosition, |
|
|
Vector2 |
pAxisX, |
|
|
Vector2 |
pAxisY, |
|
|
float |
pTextHeightWorldCoords, |
|
|
out Vector2[] |
verts, |
|
|
out Vector2[] |
texCoords, |
|
|
bool |
pRightAlign = false |
|
) |
| |
|
inline |
Builds the 2D vertices and texture coords needed to draw text in 2D, using a BitmapFont.
- Parameters
-
pText | Text to be drawn |
pos | Position of the lower left corner of the text, in 2D |
pAxisX | Right Axis of the text |
pAxisY | Up Axis of the text |
pTextHeightWorldCoords | Text height in world coords |
verts | |
texCoords | |
◆ GetTextVertices() [2/2]
void GraphicDNA.BitmapFont.GetTextVertices |
( |
string |
pText, |
|
|
Vector3 |
pTextPosition, |
|
|
Vector3 |
axisX, |
|
|
Vector3 |
axisY, |
|
|
float |
pTextHeightWorldCoords, |
|
|
out Vector3[] |
verts, |
|
|
out Vector2[] |
texCoords |
|
) |
| |
|
inline |
Builds the 3D vertices and texture coords needed to draw text in 2D, using a BitmapFont.
- Parameters
-
pText | Text to be drawn |
pos | Position of the lower left corner of the text, in 2D |
axisX | Right Axis of the text |
axisY | Up Axis of the text |
pTextHeightWorldCoords | Text height in world coords |
verts | |
texCoords | |
The documentation for this class was generated from the following file:
- C:/Transhuman/S2/Assets/Plugins/GraphicDNA_2DShaperLibrary/Scripts/BitmapFont.cs