@@ -2487,29 +2487,12 @@ def test_freetype(self):
24872487 # copy the Liberation Sans Bold truetype file located in the
24882488 # <emscripten_root>/test/freetype to the compilation folder
24892489 shutil.copy2(test_file('freetype/LiberationSansBold.ttf'), os.getcwd())
2490+ self.emcc_args += ['--embed-file', 'LiberationSansBold.ttf']
24902491 # the test program will print an ascii representation of a bitmap where the
2491- # 'w' character has been rendered using the Liberation Sans Bold font
2492- expectedOutput = ' \n' + \
2493- ' \n' + \
2494- ' \n' + \
2495- ' \n' + \
2496- '*** +***+ \n' + \
2497- '***+ ***** +\n' + \
2498- '+**+ ***** +\n' + \
2499- '+*** +**+**+ *\n' + \
2500- ' ***+ ***+**+ +*\n' + \
2501- ' +**+ *** *** +*\n' + \
2502- ' +**++**+ +**+**\n' + \
2503- ' ***+**+ +**+**\n' + \
2504- ' ****** *****\n' + \
2505- ' +****+ +****\n' + \
2506- ' +****+ +****\n' + \
2507- ' **** ****'
2508- # build test program with the font file embed in it
2509- self.do_runf('freetype_test.c', expectedOutput,
2510- emcc_args=['-sUSE_FREETYPE', '--embed-file', 'LiberationSansBold.ttf'])
2511- self.do_runf('freetype_test.c', expectedOutput,
2512- emcc_args=['--use-port=freetype', '--embed-file', 'LiberationSansBold.ttf'])
2492+ # 'w' character has been rendered using the Liberation Sans Bold font.
2493+ # See test_freetype.out
2494+ self.do_run_in_out_file_test('test_freetype.c', emcc_args=['-sUSE_FREETYPE'])
2495+ self.do_run_in_out_file_test('test_freetype.c', emcc_args=['--use-port=freetype'])
25132496
25142497 @requires_network
25152498 def test_freetype_with_pthreads(self):
0 commit comments