freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] ksvsk_test f8579e4: Fixed folder errors


From: Kushal K S V S
Subject: [freetype2] ksvsk_test f8579e4: Fixed folder errors
Date: Tue, 27 Jun 2017 17:25:17 -0400 (EDT)

branch: ksvsk_test
commit f8579e43251143f97825eba0ceb1f5726712fd4f
Author: Kushal K S V S <address@hidden>
Commit: Kushal K S V S <address@hidden>

    Fixed folder errors
---
 final/README         | 16 ++++++++++++++++
 final/bitmap.h       |  2 --
 final/hash_to_file.c |  5 -----
 final/makefile       |  4 +---
 4 files changed, 17 insertions(+), 10 deletions(-)

diff --git a/final/README b/final/README
new file mode 100644
index 0000000..a01ac2d
--- /dev/null
+++ b/final/README
@@ -0,0 +1,16 @@
+To generate hashes and store it in the same folder,
+
+       1) sudo make 
+               (set resoluton in DPI by passing argument
+                       example: sudo make DPI=100, if not specified,default is 
72)
+
+       2) Usage   ./hash <font_file> <pt_size> <render_mode>
+       
+        Hashes will be saved in a file named 
$(font)_$(pt_size)_$(render_mode).hash 
+
+        By default, hashes of 256-level gray bitmaps will be generated
+
+        Values for render_mode    0 - monochrome
+                                  1 - anti-aliased
+                                  2 - lcd horizontal-RGB
+                                  3 - lcd vertical-RGB
\ No newline at end of file
diff --git a/final/bitmap.h b/final/bitmap.h
index 8ad333a..fb7ab12 100644
--- a/final/bitmap.h
+++ b/final/bitmap.h
@@ -1,8 +1,6 @@
 #include <stdio.h>
 #include <ft2build.h>
 #include "murmur3.h"            // MurmurHash3_x64_128 header file
-#include <sys/types.h>
-#include <sys/stat.h>
 #include <unistd.h>
 
 #include FT_FREETYPE_H
diff --git a/final/hash_to_file.c b/final/hash_to_file.c
index dc4cb04..64000be 100644
--- a/final/hash_to_file.c
+++ b/final/hash_to_file.c
@@ -98,11 +98,6 @@ int main (int argc, char const *argv[])
 
        slot = face->glyph;
 
-    struct stat st = {0};
-    if (stat("/some/directory", &st) == -1) {
-        mkdir("/some/directory", 0700);
-    }
-
        FILE* fp;
 
        sprintf(name,"./hashes/%s_%d_%s.hash",font_file,
diff --git a/final/makefile b/final/makefile
index 8f5bb70..4a7e9cb 100644
--- a/final/makefile
+++ b/final/makefile
@@ -1,5 +1,3 @@
-# Define required macros here
-
 SHELL = /bin/sh
 
 SRC = hash_to_file.c bitmap.c murmur3.c 
@@ -10,7 +8,7 @@ CC = gcc
 INCLUDE = -I /usr/local/include/freetype2/ 
 LIBS = -lfreetype
 
-DPI = 100
+DPI = 72
 
 hash:$(SRC)
        $(CC) $(CFLAGS) $(INCLUDE) -DDPI=$(DPI) -o $@  $(SRC) $(OBJS) $(LIBS)



reply via email to

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