Minor update: Ted2/Mojox improvements

I spent some time recently working on adding some features to ted2 and mojox, including:

  • TextView now supports word wrap. You can enable/disable word wrap via the WordWrap:Bool property. The main motivation for this was to make editing #monkeydocs easier, but it’s also nice to be able to view plain text files etc with word wrap on.
  • There is no limit on TextView line length any more – used to be hard coded in to 1024 characters I think! Also, the horizontal scroller now shows the exact width of the document, ie: max line width.
  • Ted2 and mojox now provide support for themes – see the new ‘View’ menu in Ted2. Have a look at the theme .json files in the ted2 assets/themes dir if you want to have a go at making your own theme, all you really need to do is change the colors at the top of the file. Let me know if you come up with anything cool and I’ll add it to Ted2.
  • Ted2 now allows you to ‘zoom’ the entire IDE from .25 scale up to 4. This is kind of a ‘quick fix’ for HDPI users, but I also find myself nudging up the zoom later in the day! Zoom control is in the new ‘View’ menu, but you can also zoom using control (command on Mac) + mousewheel. Control + middle mouse button resets zoom to 1.0 (note: zoom doesn’t work too well yet if there’s a dialog open while zooming…).

Also. the canvas font system now supports rendering ALL characters in a font. Well, up to 65536 characters anway.

It used to only handle chars from 32-127, and I was a bit worried about how to add support more as the default DejaVuSans font alone has something like 4000 characters in it, and I didn’t want to generate ALL of them everytime as 99% of apps will only use a fraction of them.

I ended up going with a ‘page’ system, where each page contains up to 256 chars and pages are created ‘on demand’. This probaly isn’t ideal as it will produce 256 textures worse case, one for each page. A better approach is probably to use a dynamic atlas, but the current system will do for now.

This, combined with a tweak to mx2cc, should mean it’s now possible to display any char a font can handle. Check out the new fonttest banana that allows you to view all font pages.

Bye!
Mark

0

2 thoughts to “Minor update: Ted2/Mojox improvements”

  1. Also added a pretty cool ‘process::’ stream protocol so you can just LoadString( “process::blah” ) and it will stdout from blah into a string…

    0