TMPFont
Namespace:FairyGUI
Source:Assets/Scripts/Extensions/TextMeshPro/TMPFont.cs (line 15)
public class TMPFont : BaseFont
Compilation conditions:
FAIRYGUI_TMPRO
TextMeshPro text adapter for FairyGUI. Most of codes were taken from TextMeshPro! Note that not all of TextMeshPro features are supported.
Inheritance:BaseFont → TMPFont
Inherited members
SupOffset, SupScale, canTint, customBoldAndItalic, customBold, customOutline, keepCrisp, mainTexture, name, shader, textRebuildFlag, version, PrepareCharacters
Constructors
TMPFont()
public TMPFont();
Source:Extensions/TextMeshPro/TMPFont.cs (line 45)
Fields
_fontAsset
protected TMP_FontAsset _fontAsset;
Source:Extensions/TextMeshPro/TMPFont.cs (line 17)
Methods
BuildGraphics(NGraphics)
public override bool BuildGraphics(NGraphics graphics);
| Parameter | Type | Description |
|---|---|---|
graphics | NGraphics |
Source:Extensions/TextMeshPro/TMPFont.cs (line 116)
Dispose()
override public void Dispose();
Source:Extensions/TextMeshPro/TMPFont.cs (line 57)
DrawGlyph(VertexBuffer, float, float)
override public void DrawGlyph(VertexBuffer vb, float x, float y);
| Parameter | Type | Description |
|---|---|---|
vb | VertexBuffer | |
x | float | |
y | float |
Source:Extensions/TextMeshPro/TMPFont.cs (line 442)
DrawLine(VertexBuffer, float, float, float, int, int)
override public void DrawLine(VertexBuffer vb, float x, float y, float width, int fontSize, int type);
| Parameter | Type | Description |
|---|---|---|
vb | VertexBuffer | |
x | float | |
y | float | |
width | float | |
fontSize | int | |
type | int |
Source:Extensions/TextMeshPro/TMPFont.cs (line 523)
GetGlyph(char, float, float, float)
override public bool GetGlyph(char ch, out float width, out float height, out float baseline);
| Parameter | Type | Description |
|---|---|---|
ch | char | |
width | float | |
height | float | |
baseline | float |
Source:Extensions/TextMeshPro/TMPFont.cs (line 330)
GetLineHeight(int)
override public int GetLineHeight(int size);
| Parameter | Type | Description |
|---|---|---|
size | int |
Source:Extensions/TextMeshPro/TMPFont.cs (line 694)
HasCharacter(char)
override public bool HasCharacter(char ch);
| Parameter | Type | Description |
|---|---|---|
ch | char |
Source:Extensions/TextMeshPro/TMPFont.cs (line 689)
Prepare(TextFormat)
public override void Prepare(TextFormat format);
| Parameter | Type | Description |
|---|---|---|
format | TextFormat |
Source:Extensions/TextMeshPro/TMPFont.cs (line 109)
SetFormat(TextFormat, float)
override public void SetFormat(TextFormat format, float fontSizeScale);
| Parameter | Type | Description |
|---|---|---|
format | TextFormat | |
fontSizeScale | float |
Source:Extensions/TextMeshPro/TMPFont.cs (line 301)
StartDraw(NGraphics)
override public void StartDraw(NGraphics graphics);
| Parameter | Type | Description |
|---|---|---|
graphics | NGraphics |
Source:Extensions/TextMeshPro/TMPFont.cs (line 252)
Properties
fontAsset
public TMP_FontAsset fontAsset { get; set; }
Source:Extensions/TextMeshPro/TMPFont.cs (line 62)
fontWeight
public FontWeight fontWeight { get; set; }
Source:Extensions/TextMeshPro/TMPFont.cs (line 72)