Results 1 to 28 of 28

Thread: Release of the CUF (font & text rendering) mod tool

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Re: Release of the CUF (font & text rendering) mod tool

    Important update. This update contains a fix for a bug in the code which generated “keyed” strings.bin files. This fix involves generating proper lookup tables at the end of the file: without those Medieval II/Kingdoms suffer significant performance penalties. Mea culpa, the code that generated the strings.bin files was based off alpaca's bin converter which does not (nor does it need to) deal with this. I would like to thank my fellow EB members who tested and suffered the performance hit for their patience and help in debugging the problem, in particular Atilius and bobbin. Thanks, guys!

    Apart from having a fix which brings performance back to something more reasonable, the silver lining here is that this fix also addresses a bug in the Medieval II/Kingdoms files. Apparently the data/text/export_units.txt.strings.bin files extracted from the game packs are not built correctly either (implying that the game does not convert export_units properly). The lookup table in this file does not refer to the source code, rather it contains a dump of 795 entries for the 265 RTW units from RTW Vanilla (795 = 265 *3, and there are 3 keys per unit in export_units data.)

    This update also contains a simplification of the strings compiler, so the StringsSource types are no longer required. As a result if you were using StringsSources directly, you will need to update to use StringsFeeders. Furthermore setOrder(boolean) in StringsToolkit is gone and replaced with format(String). You can use “Ordered” where previously you would use “true”.

    Furthermore this update incorporates some of the improved understanding of the CUF file format, with regards to certain CUF properties. These are “maximum width” and “maximum height” of glyphs. This means that the suitable values will be automatically inferred by the CUF compiler by default. This behaviour can be controlled/disabled per property through CUFWriter.SetVSize, CUFWriter.SetHSize and CUFWriter.SetGlyphDataSize options: see Javadoc for details.

    This behaviour is new for VSize and HSize properties, both of which refer to cut-off values (if a glyph is wider or taller than either value it appears cut off in the game). The code rendering the previews in the tool do not take these values into account yet. For GlyphDataSize property it means you now have the final control over what is written to the CUF file.
    Last edited by Tellos Athenaios; 11-19-2010 at 07:36.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  2. #2

    Default Re: Release of the CUF (font & text rendering) mod tool

    There's a new important update available. This one fixes a few serious issues, and one less so.
    [list]
    New features:
    • Add support for getting/setting macro names on CUFSources (MacroSource, AbstractCUFSource, Converter).
    • Add support for hiding multiple fonts under a single macro (WrappedSource.MacroSource).
    • Add support for exporting macros from the FontWizard (ExportDialog).
    • Add support for editing CUF properties from the FontWizard.
    • Add support for specifying range of characters in FontWizard.
    • Add support for shifting character of fonts in FontWizard.

    Bugs:
    • Fix reference passing instead of copying arrays in AbstractCUFSource.
    • Fix broken format message for missing macros
    • Fix editing properties on the CUFSource (font) during previews.
    • Fix occasional disabled next/cancel buttons in FontWizard

    Misc:
    • Merge various FontWizard pages to achieve same effect with less code.
    • Move common FontWizard UI to its own package.
    • Move create new font pages to own package.
    • Move algorithms out of FontToolkit.
    • Improve error handling in FontWizard pages when building fonts.
    • Improve error handling when formatting localised messages.
    • Tidy up a number of error messages.
    • Move ComponentState from the fontwizard to the gui.support package.
    • Use different labels on FontWizard next/cancel buttons depending on context.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  3. #3

    Default Re: Release of the CUF (font & text rendering) mod tool

    There is another update of the tool. This update changes how sub shells interact with each other. Shells now live in their own thread (as managed by the JVM) rather than as task in a thread pool (as managed on top of the JVM). This update also fixes the long standing bug of output messages appearing out-of-order when running multiple shells in parallel.

    The result is a tool which is able to tax the CPU more aggressively when a lot of shells are forked, and thus finish parallel tasks faster. Subjectively, the command prompt feels faster from the GUI, as well.

    There are a few other minor changes:
    • Added SAXHelp which contains the tools for XML crunching outside of generating strings.bin files, should you need it. (I did.)
    • Added Context (right click) menu's on text fields and areas with copy/paste/cut actions (as appropriate). Of course you can also use Ctrl+C,Ctrl+V,Ctrl+X.
    • Added alternative PlainKeys mode to FormatOptions for StringsWriter: this version retains the old behaviour where lookup tables would be omitted.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  4. #4

    Default Re: Release of the CUF (font & text rendering) mod tool

    Update of the tool. The update itself is fairly small, but the main changes are worth updating for: a bug squashed and the tool is easier to use.

    Main changes
    • Update Macro, StringMapping and RawHandler to give better error messages.
    • Fixed a bug in FontToolkit.fixChartableCompatibilityFor where it could end up inadvertently dropping characters from the chartable. The method was renamed into fixChartable.
    • Use SortedMaps for chartables in the tool (most of the CUFSources already did this, but some used HashMaps). This ensure that the order of characters in a chartable is maintained for instance when compacting a font.


    Misc changes
    • Move algorithms out of FontToolkit, and together with WrappedSource to the font.impl package. Now there is an AlgorithmSource for these operations. (This change allows the code of the algorithms to be simplified and also makes the code elsewhere a bit neater.)
    • Remove some redundancy in the error messages for bad file types.
    • Fix cuf-impl.xml Ant script which suffered from bit rot. The update-licence task works again on Ant 1.8.1. This has otherwise no effect on the tool.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  5. #5

    Default Re: Release of the CUF (font & text rendering) mod tool

    I've identified & fixed a new problem with the tool: the ScriptRunner component would kill its host shell too soon meaning that the exit code of the program could be 0 (indicating no errors) even if errors did occur. This is sufficiently serious for me to release a new version of the tool.

    This update also contains a few other changes to the tool. The main ones involve the Shell and they are: fork always expects a boolean argument to accompany the CallBack argument (it indicates whether it the CallBack must run in the same thread as the shell on which you call fork), and there is a blockUntilExit method now if you need to block a Shell until another one exits.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  6. #6

    Default Re: Release of the CUF (font & text rendering) mod tool

    The tool has not seen major action over the past few months but it did accumulate a few useful fixes so I'm calling it a release:

    Bugs
    • Fix malformed URI bug which could prevent XSLT stylesheets from completing normally.
    • Fix a repaint bug, which prevented preview screens from being updated in specific corner cases.
    • Fix behaviour of the GUI code in SystemFontUI so selected font and list synchronise properly if you select from the list after selecting a file/typing something manually.
    • Fix a few cases where exceptions were thrown.


    Misc
    • Changes in how Macros are written to remove the date field. This is useful for versioning these files (as copies which are identical except for the date stamp are now identical). Additionally most all data is now in Unicode escape format, which means that all data is now ASCII. Both changes have no effect on how the Macros are read or used, and old files continue to work normally.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  7. #7

    Default Re: Release of the CUF (font & text rendering) mod tool

    Another release with some more fixes and a few changes in behaviour.

    Bugs:
    • Fix scrolling artifacts by forcing more repaints.
    • Center JavaHelp window properly
    • Fix loading of unit tests on the commandline. (You can tell I used NetBeans to run unit tests directly... )
    • Shells now use each their own PathParser, instead of relying on a globally shared one.


    Features
    • Rewrite of cuf.sh and cuf.wsf to be more flexible. This brings added flexibility in the commandline syntax and allows you to pass in options for the program using the -Doption.name=value syntax. The switches -nox, -gui, -tty and their long form counterparts --no-chrome, --with-chrome, --headless are now simply shorthands for a bunch of such options.


    Misc
    • Changes in how Macros are written to disk: now the code sorts them. This further improves ease-of-use in versioning, as equivalent macro files will end up byte for byte identical.
    • Change in how message strings are loaded from resource bundles, and attending change in program startup logic: now the program attempts to load them through the
      custom classloader (as soon as possible). This is not directly useful for end users, unless you happen to be writing code that wants to let the CUF tool load its own message strings.
    • Add the ability to load XSLT stylesheets from URLs directly. Only available to code extending the XSLTOption class of the CUF tool. This change enables code based on the CUF tool to load predefined “well known” XSLT stylesheets directly.
    Last edited by Tellos Athenaios; 12-07-2011 at 00:06.
    - Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool - EB Install Guide - How to track down loading CTD's - EB 1.1 Maps thread


    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO