~ubuntu-branches/ubuntu/karmic/iterm/karmic

« back to all changes in this revision

Viewing changes to unix/fbiterm/include/fontxlfd.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Fok
  • Date: 2004-02-27 04:13:16 UTC
  • Revision ID: james.westby@ubuntu.com-20040227041316-q0jn37sia8mt0t9u
Tags: upstream-0.5
ImportĀ upstreamĀ versionĀ 0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $TOG: fontxlfd.h /main/7 1998/02/09 10:49:25 kaleb $ */
 
2
 
 
3
/*
 
4
 
 
5
Copyright 1990, 1994, 1998  The Open Group
 
6
 
 
7
All Rights Reserved.
 
8
 
 
9
The above copyright notice and this permission notice shall be included
 
10
in all copies or substantial portions of the Software.
 
11
 
 
12
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
13
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
14
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
15
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
 
16
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 
17
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 
18
OTHER DEALINGS IN THE SOFTWARE.
 
19
 
 
20
Except as contained in this notice, the name of The Open Group shall
 
21
not be used in advertising or otherwise to promote the sale, use or
 
22
other dealings in this Software without prior written authorization
 
23
from The Open Group.
 
24
 
 
25
*/
 
26
/* $XFree86: xc/lib/font/include/fontxlfd.h,v 1.4 1999/07/17 05:30:48 dawes Exp $ */
 
27
 
 
28
/*
 
29
 * Author:  Keith Packard, MIT X Consortium
 
30
 */
 
31
 
 
32
#ifndef _FONTXLFD_H_
 
33
#define _FONTXLFD_H_
 
34
 
 
35
#include "FSproto.h"
 
36
 
 
37
/* Constants for values_supplied bitmap */
 
38
 
 
39
#define SIZE_SPECIFY_MASK               0xf
 
40
 
 
41
#define PIXELSIZE_MASK                  0x3
 
42
#define PIXELSIZE_UNDEFINED             0
 
43
#define PIXELSIZE_SCALAR                0x1
 
44
#define PIXELSIZE_ARRAY                 0x2
 
45
#define PIXELSIZE_SCALAR_NORMALIZED     0x3     /* Adjusted for resolution */
 
46
 
 
47
#define POINTSIZE_MASK                  0xc
 
48
#define POINTSIZE_UNDEFINED             0
 
49
#define POINTSIZE_SCALAR                0x4
 
50
#define POINTSIZE_ARRAY                 0x8
 
51
 
 
52
#define PIXELSIZE_WILDCARD              0x10
 
53
#define POINTSIZE_WILDCARD              0x20
 
54
 
 
55
#define ENHANCEMENT_SPECIFY_MASK        0x40
 
56
 
 
57
#define CHARSUBSET_SPECIFIED            0x40
 
58
 
 
59
#define EPS             1.0e-20
 
60
#define XLFD_NDIGITS    3               /* Round numbers in pixel and
 
61
                                           point arrays to this many
 
62
                                           digits for repeatability */
 
63
 
 
64
typedef struct _FontScalable {
 
65
    int         values_supplied;        /* Bitmap identifying what advanced
 
66
                                           capabilities or enhancements
 
67
                                           were specified in the font name */
 
68
    double      pixel_matrix[4];
 
69
    double      point_matrix[4];
 
70
 
 
71
    /* Pixel and point fields are deprecated in favor of the
 
72
       transformation matrices.  They are provided and filled in for the
 
73
       benefit of rasterizers that do not handle the matrices.  */
 
74
 
 
75
    int         pixel,
 
76
                point;
 
77
 
 
78
    int         x,
 
79
                y,
 
80
                width;
 
81
    char        *xlfdName;
 
82
    int         nranges;
 
83
    fsRange     *ranges;
 
84
}           FontScalableRec, *FontScalablePtr;
 
85
 
 
86
 
 
87
extern double xlfd_round_double ( double x );
 
88
extern Bool FontParseXLFDName ( char *fname, FontScalablePtr vals, int subst );
 
89
extern fsRange *FontParseRanges ( char *name, int *nranges );
 
90
 
 
91
#define FONT_XLFD_REPLACE_NONE  0
 
92
#define FONT_XLFD_REPLACE_STAR  1
 
93
#define FONT_XLFD_REPLACE_ZERO  2
 
94
#define FONT_XLFD_REPLACE_VALUE 3
 
95
 
 
96
#endif                          /* _FONTXLFD_H_ */