Page 5 of 7 FirstFirst 1234567 LastLast
Results 81 to 100 of 128

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

  1. #81

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

    Hello.
    I tried to create the new fonts with this tool but after I apply changes the new fonts, the problem occurs when played S2:TW game. CTD is often caused by the new fonts.
    I have a question. Is this cuf tool only available Medieval2:TW cuf format? I want to create new fonts for Shogun2.(included Empire, Napoleon)
    The favor of a reply is requested.

  2. #82

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

    With Empire, CA added an extension to the CUF format which enables kerning of the fonts.

    By default the CUF tool does not generate the kerning tables needed, so I imagine that is why you get those CTDs. However the feature is “supported”, all you need to do is to tick a checkbox when configuring your font before you generate it. The checkbox is labeled “Kerning”. Below is an example of UnBatang where you can see the effect of kerning quite easily (notice the “th” pair in The or the “wn” pair in brown):
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  3. #83

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

    Thank you for the reply! It was very useful.

  4. #84
    jirisys's Avatar Senator
    Join Date
    Mar 2010
    Location
    In the town where I was born
    Posts
    1,015

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

    Thank you Tellos and thanks to the EB Team for this wonderful tool.

    ~Jirisys ()
    Signature
    Because we all need to compensate...

  5. #85

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

    Almost a year on the CUF tool has accumulated a fair few bug fixes. This release contains:

    Fixes
    • Fix bad key/value counting check when attempting to write empty values to Strings files.
    • Fix possible error when writing empty (null) values using the IdentityMapping macro.
    • Fix bad handling of the `?' switch in launch scripts.
    • Fix race in CompileJob between trying to flush pending progress messages and queuing (adding) new ones.
    • Fix race between forked scripts trying to link the same library.


    Feature
    • Launch scripts now allow you to pass the path to the Java program to use, with the `-j' or `--java' switches. This is particularly useful on Windows where Java may not always be on the PATH and trying to invoke it as `java' would fail.


    Misc
    • Move to NetBeans 7.2
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  6. #86
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

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

    Nice maintenance! This upload has been updated as well?










  7. #87

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

    Yes. In fact, when I set up those download links I made them refer to the files on the EB FTP server. This way, when I push out a release all I have to do is overwrite those files on the FTP server rather than hunting down all sorts of links on the Internet (which I have to remember still!). Also, I am terminally lazy so I automated that bit as well so all I have to do is run a "release" script and give it my username/password for the server to log on.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  8. #88

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

    Minor update:

    Tweaked project.properties file so the project builds with Java 7 right away, without need for head scratching. (Culprit: -Xlint:depreciation.)
    Binary only release now contains the Unit tests (and related auxiliary code) by default. This is part of the ground work needed for releasing another tool.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  9. #89
    Deutschland's Avatar East of Rome Mod Leader
    Join Date
    Apr 2009
    Location
    Leipzig, Germany
    Posts
    2,025

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

    Sorry but i seem unable to find the directory dist/cuf.jar

    was it replaced/changed in a newer version?

  10. #90
    Kahvipannu's Avatar Bring me Solo & wookie
    Join Date
    May 2009
    Location
    Finland
    Posts
    3,671

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

    So basically you can change font types, actual fonts, colors and such with this? And this will work with any mod for M2? If so, this sounds pretty amazing.

  11. #91
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

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

    It takes a bit of experimenting with the individual fonts (suitability regarding various sizes) but I liked the results.










  12. #92
    Deutschland's Avatar East of Rome Mod Leader
    Join Date
    Apr 2009
    Location
    Leipzig, Germany
    Posts
    2,025

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

    Sorry but i seem unable to find the directory dist/cuf.jar

    was it replaced/changed in a newer version?
    Also I was wondering how to add in greek font e.g. letters into an existing mtw2 font? Because the current font used for the building descriptions seems unable to handle them.

    Thx for your answer!

  13. #93

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

    Quote Originally Posted by Kahvipannu View Post
    So basically you can change font types, actual fonts, colors and such with this? And this will work with any mod for M2? If so, this sounds pretty amazing.
    Yes, you can change the font types/actual fonts with this tool.
    No, colours are controlled through different (text) files: you do not need the CUF tool for this.
    It will work with any mod for M2, but for the purpose of integrating your custom fonts you probably want to edit the font_db text file as well (this file controls which CUF file is used when M2TW is looking for a particular font).

    Quote Originally Posted by Deutschland View Post
    Sorry but i seem unable to find the directory dist/cuf.jar

    was it replaced/changed in a newer version?
    There are two different releases of the CUF tool.

    The source release does not contain the dist folder at all, because it only contains sources. You are expected to compile these yourself, after which you would have the dist/CUF.jar file. The source version is useful if you want to modify the tool or if you want to add translations for other languages.

    The binary only release is essentially the opposite: it contains the dist/ folder but does not feature the sources. This is the one you want if all you want to do is use the tool.

    Quote Originally Posted by Deutschland View Post
    Also I was wondering how to add in greek font e.g. letters into an existing mtw2 font? Because the current font used for the building descriptions seems unable to handle them.

    Thx for your answer!
    The CUF tool supports "mixing" fonts -- i.e. folding multiple distinct fonts into a single one. So you could mix an existing M2TW font with one that does support such characters.
    Last edited by Tellos Athenaios; January 04, 2013 at 03:58 PM.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  14. #94

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

    I tried that with rome 2 and it's works, but unfortunately dies many time.
    We want a new font type or added to the original, because the original's have not hungarian fonts.

  15. #95

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

    Assuming this refers to your PM:

    Quote Originally Posted by tobias88888
    Hi!

    I read your post (http://www.twcenter.net/forums/showt...ng%29-mod-tool) and I want your program use to Rome 2 total war.
    It's work (http://www.twcenter.net/forums/showt...7#post13570227), but the Rome 2 is freezing.

    If I export the game font and if I use that again, the game works perfectly. So the problem is the Cuf file, what your program's creating.
    You can see that up, it's works so maybe you can fix this. I think there missing some glyph what the game wants.
    You can try experimenting with the kerning option (which I also mentioned some posts up from this one). When enabled the tool will write out the CUF file with ETW style kerning tables.

    Alternatively you mentioned that you might need support for certain glyphs. Getting that right is entirely "your job", as the CUF tool does not make any assumptions about what characters you will need support for. What you could do is to layer your own font on top of a base R2TW font. You'd use a "Mixed font source" in the CUF tool, with two sources underneath. One source is your own custom font, and the other would be the original R2TW font you wish to 'patch'. Then you only check the "Keep" checkbox for your custom font so the tool will prefer your own font over the R2TW font. When you export the Mixed font the tool will export your own font but plug any gaps that the R2TW font covers with the R2TW font.

    You can use that exported font to exclude the possibility of missing any special glyphs you didn't know about.

    If neither option fixes anything, it's likely the file format changed in some way since Empire. I'd need to dig deeper in the file structure (for which I would need the original CUF files from the game unpacked from whatever data pack they're in) to check and that would take some time.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

  16. #96

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

    The exported cuf has 65535 glyph (so there is many empty glyph). The cuf what made with your cuf creator has exactly as many glyph than the used font. I tried add the used font more empty glyph (to 65535), but your creator skip these glyph

    I tried the mixed option, but I got that:


  17. #97

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

    I tried the kerning mode and it works perfectly

  18. #98

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

    Not freezing now, but:

    no kerning but freeze:


    with kerning (same values)

  19. #99

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

    I think the solution would be an other "kerning" check box what make a kerning table with no kerning

  20. #100

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

    Quote Originally Posted by tobias88888 View Post
    I think the solution would be an other "kerning" check box what make a kerning table with no kerning
    Well there are a few possibilities:


    • TWR2 kept the same format as Empire but redefined the meaning of the kerning table. In Empire it's basically 'kerned' advance widths of a given character for all kerned character pairs, which is not the same as true kerning.
    • The font you used has completely borked kerning (at least when rendered by the Java AWT library)
    • The culling used to keep the kerning table down is too aggressive in this case, so there are now missing entries in the kerning table.
    • The kerning never worked properly even in Empire (I don't have Empire, so the value of 'works' is that nobody complained about it before...) but this font causes the bug(s) to manifest themselves spectacularly.



    In any case we have established that the basic structure of the CUF file format appears unchanged from Empire. To test the kerning code some more, you could try generating a CUF file based on the fonts 'Dialog', 'Times New Roman', 'Lucida Sans Unicode' (if you have those). That would help to exclude option #1 from the list of possibilities and help determine whether or not an option for an 'empty' kerning table makes sense. (If they're also massively broken it's rather more likely that the tool needs a more comprehensive update to deal with TWR2 CUF files properly.)

    ...

    As it happens you can manually add an 'empty' kerning table in the ETW format relatively easily. To do so requires using a hexeditor, however. Here's what you would need to do:

    • Use the CUF tool to generate a CUF font as normal but don't enable kerning. Make a backup copy of it in case the next steps go wrong.
    • Open the font in a hexeditor and navigate to the very end of the file.
    • Make sure that you are in 'insert' and not in 'overwrite' mode if your hexeditor distinguishes between the two.
    • Append four zero bytes (hexadecimal code 00) so you now have four times '00'. If your hexeditor features a two pane UI with the bytes on one side and the bytes 'decoded' into text on the other side you want to edit the raw bytes directly (not the 'decoded' text). You can tell if you do it wrong because if you type zero's in the text part your raw bytes will start to show hexadecimal sequences of '30' instead of '00' appended to the file.
    • The final result should be exactly four bytes bigger from the backup copy, with the last four bytes having a value of zero (hexadecimal 00).
    Last edited by Tellos Athenaios; January 18, 2014 at 12:59 PM.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

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

Page 5 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
  •