world.WindowFontList
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
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.
Return value
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.
Related topic
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 |