API Frame CreateFontString

Constructs a new as a child of a frame. fontString = Frame:CreateFontString([name, layer, inheritsFrom, subLayer])

Arguments

 * name : - The name for a global variable that points to the newly created font string. If nil, the texture is anonymous and no global variable will be created.
 * layer : - The layer the font should be drawn in, e.g. "ARTWORK"; while technically optional, the string cannot appear until this is set.
 * inheritsFrom : - The name of a virtual template previously defined with ; if nil, the font string does not inherit any properties.
 * subLayer : - The z-axis subdivision (-7 to +7) of the layer; if nil, defaults to 0.

Returns

 * fontString : - Reference to the newly constructed object.

Example
The following code displays "Hello, World!" in the center of the screen: local f = CreateFrame("Frame", nil, UIParent) f:SetWidth(1) f:SetHeight(1) f:SetPoint("CENTER", 0, 0) local t = f:CreateFontString(f, "OVERLAY", "GameTooltipText") t:SetPoint("CENTER", 0, 0) t:SetText("Hello, World!")