BaseFont
命名空间:FairyGUI
源码:Assets/Scripts/Core/Text/BaseFont.cs (行 10)
public class BaseFont
Base class for all kind of fonts.
字段
SupOffset
protected const float SupOffset = 0.33f;
源码:Core/Text/BaseFont.cs (行 60)
SupScale
protected const float SupScale = 0.58f;
源码:Core/Text/BaseFont.cs (行 59)
canTint
public bool canTint;
Can this font be tinted? Will be true for dynamic font and fonts generated by BMFont.
源码:Core/Text/BaseFont.cs (行 25)
customBold
public bool customBold;
If true, it will use extra vertices to enhance bold effect
源码:Core/Text/BaseFont.cs (行 30)
customBoldAndItalic
public bool customBoldAndItalic;
If true, it will use extra vertices to enhance bold effect ONLY when it is in italic style.
源码:Core/Text/BaseFont.cs (行 35)
customOutline
public bool customOutline;
If true, it will use extra vertices(4 direction) to enhance outline effect
源码:Core/Text/BaseFont.cs (行 40)
keepCrisp
public bool keepCrisp;
Keep text crisp.
源码:Core/Text/BaseFont.cs (行 50)
mainTexture
public NTexture mainTexture;
The texture of this font object.
源码:Core/Text/BaseFont.cs (行 20)
name
public string name;
The name of this font object.
源码:Core/Text/BaseFont.cs (行 15)
shader
public string shader;
The shader for this font object.
源码:Core/Text/BaseFont.cs (行 45)
textRebuildFlag
protected internal static bool textRebuildFlag;
源码:Core/Text/BaseFont.cs (行 57)
version
public int version;
源码:Core/Text/BaseFont.cs (行 55)
方法
BuildGraphics(NGraphics)
virtual public bool BuildGraphics(NGraphics graphics);
| 参数 | 类型 | 说明 |
|---|---|---|
graphics | NGraphics |
源码:Core/Text/BaseFont.cs (行 74)
Dispose()
virtual public void Dispose();
源码:Core/Text/BaseFont.cs (行 109)
DrawGlyph(VertexBuffer, float, float)
virtual public void DrawGlyph(VertexBuffer vb, float x, float y2);
| 参数 | 类型 | 说明 |
|---|---|---|
vb | VertexBuffer | |
x | float | |
y2 | float |
源码:Core/Text/BaseFont.cs (行 91)
DrawLine(VertexBuffer, float, float, float, int, int)
virtual public void DrawLine(VertexBuffer vb, float x, float y, float width, int fontSize, int type);
| 参数 | 类型 | 说明 |
|---|---|---|
vb | VertexBuffer | |
x | float | |
y | float | |
width | float | |
fontSize | int | |
type | int |
源码:Core/Text/BaseFont.cs (行 95)
GetGlyph(char, float, float, float)
virtual public bool GetGlyph(char ch, out float width, out float height, out float baseline);
| 参数 | 类型 | 说明 |
|---|---|---|
ch | char | |
width | float | |
height | float | |
baseline | float |
源码:Core/Text/BaseFont.cs (行 83)
GetLineHeight(int)
virtual public int GetLineHeight(int size);
| 参数 | 类型 | 说明 |
|---|---|---|
size | int |
源码:Core/Text/BaseFont.cs (行 104)
HasCharacter(char)
virtual public bool HasCharacter(char ch);
| 参数 | 类型 | 说明 |
|---|---|---|
ch | char |
源码:Core/Text/BaseFont.cs (行 99)
Prepare(TextFormat)
virtual public void Prepare(TextFormat format);
| 参数 | 类型 | 说明 |
|---|---|---|
format | TextFormat |
源码:Core/Text/BaseFont.cs (行 70)
PrepareCharacters(string, TextFormat, float)
virtual public void PrepareCharacters(string text, TextFormat format, float fontSizeScale);
| 参数 | 类型 | 说明 |
|---|---|---|
text | string | |
format | TextFormat | |
fontSizeScale | float |
源码:Core/Text/BaseFont.cs (行 66)
SetFormat(TextFormat, float)
virtual public void SetFormat(TextFormat format, float fontSizeScale);
| 参数 | 类型 | 说明 |
|---|---|---|
format | TextFormat | |
fontSizeScale | float |
源码:Core/Text/BaseFont.cs (行 62)
StartDraw(NGraphics)
virtual public void StartDraw(NGraphics graphics);
| 参数 | 类型 | 说明 |
|---|---|---|
graphics | NGraphics |
源码:Core/Text/BaseFont.cs (行 79)