Description: Use system packaged unifont
Author: Anton Gladky <gladk@debian.org>
Last-Update: 2016-08-15

Index: solvespace/src/CMakeLists.txt
===================================================================
--- solvespace.orig/src/CMakeLists.txt
+++ solvespace/src/CMakeLists.txt
@@ -101,10 +101,10 @@ add_custom_command(
     OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/generated/bitmapfont.table.h
     COMMAND $<TARGET_FILE:unifont2c>
             ${CMAKE_CURRENT_BINARY_DIR}/generated/bitmapfont.table.h
-            ${CMAKE_CURRENT_SOURCE_DIR}/fonts/unifont-8.0.01.hex.gz
+            /usr/share/unifont/unifont.hex
             ${chars}
     DEPENDS unifont2c
-            ${CMAKE_CURRENT_SOURCE_DIR}/fonts/unifont-8.0.01.hex.gz
+            /usr/share/unifont/unifont.hex
             ${chars}
     VERBATIM)
 
Index: solvespace/tools/unifont2c.cpp
===================================================================
--- solvespace.orig/tools/unifont2c.cpp
+++ solvespace/tools/unifont2c.cpp
@@ -118,17 +118,17 @@ int main(int argc, char** argv) {
         properties[codepoint].exists = true;
     }
 
-    gzFile unifont = gzopen(argv[2], "rb");
+    FILE *unifont = fopen(argv[2], "rb");
     if(!unifont)
         die("unifont fopen failed");
 
     while(1) {
         char buf[100];
-        if(!gzgets(unifont, buf, sizeof(buf))){
-            if(gzeof(unifont)) {
+        if(!fgets(buf, sizeof(buf), unifont)){
+            if(feof(unifont)) {
                 break;
             } else {
-                die("unifont gzgets failed");
+                die("unifont gets failed");
             }
         }
 
@@ -164,7 +164,7 @@ int main(int argc, char** argv) {
         properties[codepoint].isWide = isWide;
     }
 
-    gzclose(unifont);
+    fclose(unifont);
 
     FILE *source = fopen(argv[1], "wt");
     if(!source)
