1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
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)
|