Tremulous Forum
Mods => Mod Releases => Non-Gameplay Changing => Topic started by: bob0 on November 29, 2010, 10:38:29 pm
-
The patch (http://lojban.org/~krabbykrap/patches/tremulous/i18n) includes Lakitu7-freetype+consolecustomize.patch, which implements freetype support for ASCII (non-unicode) characters. The code can also be found in the "i18n" branch of git://git.mercenariesguild.net/obstacle.git
The renderer has been updated to support rendering UTF-8 encoded unicode characters. Other truetype fonts can be used, and by default ttf/DejaVuSans-Bold.ttf (which needs to be downloaded in addition to the patch) is used. The console font can be changed by setting "cl_consoleDynFont". For the UI, next to "font", "smallFont" and "bigFont" in an assetGlobalDef block, the fields "dynFont", "smallDynFont", and "bigDynFont", all of which the patch sets to ttf/DejaVuSans-Bold.ttf, have been added. There is a cache with a fixed size of MAX_FACE_GLYPHS (384 for now) glyphs. When a new glyph is rendered, an image and a shader is created for it at runtime, and it is added to the cache. The cache has a fixed size, so eventually old glyphs will be replaced by new glyphs, and when they are, the image is freed and a new one is created, and the mutable shader is overwritten for the new glyph. Currently, there is a problem when more than MAX_FACE_GLYPHS glyphs are rendered simultaneously, as new glyphs will continuously be generated, significantly reducing the frame rate.
Gettext is used for translation. The path containing all the translated messages determined by concatenating the cvar "localepath", or "fs_homepath" if "localepath" is empty, with the cvar "locale". By default, "localepath" is empty and "locale" is "/locale". Normally the environment variable LANG can be set. Unfortunately, gettext expects this directory to really be a directory, so it can't exist in a zip package.
This patch requires both the client and the VMs to be patched. Patched VMs are backwards-compatible with unpatched clients, so a server that includes this patch in their VMs will enable patched clients to use unicode, and unpatched clients will be unchanged. A patched client is able to load unpatched VMs.
The Domination server (running on lojban.org) includes this patch, in addition to domination itself, in its dowloadable package, as well as ttf/DejaVuSans-Bold.ttf. As far as I'm aware, it's the only server with vms that support unicode.
This has not been tested extensively.
Screenshots:
(http://lojban.org/~krabbykrap/images/tremulous/i18n.png)
(http://lojban.org/~krabbykrap/images/tremulous/shot-i18n-chat.jpg)
(http://lojban.org/~krabbykrap/images/tremulous/shot-i18n-console.jpg)
(http://lojban.org/~krabbykrap/images/tremulous/i18n-shot-chatfield.jpg)
(http://lojban.org/~krabbykrap/images/tremulous/i18n-shot-chatfeed.jpg)
-
This has not been tested extensively.
Nice line.
The patch looks quite interesting.
-
Sweet, Can't wait to see the way this goes! I'll have to install trem to check it out! Good work man!
-
wow just wow a dev hasnt even got trem installed
havent looked at the patch yet but the screenies look good
-
Good work! That one of things 1.2 definitely should have!
-
Welcome to a whole new level of pain in trying to find which unpronounceable slurpee of characters belongs to the greifer, and which to the poor innocent noob you just banned.
This could be very good for those of us who don't want to have to type in English but...sorry in advance.
-
Holy shit Unicode fuck yes.
@F50: Slot numbers.
-
A few things on first glance
- This is not the place for it; this is (http://bugzilla.icculus.org/enter_bug.cgi?product=Tremulous)
- A new blank translation is not copyrightable (and since that file also contains others' copyrights, your notice in jbo.po is pretty bogus)
- Obviously all of the strings need to manually checked and updated so they make sense for translation ("'s %s" doesn't translate well, many of the strings should not be translated in part or at all, etc.) and some things are not translated that should be
- Various functions would need to be updated that were not
- The typeface should probably be specified by config, not the menus
- Your patch does a few more things than what it says
- You tend to screw up code format
-
I'll have to install trem to check it out!
-
This is very nice! Good work!
Finally we can speak spanish in trem with good spelling ;D
Edit: the patch doesn't work with svn 2065 :/
-
lol, "I don't speak Russian" wrote in pure Russian. :laugh:
-
no you shouldn't do it that way...
-
Can this also allow Japanese, Chinese, and Korean writing?
-
Its Unicode (http://en.wikipedia.org/wiki/Unicode), lol. =)
-
Its Unicode (http://en.wikipedia.org/wiki/Unicode), lol. =)
It's a patch, not a magic wand. Sometimes these ideas and patches don't work out. I still worry what the patch will do to the server otherwise.
I noticed the line "This has not been tested extensively"
See my point here?
.
-
See my point here?
It's unicode (http://en.wikipedia.org/wiki/Unicode), of course it can potentially allow any of those, see the point there?
You never asked about anything else, what kind of thing do you expect it to "do to the server otherwise"?
-
See my point here?
It's unicode (http://en.wikipedia.org/wiki/Unicode), of course it can potentially allow any of those, see the point there?
You never asked about anything else, what kind of thing do you expect it to "do to the server otherwise"?
Screw-up the server, perhaps?
"potentially" is a very vague thing, btw. Clarity is an excellent method to take in communication. Politicians and salesmans love to handwave problems away by never clearly answering questions too. Do I have to add anything else besides the patch, or will the patch alone provide the fonts for those Asian languages? Is the patch going to interfere with anything else? Blithe answers don't really answer.
I notice there's also no clear instructions on how the patch is installed, or applied.
-
Well no, were you expecting to be able to use the patch as-is, does it look particularly finished? it looks like a very rough around the edges proof of concept to me, did you assume otherwise?
So, where were we? oh yeah, it's unicode, it is designed to allow one to use any number of different character sets, how well this individual patch does so is something you'll have to either check for yourself or wait for the author to respond about.
-
Well no, were you expecting to be able to use the patch as-is, does it look particularly finished? it looks like a very rough around the edges proof of concept to me, did you assume otherwise?
So, where were we? oh yeah, it's unicode, it is designed to allow one to use any number of different character sets, how well this individual patch does so is something you'll have to either check for yourself or wait for the author to respond about.
So, being flippant replaces clear answers for you. Thanks. I expected that. Sorry, no, I have no idea what the patch really looks like - rough, polished, wierd, strange - since I have no patches to compare it against - should I get some and stare at them too for some mysterious meaning?
Thank you for being so obfuscating.
-
Sorry, no, I have no idea what the patch really looks like - rough, polished, wierd, strange - since I have no patches to compare it against - should I get some and stare at them too for some mysterious meaning?
I'd only looked at the screenshots myself, it doesn't look like a polished product from those alone, undeference has commented on the state of the code but that means nothing to me. Sure, go ahead and stare at some patches, if you feel that it'll prove enjoyable.
Thank you for being so obfuscating.
No problem, I shall continue in my endeavour to cause you inexplicable confusion and bewilderment at every turn.