Skip to content

Commit e24cc12

Browse files
committed
Merge branch 'sm-worker-package-fetch' of github.com:seanmorris/emscripten into sm-worker-package-fetch
2 parents f622a0d + 4168338 commit e24cc12

File tree

7 files changed

+26
-29
lines changed

7 files changed

+26
-29
lines changed

src/library_ccall.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ addToLibrary({
3232
'string': (str) => {
3333
var ret = 0;
3434
if (str !== null && str !== undefined && str !== 0) { // null string
35-
// at most 4 bytes per UTF-8 code point, +1 for the trailing '\0'
3635
ret = stringToUTF8OnStack(str);
3736
}
3837
return {{{ to64('ret') }}};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
122623
1+
122625
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
232930
1+
232924
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
19421
1+
19416

test/freetype_test.c renamed to test/test_freetype.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ main( int argc,
9494
int target_height;
9595
int n, num_chars;
9696

97-
filename = "LiberationSansBold.ttf";
97+
filename = "LiberationSansBold.ttf";
9898
text = "w";
9999
num_chars = strlen( text );
100100
WIDTH = 16;
@@ -143,6 +143,5 @@ main( int argc,
143143
FT_Done_Face ( face );
144144
FT_Done_FreeType( library );
145145

146-
147146
return 0;
148147
}

test/test_freetype.out

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
3+
4+
5+
*** +***+
6+
***+ ***** +
7+
+**+ ***** +
8+
+*** +**+**+ *
9+
***+ ***+**+ +*
10+
+**+ *** *** +*
11+
+**++**+ +**+**
12+
***+**+ +**+**
13+
****** *****
14+
+****+ +****
15+
+****+ +****
16+
**** ****

test/test_other.py

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2487,34 +2487,17 @@ 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):
25162499
# Verify that freetype supports compilation requiring pthreads
2517-
self.emcc(test_file('freetype_test.c'), ['-pthread', '-sUSE_FREETYPE'], output_filename='a.out.js')
2500+
self.emcc(test_file('test_freetype.c'), ['-pthread', '-sUSE_FREETYPE'], output_filename='a.out.js')
25182501

25192502
@requires_network
25202503
def test_icu(self):

0 commit comments

Comments
 (0)