Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:LogDisplaySetFont

From RoR Wiki
Revision as of 19:46, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · LogDisplay functions
Version: WAR 1.4.8

Sets the font of a LogDisplay window.

LogDisplaySetFont(displayName, fontName)

Arguments

displayName
string – Name of a LogDisplay window.
fontName
string – Font name, for example "font_clear_medium".

Returns

Nothing.

Details

  • If the name equals the current font, nothing happens.
  • Otherwise the display is laid out again with the new font and all lines are rebuilt.
  • The name is stored even if it is not a known font. LogDisplayGetFont then returns it, but the display is not rebuilt with a font.
  • The function needs at least two arguments and only reads the last two. Any extra arguments placed in front of them are ignored.

Errors

  • Error in function call 'TextLogDisplaysetFont': Window %s does not exist
  • Error in function call 'TextLogDisplaysetFont': Window %s is not a TextLogDisplay
Note the lower-case s in TextLogDisplaysetFont.

Example

From ea_chatwindow/source/chatwindow.lua:

LogDisplaySetFont(EA_ChatTabManager.Tabs[tabManagerId].name.."TextLog", ChatSettings.Fonts[fontIndex].fontName)

See also