summaryrefslogtreecommitdiff
path: root/tests/web_interface/generate-old-hashes.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/web_interface/generate-old-hashes.c')
-rw-r--r--tests/web_interface/generate-old-hashes.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/tests/web_interface/generate-old-hashes.c b/tests/web_interface/generate-old-hashes.c
deleted file mode 100644
index 13b6304af..000000000
--- a/tests/web_interface/generate-old-hashes.c
+++ /dev/null
@@ -1,64 +0,0 @@
-#include "bitmap.h"
-
-int main(int argc, char const * argv[])
-{
- FT_Library library;
- FT_Face face;
- FT_GlyphSlot slot;
- FT_Bitmap * bitmap;
- FT_UInt32 size;
-
- const char * filename;
-
- int i;
-
- FILE * fp = fopen("old-hashes.txt", "w");
-
- filename = argv[1];
- size = atoi(argv[2]);
-
- if (FT_Init_FreeType(&library))
- {
- printf("Error: library init.\n");
- }
-
- if (FT_New_Face(library, filename, 0, &face))
- {
- printf("Error: loading face.\n");
- }
-
- if (FT_Set_Char_Size(face, size * 64, 0, 96, 0))
- {
- printf("Error: setting char size.\n");
- }
-
- slot = face->glyph;
-
- for (i = 0; i < face->num_glyphs; ++i)
- {
- if (FT_Load_Glyph(face, i, FT_LOAD_DEFAULT))
- {
- printf("Error: loading glyph.\n");
- }
-
- if (FT_Render_Glyph(slot, FT_RENDER_MODE_NORMAL))
- {
- printf("Error: rendering glyph.\n");
- }
-
- bitmap = &slot->bitmap;
-
- HASH_128 * murmur = (HASH_128 *)malloc(sizeof(HASH_128));
- murmur = Generate_Hash_x64_128(bitmap, murmur);
-
- fprintf(fp, "%08x%08x%08x%08x\n", murmur->hash[0], murmur->hash[1], murmur->hash[2], murmur->hash[3]);
- }
-
- fclose(fp);
-
- FT_Done_Face(face);
- FT_Done_FreeType(library);
-
- return 0;
-
-} \ No newline at end of file