Released on 16 Jul 2014
1. Fixed bug in the StripANSI function where it stopped at a semicolon.
2. Extra code to handle inadvertent injection of non-UTF-8 data into a UTF-8 stream (when the output window is set to UTF-8). If a non-valid UTF-8 sequence is found it is assumed to be ANSI data in the current code page, converted into UTF-8 and that is used instead.
[master 38cbe97, b9c5997, fd445a7, 99a11ac]
3. The AddFont function now allows you to add multiple fonts (one at a time). The previous behaviour was that adding one new font removed the previous one. Now you can add any number of fonts. This could be useful for miniwindow writers.
4. Fixed bug with selecting UTF-8 (Unicode) characters with the mouse, where if you clicked and dragged some characters would disappear and reappear.
5. Fixed problem with triggers where, if you switched to or from UTF-8 mode in the Output window configuration, triggers would expect (or not expect) UTF-8, incorrectly, possibly giving errors when new lines arrive from the MUD.
[master d95e354, 0b2041b]
6. Fixed bug where, under obscure circumstances, you might get the error message "Not a valid base64 string - incorrect length (not mod 4)." when opening the triggers/aliases lists or similar windows in world configuration.
7. Added Lua script function: utils.utf8convert
This takes a string and converts each byte from the current code page into UTF-8. This is intended for converting characters in the range 0x80 to 0xFF into the appropriate UTF-8 sequences.
8. Added support for MTTS (MUD Terminal Type Standard)
This lets MUD servers query if the client supports extended 256-color ANSI sequences, and also shows if UTF-8 is active or not.
For details see:
9. Added Lua script function: utils.glyph_available
This lets you test if a particular glyph can be rendered in the specified font. The general intention here is to let a script writer see if a suitable Unicode font has been installed when using UTF-8 mode.
print (utils.glyph_available ("Arial Unicode MS", 0x2710) ) --> 4439
Zero will be returned if the glyph is not in the font. Nil will be returned if the gdi32 DLL cannot be loaded or if the function GetGlyphIndicesW is not available from Windows.
The number 31 might be returned which probably indicates that the glyph is not in that font.
Other numbers (other than nil, 0 or 31) would indicate that the glyph is available. The exact number represents the "glyph index" in the font table.
Note that it appears that even if 0 is returned that character might be rendered anyway because Windows uses a "fallback" font if a character is not available in the main font. However whether or not this works seems to depend on what main font is selected (for example, if it is a Unicode font or not).
The intention of this function is to let script (plugin) writers warn users if they are planning to use certain glyphs (for example, mapping symbols) which are not in the currently-selected font.
Gammon Software support
Forum RSS feed ( https://gammon.com.au/rss/forum.xml )