TorqueScript Reference
FontAsset Class Reference

#include <FontAsset_ScriptBinding.h>

Inherits AssetBase.

Public Member Functions

Integer getBaseline ()
String getFontFile ()
Integer getFontSize ()
Integer getGlyphCount ()
Integer getLineHeight ()
Integer getLoadedPageCount ()
Integer getPageCount ()
String getPageFile (int pageIndex)
Integer getPageHeight (int pageIndex)
Integer getPageWidth (int pageIndex)
String getRelativeFontFile ()
void setFontFile (FontFile)
Public Member Functions inherited from AssetBase
Integer createStateSnapshot ()
String getAssetId ()
Boolean isAssetDirty ()
void refreshAsset ()
Boolean restoreStateSnapshot (snapshot)
Boolean revertAsset ()
Boolean saveAsset ()
Public Member Functions inherited from SimObject
void assignFieldsFrom (SimObject)
Integer clone ([copyDynamicFields=false]?)
Integer deepClone ()
void delete ()
Integer getId ()
void setName (newName)
String getName ()
String getClassNamespace ()
String getSuperClassNamespace ()
void setClassNamespace (nameSpace)
void setSuperClassNamespace ()
Boolean isMethod (string methodName)
String call (methodName, [args] *)
void dumpClassHierarchy ()
void dump ()
Boolean isMemberOfClass (string classname)
String getClassName ()
String getFieldValue (fieldName)
Boolean setFieldValue (fieldName, value)
Boolean setEditFieldValue (fieldName, value)
Integer getDynamicFieldCount ()
String getDynamicField (index)
Integer getFieldCount ()
String getField (int index)
void setProgenitorFile (file)
String getProgenitorFile ()
Integer getType ()
String getFieldType (fieldName)
void setInternalName (string InternalName)
String getInternalName ()
Boolean isChildOfGroup (groupID)
Integer getGroup ()
Boolean startTimer (callbackFunction, float timePeriod, [repeat]?)
void stopTimer ()
Boolean isTimerActive ()
Integer schedule (time, command, [arg] *)
void startListening (SimObject)
void stopListening (SimObject)
void addListener (SimObject)
void removeListener (SimObject)
void removeAllListeners ()
void postEvent (String eventName, String data)
Boolean save (fileName, [selectedOnly]?)
void addFieldFilter (fieldName)
void removeFieldFilter (fieldName)

Member Function Documentation

◆ getBaseline()

Integer getBaseline ( )

Gets the distance from the top of a line to the baseline, in pixels.

Returns
Returns the baseline.

◆ getFontFile()

String getFontFile ( )

Gets the Font file.

Returns
Returns the Font file.

◆ getFontSize()

Integer getFontSize ( )

Gets the size the font was generated at, in pixels.

Returns
Returns the native font size.

◆ getGlyphCount()

Integer getGlyphCount ( )

Gets the number of glyphs the font holds.

Returns
Returns the glyph count, or zero if the font did not load.

◆ getLineHeight()

Integer getLineHeight ( )

Gets the distance between baselines, in pixels.

Returns
Returns the line height.

◆ getLoadedPageCount()

Integer getLoadedPageCount ( )

Gets the number of declared pages whose image actually loaded. Fewer than getPageCount() means a page image named inside the .fnt file is missing.

Returns
Returns the loaded page count.

◆ getPageCount()

Integer getPageCount ( )

Gets the number of texture pages the font declares.

Returns
Returns the page count.

◆ getPageFile()

String getPageFile ( int pageIndex)

Gets the image file for a page, as named inside the .fnt file.

Parameters
pageIndexThe zero-based page index.
Returns
Returns the page image file, or an empty string if there is no such page.

◆ getPageHeight()

Integer getPageHeight ( int pageIndex)

Gets the height of a page's loaded texture, in pixels.

Parameters
pageIndexThe zero-based page index.
Returns
Returns the page height, or zero if the page did not load.

◆ getPageWidth()

Integer getPageWidth ( int pageIndex)

Gets the width of a page's loaded texture, in pixels.

Parameters
pageIndexThe zero-based page index.
Returns
Returns the page width, or zero if the page did not load.

◆ getRelativeFontFile()

String getRelativeFontFile ( )

Gets the Font file as a path relative to the asset file.

Returns
Returns the Font file relative to the asset file.

◆ setFontFile()

void setFontFile ( FontFile )

Sets the Font file.

Returns
No return value.