summaryrefslogtreecommitdiff
path: root/tests/make_png/README
blob: 6bb3a68d7ffd8a000b69be90ac0677bab9d03287 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
NOTE: First make freetype library (in the ../../ directory)
  make devel
  make

NOTE: 	Right now, the sprite sheets are generated stitching the base and test glyph 
		together. 
TODO:   Monochrome sprite sheets.
		Sprite sheets with more sub-images (visual effects).

To generate hashes and store it in the ./hashes folder,

1)  make hash
		(set resoluton in DPI by passing argument
		example: sudo make DPI=100, if not specified,default is 72)

2) 	Usage   ./hash <font_file> <pt_size> <render_mode>
	
    Hashes will be saved in a file named 
    $(font)_$(pt_size)_$(render_mode).hash 

    By default, hashes of 256-level gray bitmaps will be generated

    Values for render_mode    0 - monochrome
                              1 - anti-aliased
                              2 - lcd horizontal
                              3 - lcd vertical

To generate 32-bit RGBA PNG(s) of all glyphs in a font\n
  
1)  make png
		(set resoluton in DPI by passing argument
  	example: sudo make DPI=100, if not specified,default is 72)

2) 	Usage   ./<exe> <font_file> <pt_size> <render_mode>

	  Images will be saved in a file named 
	  $(font)_$(pt_size)_$(render_mode)_$(glyph_index).png

	  By default, hashes of 256-level gray bitmaps will be generated

	  Values for render_mode    0 - monochrome
	                            1 - anti-aliased
	                            2 - lcd horizontal-RGB
	                            3 - lcd horizontal-BGR
	                            4 - lcd vertical-RGB
                            5 - lcd vertical-BGR

To generate sprite sheets,
First compile and install two versions of the FreeType libray in different folders 
(with SUBPIXEL_RENDERING enabled in ftoption.h)


1)  make sprite
		(set resoluton in DPI by passing argument
  	example: sudo make DPI=100, if not specified,default is 72)

2) 	Usage ./sprite <base_version .so> <test_version .so> <font_file> <pt_size> <render_mode>

		The path to the "shared library files" in usage should be absolute.

		Sprite Sheets will be saved as sprite_$(glyph_index).png

		Render modes similar to generating PNG(s).