I'm back with another update. Pretty big one this time around:
CUF files
- Preliminary support for kerning. This is something that people modding M2TW will probably not give much thought, but this should make the tool compatible with ETW CUF fonts too. Thanks to just at the TWC for pointing out to me how this feature is supposed to work in those files.
- Added the code to resolve the long standing todo of having some translation layer for CUFProperty objects to provide a better mechanism for checking the values you want to set.
- Added CUFSourceEditor which is a class that provides support for a declarative approach to editing individual glyph attributes like advance width and y-offset relative to some sort of baseline. This allows people to fix corner badly offset glyphs by injecting better values (this is mainly an issue with italic fonts where rounding errors do more damage to spacing between glyphs). All standard font classes (deriving from AbstractCUFSource) support this feature: you can use edit() and getEdits() respectively to work with it.
Font previews
- Better caching for glyphs. By removing the temporary solution with a proper cache anything that has a lot of the same characters being used (e.g. "Hello world") should see a significant speed up when a preview is rendered.
- Improved support for editing the CUF properties in the table of the preview window.
CUF Shell:
- Fix to allow prompting for user input from fork'ed scripts. In particular this includes a rewrite of the way the shells in the GUI obtain your commands and write output to the GUI.
Help files (need more work to be a proper reference documentation):
- The tool now contains support for the javax.help (JavaHelp) package which provides a Help browser. In addition the original readme.html file was cut into various pieces which are accessible through this browser (and bundled in dist/cuf-help.jar)
- Added necessary code to deal with the case where no JavaHelp is present (at compile time and/or at run time) so you can still build & use the CUF tool without it.
- Changed build scripts so that the Javadoc ends up as part of the help bundle too, which means you can use the search function of the JavaHelp browser to navigate it.
The Help feature requires JavaHelp, which you can get from here: https://javahelp.dev.java.net/
Misc:
- Rather than using an UnsupportedOperationException() stub, some of the code now throws an NotEditableException() when you attempt to do editing operations on read only data (something which would not work anyway).
Bookmarks