src/hbf.h
/* [<][>][^][v][top][bottom][index][help] */
FUNCTIONS
This source file includes following functions.
1 /*
2 * hbf.c - a header file for hbf.c
3 * by Hirotsugu Kakugawa
4 *
5 */
6 /*
7 * Copyright (C) 1996-1998 Hirotsugu Kakugawa.
8 * All rights reserved.
9 *
10 * This file is part of the VFlib Library. This library is free
11 * software; you can redistribute it and/or modify it under the terms of
12 * the GNU Library General Public License as published by the Free
13 * Software Foundation; either version 2 of the License, or (at your
14 * option) any later version. This library is distributed in the hope
15 * that it will be useful, but WITHOUT ANY WARRANTY; without even the
16 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
17 * PURPOSE. See the GNU Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 */
22
23 #define FONTCLASS_NAME "hbf"
24
25 #ifndef HBF_DEFAULT_EXTENSIONS
26 # define HBF_DEFAULT_EXTENSIONS ".hbf"
27 #endif
28
29 #define HBF_ENV_FONT_DIR "VFLIB_HBF_FONTS"
30
31 struct s_hbf_char {
32 int bbx_width, bbx_height;
33 int off_x, off_y;
34 int mv_x, mv_y;
35 unsigned char *bitmap;
36 int raster;
37 };
38 typedef struct s_hbf_char *HBF_CHAR;
39
40 struct s_hbf {
41 int charset;
42 char *path_name;
43 char *uncompress;
44 int nchars;
45 int byte2_ranges;
46 int *byte2_range_start;
47 int *byte2_range_end;
48 int n_byte2;
49 int byte2_index[256];
50 int code_ranges;
51 long *code_range_start;
52 long *code_range_end;
53 char **code_range_bitmap_file_paths;
54 char **code_range_bitmap_uncompresser;
55 unsigned char ***code_range_bitmaps;
56 long *code_range_offset;
57 double point_size;
58 int pixel_size;
59 int size;
60 double dpi_x, dpi_y;
61 double slant;
62 int ascent, descent;
63 int font_bbx_width, font_bbx_height;
64 int font_bbx_xoff, font_bbx_yoff;
65 SEXP_ALIST props;
66 };
67 typedef struct s_hbf *HBF;
68
69 Private int HBF_Init(void);
70 Private int HBF_Open(char*,SEXP);
71 Private void HBF_Close(int);
72 Private HBF_CHAR HBF_GetBitmap(int,long);
73 Private HBF_CHAR HBF_GetHBFChar(HBF,long);
74 Private char *HBF_GetProp(HBF,char*);
75
76 /*EOF*/