Page 4 of 7 FirstFirst 1234567 LastLast
Results 61 to 80 of 128

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

  1. #61

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

    You can preview a font from the “Preview” menu. But the tool does not offer any easy functionality for resizing fonts because of how the CUF format works. So to resize a CUF font you have to create a new CUF file from the same source font at a larger size.

  2. #62

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

    Quote Originally Posted by Tellos Athenaios View Post
    Posting to say that I replied to your copy post on the ORG. (I hadn't seen this one here yet otherwise I'd've replied to it because it seems you are more active on these boards).
    sr but i cant find your answers , can u give me a new one, i want to add these characters "ặ ắ ẵ ệ .....", thanks a lot

  3. #63

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

    Well it's somewhere in this thread (on the ORG): http://forums.totalwar.org/vb/showth...ring)-mod-tool

    But if you want to add support for new characters which are not covered by the default font then the easiest thing to do is create a brand new CUF file from some font which supports those characters using the GUI as described above. If you need the font to look identical/similar to the default then a more sophisticated approach would be to create the missing glyphs as, say, PNG files and write necessary code to present them as a CUFSource of their own (which allows you to compile those into a CUF file or use the GUI tools merge them into the default fonts).

  4. #64

    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.

  5. #65

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

    Sorry, I can't under stand. Can you describe how can I use this?

  6. #66

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

    There's a short how-to for simply converting an existing font into a CUF file, a few posts back up this thread. Is that what you were looking for?
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  7. #67

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

    Change with a .ttf o .otf font.
    Set color.

  8. #68

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

    Colours are not defined in the CUF files, rather there is a descr_ui_colour_db.txt file where you can adjust those.

    A TTF file can be converted to CUF using the methods from the how-to I referred you to. Additionally, you can load & convert any font that is installed on the system and available to Java (doesn't include OTF fonts IIRC) in that way, too.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  9. #69
    wolfslayer's Avatar Senator
    Join Date
    Oct 2007
    Location
    Lexington, South Carolina
    Posts
    1,170

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

    Has anyone uploaded any converted fonts? I just want a much smaller font for tooltips etc. on the strat map.
    ______________________________________________________________


    Viewing and editing MTW2 textures with MWthumb and DXTbmp









  10. #70

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

    Thank you for colors...

    Sorry, but I can't do that and I can't understand you. Can you take a video or describe it with some pictures? Thank you...

  11. #71

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

    With pictures you say? What's this how-to I keep referring you, then: http://www.twcenter.net/forums/showt...07#post9272107
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  12. #72

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

    Oh, I didn't see thank you so much
    Last edited by _Capper_; December 06, 2011 at 08:45 AM.

  13. #73

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

    Here is my fonts (Calibri) kp_14, kp_18, kpl_60 attached:
    Thanks

  14. #74

    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; December 06, 2011 at 05:07 PM.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  15. #75

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

    Quote Originally Posted by Tellos Athenaios View Post
    From the final page you can import the actual TTF file you want to convert using the Load button on the right and specify other settings such as size (required) and style options (optional). When done, click next.
    Is it a bug?
    My question is about the "Weight" and "Width" style options:
    If I change them and press "next" (or "apply"). Yes, I can see some changes on the font preview page. But if I look the font settings page again, it shows me "Regular" option is selected. I can't see what I changed past on the settings page.

  16. #76

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

    Yes. I've fixed it in my local copy and also spotted another UI bug which I also fixed (squashed font family list in the Font tab of the overview page of the System font type)... I should probably release these fairly soon.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  17. #77

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

    Bug fix release, after nedensiz1's report here:

    Fixes
    • Fix the System font GUI to show loaded Width and Weight settings properly.
    • Fix the System font GUI to not squish the lists under certain conditions
    • Disable the Back button in the first page of the FontWizard GUI.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  18. #78

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

    Want to make new font, but found a bug. Some letters in all fonts located incorrect. Here is example, Times New Roman font - http://upyourpic.org/images/201201/n5euumqr2t.jpg How to fix it?

  19. #79

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

    Currently there is no convenient GUI to do that, but that said you can script it. When you create a font, part of the GUI is a form to attach a script (it can be retrieved from the Meta tab once you have created a font).

    Using this feature you can attach your own custom code that performs this fix up automatically. Something like the following code will work:
    Code:
    (function(){
     // utility function because JavaScript doesn't really do the 
     // 'Character' primitive/object
     // takes a string (first char will be converted to Character object)
     var getChar= function(s) {
        s = new java.lang.String(s).charAt(0);
        return org.europabarbarorum.cuf.support.IOHelp.fromCode(s);
     };
     
     // utility function to supply a list of objects which we'll need
     // takes a string (first char will be use), and the font-to-edit as
     // parameters
     var edit= function(chr, font){
        chr = getChar(chr);
        return {
          'char' : chr, // the Character object
          'dim'  : font.getGlyph(chr).getDimension(), 
          'edits': font.getEditor().edit(chr)
        };
     };
     // the meat of the script: generate a CallBack object which will post process the font
     return org.europabarbarorum.cuf.shell.Shell.CallBack({
       // this custom function will take the font and fix alignment of some characters
       callback: function(font) {
         // example: fix the character 'y' to align
         var data = edit('y', font);
         data['edits'].setY(data['dim'].getY() + 2);
         // and continue: fix the 'q' character as well 
         data = edit('q', font);
         data['edits'].setY(data['dim'].getY() + 2);
         // and so on...
       }
     });
    })()
    When in doubt about what methods/objects you can work with, you can do something like this to find out:
    Code:
    for(var i in object) { println(i + "\n" + object[i]); }
    For example you could insert the following into the callback function body:
    Code:
    for(var i in data['edits']) { println(i + "\n" + object[i]); }
    That code will print information about the methods you can call on the object to the shell window.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  20. #80

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

    Thanks a lot!

Page 4 of 7 FirstFirst 1234567 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •