4 You can use your Ubuntu box (>= 8.04. 9.10 is recommended) to test OTS library.
6 First, install TrueType and OpenType fonts to the Ubuntu box as many as
9 % sudo apt-get install ttf-.*[^0]$
11 Then, put malicious TrueType fonts on `~/malicious/`. For details, please check
12 http://code.google.com/p/chromium/issues/detail?id=27139#c2. Currently access
13 to the issue is limited to chromium-security team members for security reasons.
16 % tar xjf ~/ttf-testsuite.tar.bz2
21 In order to verify that:
23 1. OTS does not reject these unmalicious fonts.
24 2. and transcoded fonts OTS generates can be loaded by a system font renderer (FreeType2).
26 Run `test_unmalicious_fonts.sh` script:
28 % cd /path/to/ots/tests
29 % ./test_unmalicious_fonts.sh
30 ............................................... (verify that no FAIL: is displayed)
32 Then in order to verify that:
34 1. OTS can reject malicious fonts
35 2. or transcoded fonts generated by OTS do not crash a system font renderer (FreeType2).
37 Run `test_malicious_fonts.sh` script:
39 % cd /path/to/ots/tests
40 % ./test_malicious_fonts.sh
41 ............................................... (verify that no FAIL: is displayed)
46 We have some command line tools for tests. To build them:
50 % gyp --depth=. -f make ots-standalone.gyp
52 (tool is located at build/Default directory)
54 - On Windows (VC++ is needed):
56 % gyp --depth=. -f msvs ots-standalone.gyp
57 % devenv.exe /build Default ots-standalone.sln /project idempotent.vcproj
58 (tool is located at Default directory)
60 - On Mac (XCode is needed):
62 % gyp --depth=. -f xcode ots-standalone.gyp
63 % xcodebuild -configuration Default -project ots-standalone.xcodeproj -target All
64 (tool is located at build/Default directory)
66 You can use `idempotent` tool to check whether a font will be rejected or not.
67 You can also use `ot-sanitise` tool to get sanitised font (it is available on
68 Linux for now). See README file in the test directory for more details.