There is no spoon

UE3:Font (UT3)

From Unreal Wiki, The Unreal Engine Documentation Site
(Redirected from UE3:FontCharacter (UT3))
Jump to: navigation, search
UT3 Object >> Font
Package: 
Engine
Direct subclass:
MultiFont
This class in other games:
UT, RTNP, U1, U2XMP, U2, UE2Runtime, UT2004, UDK

Copyright 1998-2007 Epic Games, Inc.

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
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

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

Parameters:

  • HeightTest - the height (in pixels) of the viewport being rendered to; if not specified

Returns:

the height (in pixels) of the tallest 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.