diff --git a/tests/make_png/bitmap.c b/tests/make_png/bitmap.c
index 4ee3e564b..f00618457 100644
--- a/tests/make_png/bitmap.c
+++ b/tests/make_png/bitmap.c
@@ -453,8 +453,8 @@ void Print_Row( FILE* fp, int index, char* name, int diff )
%04d | \n\
%s | \n\
%04d | \n\
- | \n\
- \n", index, name, diff, index);
+ | \n\
+ \n", index, name, diff, name);
}
int First_Column(IMAGE* input){
diff --git a/tests/make_png/html/README b/tests/make_png/html/README
new file mode 100644
index 000000000..16091d123
--- /dev/null
+++ b/tests/make_png/html/README
@@ -0,0 +1 @@
+The HTML files generated are in this directory
\ No newline at end of file
diff --git a/tests/make_png/images/README b/tests/make_png/html/images/README
similarity index 100%
rename from tests/make_png/images/README
rename to tests/make_png/html/images/README
diff --git a/tests/make_png/script.js b/tests/make_png/html/script.js
similarity index 100%
rename from tests/make_png/script.js
rename to tests/make_png/html/script.js
diff --git a/tests/make_png/style.css b/tests/make_png/html/style.css
similarity index 100%
rename from tests/make_png/style.css
rename to tests/make_png/html/style.css
diff --git a/tests/make_png/make_sprite.c b/tests/make_png/make_sprite.c
index 603aa2b54..867788248 100644
--- a/tests/make_png/make_sprite.c
+++ b/tests/make_png/make_sprite.c
@@ -49,7 +49,7 @@ int main(int argc, char const *argv[])
FT_Error error;
int alignment = 4;
- char * output_file_name = ( char * )calloc(20,sizeof(char));
+ char * output_file_name = ( char * )calloc(50,sizeof(char));
IMAGE* base_png = (IMAGE*)malloc(sizeof(IMAGE));
IMAGE* test_png = (IMAGE*)malloc(sizeof(IMAGE));
@@ -309,6 +309,10 @@ int main(int argc, char const *argv[])
mkdir("./images/", 0777);
}
+ if (stat("./html/images/", &st) == -1) {
+ mkdir("./html/images/", 0777);
+ }
+
FILE* fp = fopen("index.html","w");
fprintf(fp,
@@ -455,8 +459,6 @@ int main(int argc, char const *argv[])
Stitch( combi_effect_1, combi_effect_2, output);
- Generate_PNG ( output, output_file_name, render_mode );
-
if (FT_HAS_GLYPH_NAMES(base_face))
{
FT_Get_Glyph_Name( base_face,
@@ -465,6 +467,10 @@ int main(int argc, char const *argv[])
50 );
}
+ sprintf( output_file_name, "./html/images/%s.png", glyph_name );
+
+ Generate_PNG ( output, output_file_name, render_mode );
+
Print_Row(fp,i,glyph_name,pixel_diff );
}
}