From d8e07e8ad3bf1dad1b8fc6e7ad90b922b3648161 Mon Sep 17 00:00:00 2001 From: Kushal K S V S Date: Mon, 7 Aug 2017 12:25:21 -0700 Subject: [PATCH] Some corrections --- tests/make_png/make_sprite.c | 62 +++++++++--------------------------- 1 file changed, 15 insertions(+), 47 deletions(-) diff --git a/tests/make_png/make_sprite.c b/tests/make_png/make_sprite.c index 40c324aea..73a2feebf 100644 --- a/tests/make_png/make_sprite.c +++ b/tests/make_png/make_sprite.c @@ -2,16 +2,6 @@ int main(int argc, char const *argv[]) { - const char* base_version; - const char* test_version; - const char* font_file; - int size; - int render_mode; - - int load_flag; /* FT_LOAD_XXX */ - int render_flag; /* FT_RENDER_MODE_XXX */ - int target_flag; /* FT_LOAD_TARGET_XXX */ - if(argc != 6) { printf("Usage: ./sprite \ @@ -27,6 +17,18 @@ int main(int argc, char const *argv[]) return 0; } +/*******************************************************************/ + /* variables declaration */ + const char* base_version; + const char* test_version; + const char* font_file; + int size; + int render_mode; + + int load_flag; /* FT_LOAD_XXX */ + int render_flag; /* FT_RENDER_MODE_XXX */ + int target_flag; /* FT_LOAD_TARGET_XXX */ + base_version = argv[1]; test_version = argv[2]; @@ -304,6 +306,7 @@ int main(int argc, char const *argv[]) base_slot = base_face->glyph; test_slot = test_face->glyph; + /* If folders aren't there, create folders */ struct stat st = {0}; if (stat("./html/", &st) == -1) { mkdir("./html/", 0777); @@ -314,43 +317,8 @@ int main(int argc, char const *argv[]) } FILE* fp = fopen("index.html","w"); - - fprintf(fp, - "\n\ - \n\ - \n\ - Glyph_Diff\n\ - \n\ - \n\ - \n\ - \n\ - \n\ -
\n\ -

Font Family: %s

\n\ -

Style: %s

\n\ -

%dpt at %dppi

\n\ -
\n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n\ - \n", base_face->family_name, - base_face->style_name, - size, - DPI); + + Print_Head(fp,base_face->family_name, base_face->style_name, size); /* Need to write code to check the values in FT_Face and compare */ for ( i = 0; i < base_face->num_glyphs; ++i)
\n\ - Glyph Index\n\ - \n\ - Glyph Name\n\ - \n\ - Difference\n\ - \n\ - Images\n\ -