2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: fontstruct.h /main/3 1996/04/08 15:58:01 cde-fuj $ */
24 /***********************************************************
25 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
26 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
30 Permission to use, copy, modify, and distribute this software and its
31 documentation for any purpose and without fee is hereby granted,
32 provided that the above copyright notice appear in all copies and that
33 both that copyright notice and this permission notice appear in
34 supporting documentation, and that the names of Digital or MIT not be
35 used in advertising or publicity pertaining to distribution of the
36 software without specific, written prior permission.
38 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
46 (c) Copyright 1995 FUJITSU LIMITED
47 This is source code modified by FUJITSU LIMITED under the Joint
48 Development Agreement for the CDEnext PST.
49 This is unpublished proprietary source code of FUJITSU LIMITED
51 ******************************************************************/
53 #define FONTSTRUCT_H 1
57 typedef struct _CharInfo {
58 xCharInfo metrics; /* info preformatted for Queries */
59 unsigned byteOffset:24; /* byte offset of the raster from pGlyphs */
60 Bool exists:1; /* true iff glyph exists for this char */
61 unsigned pad:7; /* must be zero for now */
64 typedef struct _FontInfo {
65 unsigned int version1; /* version stamp */
66 unsigned int allExist;
67 unsigned int drawDirection;
68 unsigned int noOverlap; /* true if:
69 * max(rightSideBearing-characterWidth)
70 * <= minbounds->metrics.leftSideBearing
72 unsigned int constantMetrics;
73 unsigned int terminalFont; /* Should be deprecated! true if:
75 leftSideBearing == 0 &&
76 rightSideBearing == characterWidth &&
77 ascent == fontAscent &&
78 descent == fontDescent
80 unsigned int linear:1; /* true if firstRow == lastRow */
81 unsigned int constantWidth:1; /* true if minbounds->metrics.characterWidth
82 * == maxbounds->metrics.characterWidth
84 unsigned int inkInside:1; /* true if for all defined glyphs:
85 * leftSideBearing >= 0 &&
86 * rightSideBearing <= characterWidth &&
87 * -fontDescent <= ascent <= fontAscent &&
88 * -fontAscent <= descent <= fontDescent
90 unsigned int inkMetrics:1; /* ink metrics != bitmap metrics */
91 /* used with terminalFont */
92 /* see font's pInk{CI,Min,Max} */
93 unsigned int padding:28;
94 unsigned int firstCol;
96 unsigned int firstRow;
99 unsigned int lenStrings; /* length in bytes of string table */
100 unsigned int chDefault; /* default character */
101 int fontDescent; /* minimum for quality typography */
102 int fontAscent; /* minimum for quality typography */
103 CharInfoRec minbounds; /* MIN of glyph metrics over all chars */
104 CharInfoRec maxbounds; /* MAX of glyph metrics over all chars */
105 unsigned int pixDepth; /* intensity bits per pixel */
106 unsigned int glyphSets; /* number of sets of glyphs, for
107 sub-pixel positioning */
108 unsigned int version2; /* version stamp double-check */
111 typedef struct _ExtentInfo {
112 DrawDirection drawDirection;
122 #endif /* FONTSTRUCT_H */