diff options
author | Björn Stenberg <bjorn@haxx.se> | 2002-08-11 09:36:25 +0000 |
---|---|---|
committer | Björn Stenberg <bjorn@haxx.se> | 2002-08-11 09:36:25 +0000 |
commit | 0cbd1912cced9158dfb97a18d98565463b6997b8 (patch) | |
tree | c1845ca1037fc85b7223735e8d6047ac7a225515 /tools | |
parent | dd7d69515391322e37215fad385ff2c59f80a68b (diff) |
Forgot to add new files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1669 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bdf2ajf.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/tools/bdf2ajf.h b/tools/bdf2ajf.h new file mode 100644 index 0000000000..6367fae00b --- /dev/null +++ b/tools/bdf2ajf.h @@ -0,0 +1,90 @@ +/** +* Copyright (C) 2002 Alex Gitelman +* +*/ +#ifndef __BDF2AJF__ +#define __BDF2AJF__ + +#include "../firmware/ajf.h" + + +#define STARTFONT "STARTFONT" +#define ENDFONT "ENDFONT" +#define COMMENT "COMMENT" +#define FONT "FONT" +#define SIZE "SIZE" +#define FONTBOUNDINGBOX "FONTBOUNDINGBOX" +#define STARTPROPERTIES "STARTPROPERTIES" +#define ENDPROPERTIES "ENDPROPERTIES" +#define CHARS "CHARS" +#define STARTCHAR "STARTCHAR" +#define ENDCHAR "ENDCHAR" +#define ENCODING "ENCODING" +#define SWIDTH "SWIDTH" +#define DWIDTH "DWIDTH" +#define BBX "BBX" +#define BITMAP "BITMAP" + +typedef struct +{ + char *glyph_name; + int encoding; + int swidth_x; + int swidth_y; + int dwidth_x; + int dwidth_y; + int bbx_width; + int bbx_height; + int bbx_disp_x; + int bbx_disp_y; + unsigned char *bitmap; + short bitmap_len; +} BDF_GLYPH; + +typedef struct +{ + char *bdf_ver; + char *name; + int point_size; + int x_res; + int y_res; + int bound_width; + int bound_height; + int bound_disp_x; + int bound_disp_y; + int prop_count; + char **prop_name; + char **prop_value; + int char_count; + BDF_GLYPH** glyph; + BDF_GLYPH* enc_table[256]; +} BDF; + +typedef union +{ + unsigned char db[2]; + unsigned short sval; +} DOUBLE_BYTE; + +BDF* readFont(const char *name); +BDF_GLYPH* getGlyph(unsigned char c, BDF* bdf, short* enc_map); +void getBitmap(BDF_GLYPH* g, unsigned char* src); + +void test_print(unsigned char c, BDF* font, short *map); +void test_print2(unsigned char *src, int height, int len); + + +extern short win_koi_map[]; + +extern int _font_error_code; +extern char _font_error_msg[]; +void report_error(int code, const char *msg); +void writeAJF(BDF* bdf, const char* fname); + + + + + + +#endif + |