Difference between revisions of "How to Add Characters and Icons to the Font"

From The Powder Toy
Jump to: navigation, search
(added the info)
 
(Text formating and fixed some of my bad grammer)
Line 2: Line 2:
  
  
if you downloaded the source from github you would have a folder called font if you look in side you will see that there is packer.c, unpacker.c and editor.c.  
+
If you downloaded the source from github you would have a folder called font if you look in side you will see that there is packer.c, unpacker.c and editor.c, if you don't see it then you either downloaded the source code off the website powdertoy.co.uk or you deleted it somehow, if this is the case re-download it from here [https://github.com/FacialTurd/The-Powder-Toy The-Powder-Toy]
  
1) copy font.h from /includes and paste it into /font.
+
'''1)''' copy font.h from /includes and paste it into /font.
  
2) compile the editor, unpacker and packer i am not sure how one would do this on windows but on linux it would just be make editor unpacker packer  
+
'''2)''' compile the editor, unpacker and packer i am not sure how one would do this on windows but on linux it would just be make editor unpacker packer  
  
3) open cmd prompt/terminal and change the directory to /The-Powder-Toy and run  
+
'''3)''' open cmd prompt/terminal and change the directory to /The-Powder-Toy and run  
 
linux: ./unpacker >> font.bin
 
linux: ./unpacker >> font.bin
 
windows: not sure it might be similar to linux  
 
windows: not sure it might be similar to linux  
  
4) you would now have a file called font.bin it is a file that /font that is what is needed to run the editor with the current icons tpt use.  
+
'''4)''' you would now have a file called font.bin it is a file that /font that is what is needed to run the editor with the current icons tpt use.  
  
5) run the editor via cmd/terminal and then press space/backspace to find an empty character, it may be a thermometer if it is just erase it via right clicking and left clicking in the drawing field. now draw you character and look in cmd/terminal and the last number you will see there is the char id and it corresponds to what icon you drew.
+
'''5)''' run the editor via cmd/terminal and then press space/backspace to find an empty character, it may be a thermometer if it is just erase it via right clicking and left clicking in the drawing field. now draw you character and look in cmd/terminal and the last number you will see there is the char id and it corresponds to what icon you drew.
  
6) close down the editor and delete the font.h then run:
+
'''6)''' close down the editor and delete the font.h then run:
 
linux: ./packer >> font.h
 
linux: ./packer >> font.h
 
windows : not sure
 
windows : not sure
  
7) copy the new font.h into /includes replacing the old one.  
+
'''7)''' copy the new font.h into /includes replacing the old one.  
  
8) for your new menu set the char id to what i told you to remember before.  
+
'''8)''' for your new menu set the char id to what i told you to remember before.  
 
etc: {"\xFF", "new menu ftw", 0, 1},
 
etc: {"\xFF", "new menu ftw", 0, 1},
 
FF is the char id.  
 
FF is the char id.  
  
9) recompile and you should be ready to go.
+
'''9)''' recompile and you should be ready to go.

Revision as of 12:06, 31 January 2012

Adding an Icon to menus

If you downloaded the source from github you would have a folder called font if you look in side you will see that there is packer.c, unpacker.c and editor.c, if you don't see it then you either downloaded the source code off the website powdertoy.co.uk or you deleted it somehow, if this is the case re-download it from here The-Powder-Toy

1) copy font.h from /includes and paste it into /font.

2) compile the editor, unpacker and packer i am not sure how one would do this on windows but on linux it would just be make editor unpacker packer

3) open cmd prompt/terminal and change the directory to /The-Powder-Toy and run linux: ./unpacker >> font.bin windows: not sure it might be similar to linux

4) you would now have a file called font.bin it is a file that /font that is what is needed to run the editor with the current icons tpt use.

5) run the editor via cmd/terminal and then press space/backspace to find an empty character, it may be a thermometer if it is just erase it via right clicking and left clicking in the drawing field. now draw you character and look in cmd/terminal and the last number you will see there is the char id and it corresponds to what icon you drew.

6) close down the editor and delete the font.h then run: linux: ./packer >> font.h windows : not sure

7) copy the new font.h into /includes replacing the old one.

8) for your new menu set the char id to what i told you to remember before. etc: {"\xFF", "new menu ftw", 0, 1}, FF is the char id.

9) recompile and you should be ready to go.