Mercurial > hg > xemacs-beta
comparison lib-src/mule/bdf.h @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
1 /* Header for bdf.c | |
2 Copyright (C) 1992 Free Software Foundation, Inc. */ | |
3 | |
4 /* This file is part of Mule (MULtilingual Enhancement of GNU Emacs). | |
5 | |
6 Mule is free software distributed in the form of patches to GNU Emacs. | |
7 You can redistribute it and/or modify | |
8 it under the terms of the GNU General Public License as published by | |
9 the Free Software Foundation; either version 1, or (at your option) | |
10 any later version. | |
11 | |
12 Mule is distributed in the hope that it will be useful, | |
13 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 GNU General Public License for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with GNU Emacs; see the file COPYING. If not, write to | |
19 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
20 | |
21 /* 92.10.14 written by K.Handa <handa@etl.go.jp> */ | |
22 /* 92.11.3 modified for Mule Ver.0.9.7 | |
23 by T.Matsuzawa <mzw_t@hpujisa.yhp.co.jp> | |
24 Support NONSPACING characters. */ | |
25 /* 92.11.24 modified for Mule Ver.0.9.7 by K.Handa <handa@etl.go.jp> | |
26 Modified to reduce memory. */ | |
27 /* 92.12.14 modified for Mule Ver.0.9.7 by K.Handa <handa@etl.go.jp> | |
28 Support for composite character. */ | |
29 /* 93.5.7 modified for Mule Ver.0.9.8 by K.Handa <handa@etl.go.jp> | |
30 Support right-to-left character. | |
31 Definitions of BDF_xxxx are deleted. */ | |
32 | |
33 #ifndef _BDF_H | |
34 #define _BDF_H | |
35 | |
36 /* Structure of glyph information of one character. */ | |
37 typedef struct { | |
38 int dwidth; /* width in pixels */ | |
39 int bbw, bbh, bbox, bboy; /* bounding box in pixels */ | |
40 int bitmap_size; /* byte lengh of the following slots */ | |
41 char *bitmap; /* */ | |
42 } glyph_struct; | |
43 | |
44 extern glyph_struct glyph; | |
45 | |
46 typedef struct { | |
47 char *filename; | |
48 int bytes, encoding, direction; /* 93.5.7 by K.Handa */ | |
49 FILE *fp; | |
50 int loaded; /* flag */ | |
51 long last_offset; | |
52 long *offset; /* offset to STARTCHAR */ | |
53 int chars; /* CHARS */ | |
54 int llx, lly, urx, ury; /* FontBBox */ | |
55 /* Baseline offset -- value of private property _MULE_BASELINE_OFFSET */ | |
56 int yoffset; | |
57 int relative_compose; | |
58 char **extra; | |
59 } font_struct; | |
60 | |
61 typedef struct { | |
62 unsigned int *defined; /* if 1, the character is defined. */ | |
63 int fs; /* PIXEL size */ | |
64 int code[256]; /* encoding -> character code mapping */ | |
65 unsigned int count[256]; /* How often the character appeared. */ | |
66 unsigned char new[256]; | |
67 } font_extra; | |
68 | |
69 extern font_struct *font; | |
70 | |
71 #define FONT_LOADED(lc) font[(lc) & 0x7F].loaded | |
72 | |
73 #define DEFINED1(lc,idx) \ | |
74 (((font_extra *)(font[(lc) & 0x7F].extra))->defined[idx]) | |
75 #define DEFINE1(lc,idx) \ | |
76 (((font_extra *)(font[(lc) & 0x7F].extra))->defined[idx] = 1) | |
77 | |
78 #define DEFINED2(lc,idx) \ | |
79 (((font_extra *)(font[(lc) & 0x7F].extra))->defined[(idx) / 32] & (1 << ((idx) % 32))) | |
80 #define DEFINE2(lc,idx) \ | |
81 (((font_extra *)(font[(lc) & 0x7F].extra))->defined[(idx) / 32] |= (1 << ((idx) % 32))) | |
82 #define UNDEFINE2(lc,idx) \ | |
83 (((font_extra *)(font[(lc) & 0x7F].extra))->defined[(idx) / 32] &= ~(1 << ((idx) % 32))) | |
84 | |
85 extern FILE *bdf_fopen(); | |
86 | |
87 #ifndef BDF_PATH | |
88 #define BDF_PATH "/usr/share/fonts/X11/ETL,/usr/share/fonts/X11/Chinese,/usr/share/fonts/X11/Japanese,/usr/share/fonts/X11/Korean" | |
89 #endif | |
90 | |
91 #endif /* _BDF_H */ |