README-test_data.txt
1To generate test data:
2In the current directory (tools/):
3
41. XML test data, run:
5 $ python generate_test_data_xml.py
6
72. C++ test data (.h file containing the list of fonts to be tested), run:
8 $ python generate_file_list_cc.py
9 (after having generated the xml data)
10
11By default the XML files are put in the same folder as the font they were
12created from and the CMap test data is put in $PWD.
13
14To get the list of paramters for both scripts run them with the --help option.
15
16When adding new fonts to data/fonts/ (possibly by cloning the Google Web Fonts
17directory), run the cleanup script:
18 $ python clean_fonts_repo.py
19to delete all files that are not {.ttf, .ttc, .otf, OFL.txt} and all files that
20are more than 1 level deep from a font's folder.
21(e.g. for copse/ it will delete all subfolders of copse/ and should only leave
22the font and the license file untouched - and possibly an empty src folder;
23however since empty folders are not added to git, they will be discarded when
24committing the new fonts).
25
README_xml.txt
1Commented test data sample
2--------------------------
3All of the attributes are REQUIRED unless otherwise noted.
4
5<font_test_data (table information under here)
6 path="Tuffy.ttf" (path to the font file)
7 post_name="Tuffy" (postscript name of the font; OPTIONAL)
8 sha1="59a4bf055e1fd30d56ecc89760861fa0655252bb" (sha1 of the font file)
9 >
10 <cmap_table (cmap information under here)
11 num_cmaps="3" (number of cmaps in the original file)
12 >
13 <cmap (mappings under here)
14 byte_length="288" (length of the original cmap)
15 encoding_id="3" (encoding id of the cmap)
16 format="4" (format of the cmap)
17 language="0" (language of the cmap)
18 num_chars="195" (original cmap)
19 platform_id="0" (platform id for the cmap)
20 >
21 <map (mapping from char to gid)
22 char="0x020ac" (hex value of the code point being mapped)
23 gid="196" (glyph id corresponding to the code point)
24 name="Euro" (name of the unicode character; OPTIONAL)
25 />
26 </cmap>
27 </cmap_table>
28</font_test_data>
29