UIFont contains everything needed to be able to print text.
More...
|
BMFont | bmFont [get, set] |
| Access to the BMFont class directly. More...
|
|
int | texWidth [get, set] |
| Original width of the font's texture in pixels. More...
|
|
int | texHeight [get, set] |
| Original height of the font's texture in pixels. More...
|
|
bool | hasSymbols [get] |
| Whether the font has any symbols defined. More...
|
|
List< BMSymbol > | symbols [get] |
| List of symbols within the font. More...
|
|
UIAtlas | atlas [get, set] |
| Atlas used by the font, if any. More...
|
|
Material | material [get, set] |
| Get or set the material used by this font. More...
|
|
bool | premultipliedAlpha [get] |
| Whether the font is using a premultiplied alpha material. More...
|
|
bool | premultipliedAlphaShader [get] |
| Whether the font is using a premultiplied alpha material. More...
|
|
bool | packedFontShader [get] |
| Whether the font is a packed font. More...
|
|
Texture2D | texture [get] |
| Convenience function that returns the texture used by the font. More...
|
|
Rect | uvRect [get, set] |
| Offset and scale applied to all UV coordinates. More...
|
|
string | spriteName [get, set] |
| Sprite used by the font, if any. More...
|
|
bool | isValid [get] |
| Whether this is a valid font. More...
|
|
int | size [get, set] |
|
int | defaultSize [get, set] |
| Pixel-perfect size of this font. More...
|
|
UISpriteData | sprite [get] |
| Retrieves the sprite used by the font, if any. More...
|
|
UIFont | replacement [get, set] |
| Setting a replacement atlas value will cause everything using this font to use the replacement font instead. Suggested use: set up all your widgets to use a dummy font that points to the real font. Switching that font to another one (for example an eastern language one) is then a simple matter of setting this field on your dummy font. More...
|
|
bool | isDynamic [get] |
| Whether the font is dynamic. More...
|
|
Font | dynamicFont [get, set] |
| Get or set the dynamic font source. More...
|
|
FontStyle | dynamicFontStyle [get, set] |
| Get or set the dynamic font's style. More...
|
|
UIFont contains everything needed to be able to print text.
void UIFont.AddSymbol |
( |
string |
sequence, |
|
|
string |
spriteName |
|
) |
| |
Add a new symbol to the font.
Helper function that determines whether the two atlases are related.
void UIFont.MarkAsChanged |
( |
| ) |
|
Refresh all labels that use this font.
BMSymbol UIFont.MatchSymbol |
( |
string |
text, |
|
|
int |
offset, |
|
|
int |
textLength |
|
) |
| |
Retrieve the symbol at the beginning of the specified sequence, if a match is found.
void UIFont.RemoveSymbol |
( |
string |
sequence | ) |
|
Remove the specified symbol from the font.
void UIFont.RenameSymbol |
( |
string |
before, |
|
|
string |
after |
|
) |
| |
Change an existing symbol's sequence to the specified value.
void UIFont.UpdateUVRect |
( |
| ) |
|
Forcefully update the font's sprite reference.
bool UIFont.UsesSprite |
( |
string |
s | ) |
|
Whether the specified sprite is being used by the font.
Atlas used by the font, if any.
Access to the BMFont class directly.
Pixel-perfect size of this font.
Get or set the dynamic font source.
FontStyle UIFont.dynamicFontStyle |
|
getset |
Get or set the dynamic font's style.
Whether the font has any symbols defined.
Whether the font is dynamic.
Whether this is a valid font.
Get or set the material used by this font.
bool UIFont.packedFontShader |
|
get |
Whether the font is a packed font.
bool UIFont.premultipliedAlpha |
|
get |
Whether the font is using a premultiplied alpha material.
bool UIFont.premultipliedAlphaShader |
|
get |
Whether the font is using a premultiplied alpha material.
Setting a replacement atlas value will cause everything using this font to use the replacement font instead. Suggested use: set up all your widgets to use a dummy font that points to the real font. Switching that font to another one (for example an eastern language one) is then a simple matter of setting this field on your dummy font.
Retrieves the sprite used by the font, if any.
Sprite used by the font, if any.
List of symbols within the font.
Original height of the font's texture in pixels.
Convenience function that returns the texture used by the font.
Original width of the font's texture in pixels.
Offset and scale applied to all UV coordinates.
The documentation for this class was generated from the following file:
- D:/Projects/NGUI/Assets/NGUI/Scripts/UI/UIFont.cs