I'm a doctor, not a mechanic

UE3:Font (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 05:39, 17 January 2010 by Wormbo (Talk | contribs) (1 revision: class descriptions for UDK January update (part 2))

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UDK Object >> Font
Package: 
Engine
Direct subclass:
MultiFont
This class in other games:
UT, RTNP, U1, U2XMP, U2, UE2Runtime, UT2004, UT3

A font object, containing information about a set of glyphs. The glyph bitmaps are stored in the contained textures, while the font database only contains the coordinates of the individual glyph.

Constants[edit]

NULLCHARACTER[edit]

Value: 127


Properties[edit]

Property group 'Font'[edit]

Characters[edit]

Type: array<FontCharacter>

Modifiers: editinline

List of characters in the font. For a MultiFont, this will include all characters in all sub-fonts! Thus, the number of characters in this array isn't necessary the number of characters available in the font

ImportOptions[edit]

Type: FontImportOptions.FontImportOptionsData

Options used when importing this font

Default value:

Member Value
bEnableAntialiasing True
bIncludeASCIIRange True
DistanceFieldScaleFactor 16
FontName "Arial"
ForegroundColor
Member Value
A 1.0
B 1.0
G 1.0
R 1.0
Height 16.0
TexturePageMaxHeight 256
TexturePageWidth 256
XPadding 1
YPadding 1

Kerning[edit]

Type: int

Default horizontal spacing between characters when rendering text with this font

Internal variables[edit]

CharRemap[edit]

Type: Map{WORD,WORD}

Modifiers: private, const, native

When IsRemapped is true, this array maps unicode values to entries in the Characters array

IsRemapped[edit]

Type: int

True if font is 'remapped'. That is, the character array is not a direct mapping to unicode values. Instead, all characters are indexed indirectly through the CharRemap array

MaxCharHeight[edit]

Type: array<int>

Modifiers: transient

The maximum height of a character in this font. For multi-fonts, this array will contain a maximum character height for each multi-font, otherwise the array will contain only a single element. This is cached at load-time or creation time, and is never serialized.

NumCharacters[edit]

Type: int

Modifiers: transient

Number of characters in the font, not including multiple instances of the same character (for multi-fonts). This is cached at load-time or creation time, and is never serialized.

Textures[edit]

Type: array<Texture2D>

Textures that store this font's glyph image data

Structs[edit]

FontCharacter[edit]

Modifiers: immutable, native

this struct is serialized using binary serialization so any changes to it require a package version bump

int StartU 
int StartV 
int USize 
int VSize 
byte TextureIndex 
int VerticalOffset 

Native functions[edit]

GetAuthoredViewportHeight[edit]

native final function virtual float GetAuthoredViewportHeight (float ViewportHeight) const

Determine the height of the mutli-font resolution page which will be used for the specified resolution.

Parameters:

  • ViewportHeight - the height (in pixels) of the viewport being rendered to.

GetMaxCharHeight[edit]

native function float GetMaxCharHeight () const

Returns the maximum height for any character in this font

GetResolutionPageIndex[edit]

native function int GetResolutionPageIndex (float HeightTest) const

Calulate the index for the texture page containing the multi-font character set to use, based on the specified screen resolution.

Parameters:

  • HeightTest - the height (in pixels) of the viewport being rendered to.

Returns:

the index of the multi-font "subfont" that most closely matches the specified resolution. this value is used as the value for "ResolutionPageIndex" when calling other font-related methods.

GetScalingFactor[edit]

native function float GetScalingFactor (float HeightTest) const

Calculate the amount of scaling necessary to match the multi-font subfont which most closely matches the specified resolution.

Parameters:

  • HeightTest - the height (in pixels) of the viewport being rendered to.

Returns:

the percentage scale required to match the size of the multi-font's closest matching subfont.