diff options
author | Kushal K S V S <kkushal32@gmail.com> | 2017-08-06 11:43:02 -0700 |
---|---|---|
committer | Kushal K S V S <kkushal32@gmail.com> | 2018-03-18 20:40:44 +0530 |
commit | 0a920f8028fec9bf3c4d563c106eb20f1588c072 (patch) | |
tree | 7efe2d050f07ea8c88a90e850d83158a2b7eaa1e | |
parent | 2b001c149d10d57d4f212261c2f28ac6f408bee9 (diff) | |
download | freetype2-0a920f8028fec9bf3c4d563c106eb20f1588c072.tar.gz |
Changing image names and location
-rw-r--r-- | tests/make_png/bitmap.c | 4 | ||||
-rw-r--r-- | tests/make_png/html/README | 1 | ||||
-rw-r--r-- | tests/make_png/html/images/README (renamed from tests/make_png/images/README) | 0 | ||||
-rw-r--r-- | tests/make_png/html/script.js (renamed from tests/make_png/script.js) | 0 | ||||
-rw-r--r-- | tests/make_png/html/style.css (renamed from tests/make_png/style.css) | 0 | ||||
-rw-r--r-- | tests/make_png/make_sprite.c | 12 |
6 files changed, 12 insertions, 5 deletions
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 ) <td>%04d</td>\n\ <td>%s</td>\n\ <td>%04d</td>\n\ - <td id=\"image_row\"><img id=\"sprite\" src=\"images/sprite_%04d.png\"></td>\n\ - </tr>\n", index, name, diff, index); + <td id=\"image_row\"><img id=\"sprite\" src=\"images/%s.png\"></td>\n\ + </tr>\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 index 96f91f238..96f91f238 100644 --- a/tests/make_png/images/README +++ b/tests/make_png/html/images/README diff --git a/tests/make_png/script.js b/tests/make_png/html/script.js index 274538fbb..274538fbb 100644 --- a/tests/make_png/script.js +++ b/tests/make_png/html/script.js diff --git a/tests/make_png/style.css b/tests/make_png/html/style.css index 281b5806b..281b5806b 100644 --- a/tests/make_png/style.css +++ b/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 ); } } |