freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] GSoC-2017-kushal 6f79ed8 4/4: Generating files based on new


From: Kushal K S V S
Subject: [freetype2] GSoC-2017-kushal 6f79ed8 4/4: Generating files based on new file structure
Date: Thu, 22 Mar 2018 07:09:46 -0400 (EDT)

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

    Generating files based on new file structure
---
 .DS_Store                        | Bin 10244 -> 10244 bytes
 tests/html/.DS_Store             | Bin 6148 -> 6148 bytes
 tests/html/source/.DS_Store      | Bin 6148 -> 6148 bytes
 tests/html/source/scripts/top.js |  18 ++++----
 tests/runme.sh                   |  89 +++++++++++++++++++++------------------
 5 files changed, 57 insertions(+), 50 deletions(-)

diff --git a/.DS_Store b/.DS_Store
index 4b65ed6..c279271 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/tests/html/.DS_Store b/tests/html/.DS_Store
index d2b7c70..94b74a6 100644
Binary files a/tests/html/.DS_Store and b/tests/html/.DS_Store differ
diff --git a/tests/html/source/.DS_Store b/tests/html/source/.DS_Store
index e946f9b..5622a87 100644
Binary files a/tests/html/source/.DS_Store and b/tests/html/source/.DS_Store 
differ
diff --git a/tests/html/source/scripts/top.js b/tests/html/source/scripts/top.js
index dc9c977..a308f7f 100644
--- a/tests/html/source/scripts/top.js
+++ b/tests/html/source/scripts/top.js
@@ -1,12 +1,14 @@
 // If any value in the 'select' list(s) changes, the corresponding
 // HTML document is loaded in frame_1.
 function change() {
-       var dpi = document.getElementById('dpi').value;
-       var font = document.getElementById('font').value;
-       var mode = document.getElementById('mode').value;
-       var size = document.getElementById('size').value;
-       var frame = document.getElementById('frame_1');
-  var string = "pages/"+dpi+"/"+font+"/"+mode+"/"+size+"/index.html";
+  var dpi = document.getElementById('dpi').value;
+  var font = document.getElementById('font').value;
+  var mode = document.getElementById('mode').value;
+  var size = document.getElementById('size').value;
+  var frame = document.getElementById('frame_1');
+  var font_type = font.substring(font.indexOf('.')+1) // Font file extension
+  var font_name = font.split('.')[0] // Font name without extension
+  var string = 
"pages/"+dpi+"/"+font_type+"/"+font_name+"/"+mode+"/"+size+"/index.html";
   frame.src = string;
 }
 // Function to sort the columns of the table when you click on the header
@@ -113,6 +115,6 @@ function topFunction() {
 }
 // Function to pause/play the animation
 function pause_play() {
-       var div = frame_2.document.getElementById('animation');
-       div.classList.toggle('pause');
+  var div = frame_2.document.getElementById('animation');
+  div.classList.toggle('pause');
 }
\ No newline at end of file
diff --git a/tests/runme.sh b/tests/runme.sh
index 6b4e359..22d6603 100755
--- a/tests/runme.sh
+++ b/tests/runme.sh
@@ -21,78 +21,83 @@ touch ./html/top.html
 # Generating top.html file
 echo "
 <!DOCTYPE html>
-  <head>
-    <title> FreeType Test Framework </title>
-    <script type=\"text/javascript\" src =\"source/scripts/top.js\" ></script>
-    <link rel=\"stylesheet\" type=\"text/css\" href=\"source/styles/top.css\">
-  </head>
-  <html>
-    <body onload=\"change()\">
-      <div id=\"top_info\">
-        <p><b>Base Version:</b> $FT_TEST_BASE_DLL<br>
-           <b>Test Version:</b> $FT_TEST_TEST_DLL
-        </p>
-      </div>
-      <iframe id=\"frame_1\" name=\"frame_1\" src=\"\" ></iframe>
-      <iframe id=\"frame_2\" name=\"frame_2\" src=\"source/diff.html\" 
></iframe>">./html/top.html
+<head>
+<title> FreeType Test Framework </title>
+<script type=\"text/javascript\" src =\"source/scripts/top.js\" ></script>
+<link rel=\"stylesheet\" type=\"text/css\" href=\"source/styles/top.css\">
+</head>
+<html>
+<body onload=\"change()\">
+<div id=\"top_info\">
+<p><b>Base Version:</b> $FT_TEST_BASE_DLL<br>
+<b>Test Version:</b> $FT_TEST_TEST_DLL
+</p>
+</div>
+<iframe id=\"frame_1\" name=\"frame_1\" src=\"\" ></iframe>
+<iframe id=\"frame_2\" name=\"frame_2\" src=\"source/diff.html\" 
></iframe>">./html/top.html
 #####################################################################
 # Filling html/top.html file with links to all the index.html files.
+x="";
+y="";
 for i in $FT_TEST_DPI; do
-  mkdir ./html/pages/$i
-  for j in $FT_TEST_FONT_FILE; do
-    mkdir ./html/pages/$i/$j
-    for k in $FT_TEST_RENDER_MODE; do
-      mkdir ./html/pages/$i/$j/$k
-      for l in $FT_TEST_PT_SIZE; do
-        mkdir ./html/pages/$i/$j/$k/$l
-        mkdir ./html/pages/$i/$j/$k/$l/images
-        ./tests $FT_TEST_BASE_DLL $FT_TEST_TEST_DLL $j $l $k $i
-      done
-    done
-  done
+mkdir ./html/pages/$i
+for j in $FT_TEST_FONT_FILE; do
+eval x="$( cut -d '.' -f 2- <<< "$j" )"; #Font file type / extension
+eval y="$( cut -d '.' -f 1 <<< "$j" )"; #Font file name
+mkdir ./html/pages/$i/$x
+mkdir ./html/pages/$i/$x/$y
+for k in $FT_TEST_RENDER_MODE; do
+mkdir ./html/pages/$i/$x/$y/$k
+for l in $FT_TEST_PT_SIZE; do
+mkdir ./html/pages/$i/$x/$y/$k/$l
+mkdir ./html/pages/$i/$x/$y/$k/$l/images
+./tests $FT_TEST_BASE_DLL $FT_TEST_TEST_DLL $j $l $k $i
+done
+done
+done
 done
 #####################################################################
 # Buttons for animation selection
 echo '<div id="select_animation">
-        <button onclick="class_one_two()">One-Two</button>
-        <button onclick="class_one_three()">One-Three</button>
-        <button onclick="class_one_four()">One-Four</button>&nbsp&nbsp
-        <button onclick="pause_play()" id="pause_btn"> Pause|Play </button>
-      </div>
-      <div class="select">'>>./html/top.html
+<button onclick="class_one_two()">One-Two</button>
+<button onclick="class_one_three()">One-Three</button>
+<button onclick="class_one_four()">One-Four</button>&nbsp&nbsp
+<button onclick="pause_play()" id="pause_btn"> Pause|Play </button>
+</div>
+<div class="select">'>>./html/top.html
 #####################################################################
 # Populating the selection lists with options
 echo '<label>DPI&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp:<select name="dpi" 
id="dpi" onchange="change()">'>>./html/top.html
 for i in $FT_TEST_DPI; do
-  echo "  <option value= $i > $i </option>">>./html/top.html
+echo "  <option value= $i > $i </option>">>./html/top.html
 done
 echo '</select>
-    </label><br>'>>./html/top.html
+</label><br>'>>./html/top.html
 #####################################################################
 echo '<label>Font&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp:<select name="font" 
id="font" onchange="change()">'>>./html/top.html
 for i in $FT_TEST_FONT_FILE; do
-  echo "  <option value= $i > $i </option>">>./html/top.html
+echo "  <option value= $i > $i </option>">>./html/top.html
 done
 echo '</select>
-    </label><br>'>>./html/top.html
+</label><br>'>>./html/top.html
 #####################################################################
 echo '<label>Render Mode:<select name="mode" id="mode" 
onchange="change()">'>>./html/top.html
 for i in $FT_TEST_RENDER_MODE; do
-  echo "  <option value= $i > $i </option>">>./html/top.html
+echo "  <option value= $i > $i </option>">>./html/top.html
 done
 echo '</select>
-    </label><br>'>>./html/top.html
+</label><br>'>>./html/top.html
 #####################################################################
 echo '<label>Point Size&nbsp:<select name="size" id="size" 
onchange="change()">'>>./html/top.html
 for i in $FT_TEST_PT_SIZE; do
-  echo "  <option value= $i > $i </option>">>./html/top.html
+echo "  <option value= $i > $i </option>">>./html/top.html
 done
 echo '</select>
-    </label><br>'>>./html/top.html
+</label><br>'>>./html/top.html
 #####################################################################
 echo '</div>
-    </body>
-  </html>'>>./html/top.html
+</body>
+</html>'>>./html/top.html
 #####################################################################
 echo "Font       : " $FT_TEST_FONT_FILE
 echo "Point Size : " $FT_TEST_PT_SIZE



reply via email to

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