diff options
author | jsorg71 <jsorg71> | 2007-09-26 07:22:14 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2007-09-26 07:22:14 +0000 |
commit | 62e47c6de0b840f194e5fcc68663acfaeea8ad68 (patch) | |
tree | 93c4b6d750ad3932027c625b8c96c256e583776b /xrdp/xrdp_font.c | |
parent | 4aab3a34447c8ed829f269220930074338ab46a7 (diff) | |
download | xrdp-proprietary-62e47c6de0b840f194e5fcc68663acfaeea8ad68.tar.gz xrdp-proprietary-62e47c6de0b840f194e5fcc68663acfaeea8ad68.zip |
font changes, no color in font struct, wm default font, etc
Diffstat (limited to 'xrdp/xrdp_font.c')
-rw-r--r-- | xrdp/xrdp_font.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/xrdp/xrdp_font.c b/xrdp/xrdp_font.c index 34c8b213..93bcbab8 100644 --- a/xrdp/xrdp_font.c +++ b/xrdp/xrdp_font.c @@ -73,17 +73,23 @@ xrdp_font_create(struct xrdp_wm* wm) int i; int index; int datasize; + int file_size; struct xrdp_font_char* f; DEBUG(("in xrdp_font_create")); + file_size = g_file_get_size(DEFAULT_FONT_NAME); + if (file_size < 1) + { + return 0; + } self = (struct xrdp_font*)g_malloc(sizeof(struct xrdp_font), 1); self->wm = wm; make_stream(s); - init_stream(s, 1024 * 256); - fd = g_file_open("sans-10.fv1"); + init_stream(s, file_size + 1024); + fd = g_file_open(DEFAULT_FONT_NAME); if (fd != -1) { - b = g_file_read(fd, s->data, 1024 * 256); + b = g_file_read(fd, s->data, file_size + 1024); g_file_close(fd); if (b > 0) { |