Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.WindowFontList


Name WindowFontList
Type Method
Summary Lists all fonts loaded into a miniwindow
Prototype VARIANT WindowFontList(BSTR WindowName);
Description

This returns a list of all fonts loaded into this miniwindow. You could use this to find which fonts have been loaded, and then use WindowFontInfo to find information about each one.

WindowName - the name of the miniwindow to check for fonts.


For more information, see:

http://www.gammon.com.au/mushclient/mw_text.htm


Note: Available in version 4.34 onwards.


Lua example
-- show all fonts
fonts = WindowFontList(win)

if fonts then
  for _, v in ipairs (fonts) do 
    Note (v) 
  end
end -- if any
Lua notes
Lua returns nil if there are no fonts.
Returns If there are no fonts loaded then the return value is empty. Use "IsEmpty" to test for this possibility.

Otherwise, it returns a variant array containing the font ids of all the fonts. Use "ubound" to find the number of fonts in the list. You can then use "WindowFontInfo" to find details about each fonts.
Introduced in version 4.34

See also ...

Function Description
WindowCreate Creates a miniwindow
WindowFont Loads a font into a miniwindow
WindowFontInfo Returns information about a font
WindowText Draws text into a miniwindow
WindowTextWidth Calculates the width of text in a miniwindow

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.