Jump to content

hi :) language question..


LAPIECE
 Share

Recommended Posts

The game is designed for ASCII only for now....hard to say what would happen if you replaced the fonts with ones that had an extended character set. I have never tried writing a game font from scratch so can't help :(Try searching the web for a program that takes a ttf and generates the .fnt (xml) file and a png with all the characters arranged as one big image. Then all you would need to do is convert the png to dds (dx5) and use the tex mod to convert it to a tex file. I think that would be the general process. Search nVidia's site from some old tools to work with dds image files too if you want.Other than that, I am concerned whether unicode can be implemented if Lua scripts only supports 8-bit characters? There must be a unicode library they can added to their interpreter to enable full support though.

Link to comment
Share on other sites

The game is designed for ASCII only for now....hard to say what would happen if you replaced the fonts with ones that had an extended character set. I have never tried writing a game font from scratch so can't help :(Try searching the web for a program that takes a ttf and generates the .fnt (xml) file and a png with all the characters arranged as one big image. Then all you would need to do is convert the png to dds (dx5) and use the tex mod to convert it to a tex file. I think that would be the general process. Search nVidia's site from some old tools to work with dds image files too if you want.Other than that, I am concerned whether unicode can be implemented if Lua scripts only supports 8-bit characters? There must be a unicode library they can added to their interpreter to enable full support though.

thx :) A few weeks ago Making a PNG image file. Thanks for the advice
Link to comment
Share on other sites

11474! that's a lot of characters you got there! :DUm, something stripped the xml formating from the fnt file? It should look similar to this....

<?xml version="1.0"?><font>  <info face="Open Sans" size="50" bold="0" italic="0" charset="" unicode="1" stretchH="100" smooth="1" aa="1" padding="4,4,4,4" spacing="4,4" outline="2"/>  <common lineHeight="50" base="39" scaleW="1024" scaleH="512" pages="1" packed="0" alphaChnl="1" redChnl="0" greenChnl="0" blueChnl="0"/>  <pages>    <page id="0" file="opensans50_0.png" />  </pages>  <chars count="191">    <char id="32" x="1003" y="214" width="13" height="13" xoffset="-6" yoffset="33" xadvance="10" page="0" chnl="15" />    <char id="33" x="559" y="180" width="18" height="38" xoffset="-4" yoffset="7" xadvance="10" page="0" chnl="15" />    <char id="34" x="750" y="216" width="23" height="22" xoffset="-4" yoffset="7" xadvance="15" page="0" chnl="15" />    <char id="35" x="487" y="139" width="34" height="38" xoffset="-5" yoffset="7" xadvance="24" page="0" chnl="15" />

Is there something you can do for this? It would take a long time to manually reformat. If not then maybe I can use Excel to re-create the data in xml format.And the png files need to be in tex format which is Klei's version of dds....but I'll see if I can deal with that using the tools I got from nVidia.

Link to comment
Share on other sites

Ok, thanks....let me see what I can do with it. I will follow up here when I get a chance, probably tomorrow.EDIT: [MENTION=9374]Daviex[/MENTION]Dang it....can't seem to get the Tex Files mod to compress the png files. Keeps crashing on can't find file error and dds is not supported yet. :S

Edited by WrathOf
Link to comment
Share on other sites

[MENTION=2]Bigfoot[/MENTION]I wanted to test it out put can't get Daviex's mod to make tex files from the png or dds files either :S I know it is not appropriate to give use your tool for making tex files but could you have someone try to use LAPIECE's files to make a font or at least the tex file so we can test it? If everyone is too busy now then we will just wait until you have time or Daviex can update his mod. Thanks

Link to comment
Share on other sites

  • Developer

To convert font_00.png, you would use:TextureConverter -p opengl -o korean.tex -f dxt3 -i font_00.pngIf you have more than one file, you would use (e.g. font_00.png and font_01.png):TextureConverter -p opengl -o korean.tex -f dxt3 -i font_00.png;font_01.png

Link to comment
Share on other sites

Thank you very much, but I do not know: (README.txt to fix?I use these files

-p opengl -o font.tex -f dxt3 -i font_00.png;font_01.png;font_02.png;font_03.png;font_04.png;font_05.png;font_06.png;font_07.png;font_08.png;font_09.png;font_10.png;font_11.png;font_12.png;font_13.png;font_14.png;font_15.png

img: http://cfile9.uf.tistory.com/original/144D394A51280BF113F793
Link to comment
Share on other sites

This worked to make the tex but have not tried it yet...textureconverter -t 1d -f dxt5 -p opengl -v 5 -o font.tex -i font_00.png;font_01.png;font_02.png;font_03.png;font_04.png;font_05.png;font_06.png;font_07.png;font_08.png;font_09.png;font_10.png;font_11.png;font_12.png;font_14.png;font_15.pngEDIT: but Bigfoot's worked as well....did not see it beforehand.EDIT2:Oh wait, are you putting this in the readme file?No, no, it is a command line program, use the Windows command prompt (under Accessories)

Edited by WrathOf
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...