{"action":"created","issue":{"url":"https://api.github.com/repos/Mudlet/Mudlet/issues/1543","repository_url":"https://api.github.com/repos/Mudlet/Mudlet","labels_url":"https://api.github.com/repos/Mudlet/Mudlet/issues/1543/labels{/name}","comments_url":"https://api.github.com/repos/Mudlet/Mudlet/issues/1543/comments","events_url":"https://api.github.com/repos/Mudlet/Mudlet/issues/1543/events","html_url":"https://github.com/Mudlet/Mudlet/pull/1543","id":294395130,"number":1543,"title":"Enhance: add ability to set any glyph as a room symbol","user":{"login":"SlySven","id":6163092,"avatar_url":"https://avatars3.githubusercontent.com/u/6163092?v=4","gravatar_id":"","url":"https://api.github.com/users/SlySven","html_url":"https://github.com/SlySven","followers_url":"https://api.github.com/users/SlySven/followers","following_url":"https://api.github.com/users/SlySven/following{/other_user}","gists_url":"https://api.github.com/users/SlySven/gists{/gist_id}","starred_url":"https://api.github.com/users/SlySven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlySven/subscriptions","organizations_url":"https://api.github.com/users/SlySven/orgs","repos_url":"https://api.github.com/users/SlySven/repos","events_url":"https://api.github.com/users/SlySven/events{/privacy}","received_events_url":"https://api.github.com/users/SlySven/received_events","type":"User","site_admin":false},"labels":[{"id":119740317,"url":"https://api.github.com/repos/Mudlet/Mudlet/labels/1%20-%20Ready","name":"1 - Ready","color":"009800","default":false},{"id":70158104,"url":"https://api.github.com/repos/Mudlet/Mudlet/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"vadi2","id":110988,"avatar_url":"https://avatars1.githubusercontent.com/u/110988?v=4","gravatar_id":"","url":"https://api.github.com/users/vadi2","html_url":"https://github.com/vadi2","followers_url":"https://api.github.com/users/vadi2/followers","following_url":"https://api.github.com/users/vadi2/following{/other_user}","gists_url":"https://api.github.com/users/vadi2/gists{/gist_id}","starred_url":"https://api.github.com/users/vadi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadi2/subscriptions","organizations_url":"https://api.github.com/users/vadi2/orgs","repos_url":"https://api.github.com/users/vadi2/repos","events_url":"https://api.github.com/users/vadi2/events{/privacy}","received_events_url":"https://api.github.com/users/vadi2/received_events","type":"User","site_admin":false},"assignees":[{"login":"vadi2","id":110988,"avatar_url":"https://avatars1.githubusercontent.com/u/110988?v=4","gravatar_id":"","url":"https://api.github.com/users/vadi2","html_url":"https://github.com/vadi2","followers_url":"https://api.github.com/users/vadi2/followers","following_url":"https://api.github.com/users/vadi2/following{/other_user}","gists_url":"https://api.github.com/users/vadi2/gists{/gist_id}","starred_url":"https://api.github.com/users/vadi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadi2/subscriptions","organizations_url":"https://api.github.com/users/vadi2/orgs","repos_url":"https://api.github.com/users/vadi2/repos","events_url":"https://api.github.com/users/vadi2/events{/privacy}","received_events_url":"https://api.github.com/users/vadi2/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/Mudlet/Mudlet/milestones/11","html_url":"https://github.com/Mudlet/Mudlet/milestone/11","labels_url":"https://api.github.com/repos/Mudlet/Mudlet/milestones/11/labels","id":2995714,"number":11,"title":"3.8.0","description":"","creator":{"login":"vadi2","id":110988,"avatar_url":"https://avatars1.githubusercontent.com/u/110988?v=4","gravatar_id":"","url":"https://api.github.com/users/vadi2","html_url":"https://github.com/vadi2","followers_url":"https://api.github.com/users/vadi2/followers","following_url":"https://api.github.com/users/vadi2/following{/other_user}","gists_url":"https://api.github.com/users/vadi2/gists{/gist_id}","starred_url":"https://api.github.com/users/vadi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadi2/subscriptions","organizations_url":"https://api.github.com/users/vadi2/orgs","repos_url":"https://api.github.com/users/vadi2/repos","events_url":"https://api.github.com/users/vadi2/events{/privacy}","received_events_url":"https://api.github.com/users/vadi2/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":6,"state":"open","created_at":"2017-12-23T09:29:03Z","updated_at":"2018-03-10T18:49:30Z","due_on":"2018-01-07T08:00:00Z","closed_at":null},"comments":33,"created_at":"2018-02-05T13:37:39Z","updated_at":"2018-03-10T19:55:45Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/Mudlet/Mudlet/pulls/1543","html_url":"https://github.com/Mudlet/Mudlet/pull/1543","diff_url":"https://github.com/Mudlet/Mudlet/pull/1543.diff","patch_url":"https://github.com/Mudlet/Mudlet/pull/1543.patch"},"body":"#### Brief overview of PR changes/additions\r\nI have long wanted to use more than just ASCII letters for room symbols - this commit adds support for any glyph to be used and more than one - although there is a trade off in fitting the text into a square or round room symbol which means longer strings have to be smaller to fit.  Each different symbol is resized to fit and this allows for the use of symbols with combining diacriticals and those from beyond the BMP.\r\n\r\nControls are added to the profile preference that allows a specific font to be used for room symbols - so a Server/Crowd source map could bundle up one that includes all the symbols needed; and there is also a check-box option to force just that font to be used if that is important.  However if a map is shared it is not impossible for the end-using system not to have a particular font or indeed any font with a glyph in.  \r\n\r\nTherefore there is a secondary dialog available on the \"Mapper\" tab of the \"Profile Preferences\" that can be called up and which gives an informative display of what symbols are used where and from what Unicode codepoints they are composed as well as whether the current system can display each symbol in either the specified font or as a fall-back, any font available to a Qt Application - for simplicity a colour coded icon is displayed against each line in the table of symbols indicating whether it can be found in the selected font (![dialog-ok-apply](https://user-images.githubusercontent.com/6163092/35806235-b906d2b2-0a76-11e8-839e-664e48f67512.png)); only in another font (![dialog-warning](https://user-images.githubusercontent.com/6163092/35806236-b96dd4e4-0a76-11e8-98fe-de5c0f25e8fc.png)) or is missing altogether on the system (![dialog-error](https://user-images.githubusercontent.com/6163092/35806233-b8a90f7e-0a76-11e8-8b3f-e9ba041a4db0.png)).  As this responds interactively as the selected font is changed it should enable the user to find a suitable choice for their case.\r\n\r\n#### Motivation for adding to Mudlet\r\nI want to be able to decorate my maps with the fine range of glyphs from George Douros' Public Domain [Symbola](http://users.teilar.gr/~g1951d/Symbola.zip) font.\r\n\r\n#### Other info (issues closed, discussion etc)\r\nThe revised data ideally would be stored directly into the Mudlet binary map format and I have incremented the version number to __19__ to support this feature - however I have been able to provide a fall-back that silently uses the map and room user data areas and leave maps in the current default __18__ format able to be read with the current versions of Mudlet without issue if only the currently supported symbols (\"letters\") are used - should a Mudlet version with this PR included set a symbol that cannot be displayed in the current versions in existence they will display a `?` instead.  Similarly, going forward from this PR the lua `getRoomChar` and `setRoomChar` should be deprecated, however they will still work with the previous range of characters - although both current versions and this code going forward will return a '?' for a room symbol that cannot be encoded as a single byte, additionally this code will include a second error message advising the use of the replacement `getRoomSymbol` which returns a UTF-8 encoded string.  The companion `setRoomSymbol` will also accept an empty string (or a space) to clear a room symbol (as will the revised `setRoomChar`) which seems to have been a previous _undocumented software feature_ i.e. it was not possible to clear a room symbol from a lua script... 😮 "},"comment":{"url":"https://api.github.com/repos/Mudlet/Mudlet/issues/comments/372060756","html_url":"https://github.com/Mudlet/Mudlet/pull/1543#issuecomment-372060756","issue_url":"https://api.github.com/repos/Mudlet/Mudlet/issues/1543","id":372060756,"user":{"login":"SlySven","id":6163092,"avatar_url":"https://avatars3.githubusercontent.com/u/6163092?v=4","gravatar_id":"","url":"https://api.github.com/users/SlySven","html_url":"https://github.com/SlySven","followers_url":"https://api.github.com/users/SlySven/followers","following_url":"https://api.github.com/users/SlySven/following{/other_user}","gists_url":"https://api.github.com/users/SlySven/gists{/gist_id}","starred_url":"https://api.github.com/users/SlySven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlySven/subscriptions","organizations_url":"https://api.github.com/users/SlySven/orgs","repos_url":"https://api.github.com/users/SlySven/repos","events_url":"https://api.github.com/users/SlySven/events{/privacy}","received_events_url":"https://api.github.com/users/SlySven/received_events","type":"User","site_admin":false},"created_at":"2018-03-10T19:55:45Z","updated_at":"2018-03-10T19:55:45Z","author_association":"OWNER","body":"How about a compromise: I note that there are some lua functions that are registered with a different name externally to what they are internally - and in one case this means there are two names that call the same function internally.  As a bit of an aside I note that of the 303 functions that I can see declared in `TLuaInterpreter` right now, the following cases exist:\r\n\r\n* `clearWindow(...)` and `clearUserWindow(...)` both use the internal `clearUserWindow(...)` function {The former is used in the external `GeyerMiniConsole.lua` script, the latter is not mentioned}.\r\n* `debugc(...)` uses the internal `debug(...)` function {and is defined for both the main Lua instance and the indenter instances; `debug` is used in `local function findStringEventHandler(existingHandlers, functionString)` in the external `Other.lua` script and in some error handling for `function mmp_mapping_newroom(_, num)` in the script of the bundled `mudlet-mapper.xml` file}.\r\n* `echo(...)` uses the internal `Echo(...)` function and is used extensively\r\n* `hideWindow(...)` and `showWindow(...)` are mapped to `hideUserWindow(...)` and `showUserWindow(...)` internally respectively and are used in external `GUIUtils.lua` and `GeyserContainer.lua` files.\r\n* `handleWindowResizeEvent(...)` is mapped to the internal `noop(...)` function and has dummy (empty) replacements defined in `GUIUtils.lua`, `LuaGlobal.lua` and has a commented out work around in the Geyser.lua file for \"VERSIONS PRIOR TO 1.1.0\" - indeed that file is currently completely commented out now!\r\n* `send(...)` is mapped to the internal `sendRaw(...)` function and is used extensively in several external Lua files - however the internal `TLuaInterpreter::sendRaw(...)` which impliments it ***uses sendRaw in its error messages NOT send***!\r\n* `wait(...)` is mapped to the internal `Wait(...)` function, it is not used by any external script that we provide - but the internal `TLuaInterpreter::Wait(...)` does run a `msleep(argument)` on the thread that is running it - of course this is an evil thing to do so it is just as well as we don't use it or document it. 😈 \r\n\r\nThis being the case, would it be acceptable to map the old `getRoomChar(...)` and `setRoomChar(...)` onto the new `getRoomSymbol(...)` and `setRoomSymbol(...)` respectively?  This would mean that the old names would still work but the functionality (**and error messages**) would be the same as the new command - so that we do not add to the total number of functions by adding this change but the old names still operate though we prefer everyone to use the new ones going forward?\r\n"}}
{"actor":{"display_login":"SlySven"}}