freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] GSoC-2017-kushal 46c66dc 46/70: Some corrections


From: Kushal K S V S
Subject: [freetype2] GSoC-2017-kushal 46c66dc 46/70: Some corrections
Date: Sun, 18 Mar 2018 11:21:16 -0400 (EDT)

branch: GSoC-2017-kushal
commit 46c66dcd32ab37208bc84cbcc067f39aed17d505
Author: Kushal K S V S <address@hidden>
Commit: Kushal K S V S <address@hidden>

    Some corrections
---
 tests/make_png/bitmap.c      | 40 ++++++++++++++++++++++++++++++++++++++++
 tests/make_png/bitmap.h      | 11 +++++------
 tests/make_png/make_sprite.c |  4 ++--
 3 files changed, 47 insertions(+), 8 deletions(-)

diff --git a/tests/make_png/bitmap.c b/tests/make_png/bitmap.c
index 0f7278c..db6d616 100644
--- a/tests/make_png/bitmap.c
+++ b/tests/make_png/bitmap.c
@@ -621,6 +621,46 @@ void Stitch(IMAGE* left, IMAGE* right, IMAGE* result){
   }
 }
 
+/* This prints table-headers to a HTML file for the list-view page */
+void Print_Head( FILE* fp, char* family, char* style, int size ){
+  fprintf(fp,
+  "<html>\n\
+    <head>\n\
+      <title>\n\
+        Glyph_Diff\n\
+      </title>\n\
+      <script src=\"script.js\" type=\"text/javascript\"></script>\n\
+      <link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">\n\
+    </head>\n\
+    <body>\n\
+    <div class=\"freeze\">\n\
+      <h4>Font Family: %s</h4>\n\
+      <h4>Style:       %s</h4>\n\
+      <p><b>%d</b>pt at <b>%d</b>ppi</p>\n\
+    </div>\n\
+    <table>\n\
+    <thead>\n\
+      <tr>\n\
+      <th onclick=\"sort_t(data,0,asc1);asc1*=-1;asc2=1;asc3=1;\">\n\
+        <a href=\"#\">Glyph Index</a>\n\
+      </th>\n\
+      <th onclick=\"sort_t(data,1,asc2);asc2*=-1;asc3=1;asc1=1;\">\n\
+        <a href=\"#\">Glyph Name</a>\n\
+      </th>\n\
+      <th onclick=\"sort_t(data,2,asc3);asc3*=-1;asc1=1;asc2=1;\">\n\
+        <a href=\"#\">Difference</a>\n\
+      </th>\n\
+      <th>\n\
+        Images\n\
+      </th>\n\
+      </tr>\n\
+    </thead>\n\
+    <tbody id=\"data\">\n", family,
+                             style,
+                              size,
+                               DPI );
+}
+
 /* This prints a row to the HTML file for the list-view page. */
 void Print_Row( FILE* fp, int index, char* name, int diff )
 {
diff --git a/tests/make_png/bitmap.h b/tests/make_png/bitmap.h
index c7fb26b..d74a081 100644
--- a/tests/make_png/bitmap.h
+++ b/tests/make_png/bitmap.h
@@ -72,15 +72,10 @@ void Make_PNG (FT_Bitmap* bitmap,IMAGE* fruit, int i,int 
render_mode);
 int Generate_PNG (IMAGE *bitmap, const char *path,int render_mode);   
 /* Read PNG */
 void Read_PNG(char *filename, IMAGE * after_effect);
-/* Add an effect using two PNG images */
-/* Base Glyph = Gray {127,0,0,255} OR as it is */
-/* Differences = Red {255,0,0,255} */
-/* Effect_ID = {1 or 2} */
+/* Add effects using two PNG images and generate an image*/
 int Add_effect(IMAGE* base, IMAGE* test, IMAGE* out, int Effect_ID);
 /* Stitch 2 PNG files */
 void Stitch(IMAGE* left, IMAGE* right, IMAGE* result);
-/* Print the row in list-view webpage */
-void Print_Row( FILE* fp, int index, char* name, int diff );
 /* Finding the first non-empty (non-white) column */
 int First_Column(IMAGE* input);
 /* Finding the first non-empty (non-white) row */
@@ -91,3 +86,7 @@ IMAGE* Append_Columns(IMAGE* small, IMAGE* big);
 IMAGE* Append_Rows(IMAGE* small, IMAGE* big);
 /* calculating the Pixel Differences */
 int Image_Diff( IMAGE* base, IMAGE* test);
+/* Print the row in list-view webpage */
+void Print_Row( FILE* fp, int index, char* name, int diff );
+/* Print the table-headers in list-view webpage */
+void Print_Head( FILE* fp, char* family, char* style, int size );
diff --git a/tests/make_png/make_sprite.c b/tests/make_png/make_sprite.c
index 8677882..40c324a 100644
--- a/tests/make_png/make_sprite.c
+++ b/tests/make_png/make_sprite.c
@@ -305,8 +305,8 @@ int main(int argc, char const *argv[])
   test_slot = test_face->glyph;
 
   struct stat st = {0};
-  if (stat("./images/", &st) == -1) {
-      mkdir("./images/", 0777);
+  if (stat("./html/", &st) == -1) {
+      mkdir("./html/", 0777);
   }
 
   if (stat("./html/images/", &st) == -1) {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]