Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/X11/fonts
File: fontstruct.h
/***********************************************************
[0] Fix | Delete
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
[1] Fix | Delete
[2] Fix | Delete
All Rights Reserved
[3] Fix | Delete
[4] Fix | Delete
Permission to use, copy, modify, and distribute this software and its
[5] Fix | Delete
documentation for any purpose and without fee is hereby granted,
[6] Fix | Delete
provided that the above copyright notice appear in all copies and that
[7] Fix | Delete
both that copyright notice and this permission notice appear in
[8] Fix | Delete
supporting documentation, and that the name of Digital not be
[9] Fix | Delete
used in advertising or publicity pertaining to distribution of the
[10] Fix | Delete
software without specific, written prior permission.
[11] Fix | Delete
[12] Fix | Delete
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
[13] Fix | Delete
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
[14] Fix | Delete
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
[15] Fix | Delete
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
[16] Fix | Delete
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
[17] Fix | Delete
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
[18] Fix | Delete
SOFTWARE.
[19] Fix | Delete
[20] Fix | Delete
******************************************************************/
[21] Fix | Delete
[22] Fix | Delete
#ifndef FONTSTR_H
[23] Fix | Delete
#define FONTSTR_H
[24] Fix | Delete
[25] Fix | Delete
#include <X11/Xproto.h>
[26] Fix | Delete
#include "font.h"
[27] Fix | Delete
#include <X11/Xfuncproto.h>
[28] Fix | Delete
#include <X11/Xdefs.h>
[29] Fix | Delete
[30] Fix | Delete
/*
[31] Fix | Delete
* This version of the server font data structure is only for describing
[32] Fix | Delete
* the in memory data structure. The file structure is not necessarily a
[33] Fix | Delete
* copy of this. That is up to the compiler and the OS layer font loading
[34] Fix | Delete
* machinery.
[35] Fix | Delete
*/
[36] Fix | Delete
[37] Fix | Delete
#define GLYPHPADOPTIONS 4 /* 1, 2, 4, or 8 */
[38] Fix | Delete
[39] Fix | Delete
typedef struct _FontProp {
[40] Fix | Delete
long name;
[41] Fix | Delete
long value; /* assumes ATOM is not larger than INT32 */
[42] Fix | Delete
} FontPropRec;
[43] Fix | Delete
[44] Fix | Delete
typedef struct _FontResolution {
[45] Fix | Delete
unsigned short x_resolution;
[46] Fix | Delete
unsigned short y_resolution;
[47] Fix | Delete
unsigned short point_size;
[48] Fix | Delete
} FontResolutionRec;
[49] Fix | Delete
[50] Fix | Delete
typedef struct _ExtentInfo {
[51] Fix | Delete
DrawDirection drawDirection;
[52] Fix | Delete
int fontAscent;
[53] Fix | Delete
int fontDescent;
[54] Fix | Delete
int overallAscent;
[55] Fix | Delete
int overallDescent;
[56] Fix | Delete
int overallWidth;
[57] Fix | Delete
int overallLeft;
[58] Fix | Delete
int overallRight;
[59] Fix | Delete
} ExtentInfoRec;
[60] Fix | Delete
[61] Fix | Delete
typedef struct _CharInfo {
[62] Fix | Delete
xCharInfo metrics; /* info preformatted for Queries */
[63] Fix | Delete
char *bits; /* pointer to glyph image */
[64] Fix | Delete
} CharInfoRec;
[65] Fix | Delete
[66] Fix | Delete
/*
[67] Fix | Delete
* Font is created at font load time. It is specific to a single encoding.
[68] Fix | Delete
* e.g. not all of the glyphs in a font may be part of a single encoding.
[69] Fix | Delete
*/
[70] Fix | Delete
[71] Fix | Delete
typedef struct _FontInfo {
[72] Fix | Delete
unsigned short firstCol;
[73] Fix | Delete
unsigned short lastCol;
[74] Fix | Delete
unsigned short firstRow;
[75] Fix | Delete
unsigned short lastRow;
[76] Fix | Delete
unsigned short defaultCh;
[77] Fix | Delete
unsigned int noOverlap:1;
[78] Fix | Delete
unsigned int terminalFont:1;
[79] Fix | Delete
unsigned int constantMetrics:1;
[80] Fix | Delete
unsigned int constantWidth:1;
[81] Fix | Delete
unsigned int inkInside:1;
[82] Fix | Delete
unsigned int inkMetrics:1;
[83] Fix | Delete
unsigned int allExist:1;
[84] Fix | Delete
unsigned int drawDirection:2;
[85] Fix | Delete
unsigned int cachable:1;
[86] Fix | Delete
unsigned int anamorphic:1;
[87] Fix | Delete
short maxOverlap;
[88] Fix | Delete
short pad;
[89] Fix | Delete
xCharInfo maxbounds;
[90] Fix | Delete
xCharInfo minbounds;
[91] Fix | Delete
xCharInfo ink_maxbounds;
[92] Fix | Delete
xCharInfo ink_minbounds;
[93] Fix | Delete
short fontAscent;
[94] Fix | Delete
short fontDescent;
[95] Fix | Delete
int nprops;
[96] Fix | Delete
FontPropPtr props;
[97] Fix | Delete
char *isStringProp;
[98] Fix | Delete
} FontInfoRec;
[99] Fix | Delete
[100] Fix | Delete
typedef struct _Font {
[101] Fix | Delete
int refcnt;
[102] Fix | Delete
FontInfoRec info;
[103] Fix | Delete
char bit;
[104] Fix | Delete
char byte;
[105] Fix | Delete
char glyph;
[106] Fix | Delete
char scan;
[107] Fix | Delete
fsBitmapFormat format;
[108] Fix | Delete
int (*get_glyphs) (FontPtr /* font */,
[109] Fix | Delete
unsigned long /* count */,
[110] Fix | Delete
unsigned char * /* chars */,
[111] Fix | Delete
FontEncoding /* encoding */,
[112] Fix | Delete
unsigned long * /* count */,
[113] Fix | Delete
CharInfoPtr * /* glyphs */);
[114] Fix | Delete
int (*get_metrics) (FontPtr /* font */,
[115] Fix | Delete
unsigned long /* count */,
[116] Fix | Delete
unsigned char * /* chars */,
[117] Fix | Delete
FontEncoding /* encoding */,
[118] Fix | Delete
unsigned long * /* count */,
[119] Fix | Delete
xCharInfo ** /* glyphs */);
[120] Fix | Delete
void (*unload_font) (FontPtr /* font */);
[121] Fix | Delete
void (*unload_glyphs) (FontPtr /* font */);
[122] Fix | Delete
FontPathElementPtr fpe;
[123] Fix | Delete
void *svrPrivate;
[124] Fix | Delete
void *fontPrivate;
[125] Fix | Delete
void *fpePrivate;
[126] Fix | Delete
int maxPrivate;
[127] Fix | Delete
void **devPrivates;
[128] Fix | Delete
} FontRec;
[129] Fix | Delete
[130] Fix | Delete
#define FontGetPrivate(pFont,n) ((n) > (pFont)->maxPrivate ? (void *) 0 : \
[131] Fix | Delete
(pFont)->devPrivates[n])
[132] Fix | Delete
[133] Fix | Delete
#define FontSetPrivate(pFont,n,ptr) ((n) > (pFont)->maxPrivate ? \
[134] Fix | Delete
_FontSetNewPrivate (pFont, n, ptr) : \
[135] Fix | Delete
((((pFont)->devPrivates[n] = (ptr)) != 0) || TRUE))
[136] Fix | Delete
[137] Fix | Delete
typedef struct _FontNames {
[138] Fix | Delete
int nnames;
[139] Fix | Delete
int size;
[140] Fix | Delete
int *length;
[141] Fix | Delete
char **names;
[142] Fix | Delete
} FontNamesRec;
[143] Fix | Delete
[144] Fix | Delete
[145] Fix | Delete
/* External view of font paths */
[146] Fix | Delete
typedef struct _FontPathElement {
[147] Fix | Delete
int name_length;
[148] Fix | Delete
#if FONT_PATH_ELEMENT_NAME_CONST
[149] Fix | Delete
const
[150] Fix | Delete
#endif
[151] Fix | Delete
char *name;
[152] Fix | Delete
int type;
[153] Fix | Delete
int refcount;
[154] Fix | Delete
void *private;
[155] Fix | Delete
} FontPathElementRec;
[156] Fix | Delete
[157] Fix | Delete
typedef Bool (*NameCheckFunc) (const char *name);
[158] Fix | Delete
typedef int (*InitFpeFunc) (FontPathElementPtr fpe);
[159] Fix | Delete
typedef int (*FreeFpeFunc) (FontPathElementPtr fpe);
[160] Fix | Delete
typedef int (*ResetFpeFunc) (FontPathElementPtr fpe);
[161] Fix | Delete
typedef int (*OpenFontFunc) ( void *client,
[162] Fix | Delete
FontPathElementPtr fpe,
[163] Fix | Delete
Mask flags,
[164] Fix | Delete
const char* name,
[165] Fix | Delete
int namelen,
[166] Fix | Delete
fsBitmapFormat format,
[167] Fix | Delete
fsBitmapFormatMask fmask,
[168] Fix | Delete
XID id,
[169] Fix | Delete
FontPtr* pFont,
[170] Fix | Delete
char** aliasName,
[171] Fix | Delete
FontPtr non_cachable_font);
[172] Fix | Delete
typedef void (*CloseFontFunc) (FontPathElementPtr fpe, FontPtr pFont);
[173] Fix | Delete
typedef int (*ListFontsFunc) (void *client,
[174] Fix | Delete
FontPathElementPtr fpe,
[175] Fix | Delete
const char* pat,
[176] Fix | Delete
int len,
[177] Fix | Delete
int max,
[178] Fix | Delete
FontNamesPtr names);
[179] Fix | Delete
[180] Fix | Delete
typedef int (*StartLfwiFunc) (void *client,
[181] Fix | Delete
FontPathElementPtr fpe,
[182] Fix | Delete
const char* pat,
[183] Fix | Delete
int len,
[184] Fix | Delete
int max,
[185] Fix | Delete
void ** privatep);
[186] Fix | Delete
[187] Fix | Delete
typedef int (*NextLfwiFunc) (void *client,
[188] Fix | Delete
FontPathElementPtr fpe,
[189] Fix | Delete
char** name,
[190] Fix | Delete
int* namelen,
[191] Fix | Delete
FontInfoPtr* info,
[192] Fix | Delete
int* numFonts,
[193] Fix | Delete
void *private);
[194] Fix | Delete
[195] Fix | Delete
typedef int (*WakeupFpeFunc) (FontPathElementPtr fpe,
[196] Fix | Delete
unsigned long* LastSelectMask);
[197] Fix | Delete
[198] Fix | Delete
typedef void (*ClientDiedFunc) (void *client,
[199] Fix | Delete
FontPathElementPtr fpe);
[200] Fix | Delete
[201] Fix | Delete
typedef int (*LoadGlyphsFunc) (void *client,
[202] Fix | Delete
FontPtr pfont,
[203] Fix | Delete
Bool range_flag,
[204] Fix | Delete
unsigned int nchars,
[205] Fix | Delete
int item_size,
[206] Fix | Delete
unsigned char* data);
[207] Fix | Delete
[208] Fix | Delete
typedef int (*StartLaFunc) (void *client,
[209] Fix | Delete
FontPathElementPtr fpe,
[210] Fix | Delete
const char* pat,
[211] Fix | Delete
int len,
[212] Fix | Delete
int max,
[213] Fix | Delete
void ** privatep);
[214] Fix | Delete
[215] Fix | Delete
typedef int (*NextLaFunc) (void *client,
[216] Fix | Delete
FontPathElementPtr fpe,
[217] Fix | Delete
char** namep,
[218] Fix | Delete
int* namelenp,
[219] Fix | Delete
char** resolvedp,
[220] Fix | Delete
int* resolvedlenp,
[221] Fix | Delete
void *private);
[222] Fix | Delete
[223] Fix | Delete
typedef void (*SetPathFunc)(void);
[224] Fix | Delete
[225] Fix | Delete
typedef struct _FPEFunctions {
[226] Fix | Delete
NameCheckFunc name_check;
[227] Fix | Delete
InitFpeFunc init_fpe;
[228] Fix | Delete
ResetFpeFunc reset_fpe;
[229] Fix | Delete
FreeFpeFunc free_fpe;
[230] Fix | Delete
OpenFontFunc open_font;
[231] Fix | Delete
CloseFontFunc close_font;
[232] Fix | Delete
ListFontsFunc list_fonts;
[233] Fix | Delete
StartLaFunc start_list_fonts_and_aliases;
[234] Fix | Delete
NextLaFunc list_next_font_or_alias;
[235] Fix | Delete
StartLfwiFunc start_list_fonts_with_info;
[236] Fix | Delete
NextLfwiFunc list_next_font_with_info;
[237] Fix | Delete
WakeupFpeFunc wakeup_fpe;
[238] Fix | Delete
ClientDiedFunc client_died;
[239] Fix | Delete
/* for load_glyphs, range_flag = 0 ->
[240] Fix | Delete
nchars = # of characters in data
[241] Fix | Delete
item_size = bytes/char
[242] Fix | Delete
data = list of characters
[243] Fix | Delete
range_flag = 1 ->
[244] Fix | Delete
nchars = # of fsChar2b's in data
[245] Fix | Delete
item_size is ignored
[246] Fix | Delete
data = list of fsChar2b's */
[247] Fix | Delete
LoadGlyphsFunc load_glyphs;
[248] Fix | Delete
SetPathFunc set_path_hook;
[249] Fix | Delete
} FPEFunctionsRec, FPEFunctions;
[250] Fix | Delete
[251] Fix | Delete
/*
[252] Fix | Delete
* Various macros for computing values based on contents of
[253] Fix | Delete
* the above structures
[254] Fix | Delete
*/
[255] Fix | Delete
[256] Fix | Delete
#define GLYPHWIDTHPIXELS(pci) \
[257] Fix | Delete
((pci)->metrics.rightSideBearing - (pci)->metrics.leftSideBearing)
[258] Fix | Delete
[259] Fix | Delete
#define GLYPHHEIGHTPIXELS(pci) \
[260] Fix | Delete
((pci)->metrics.ascent + (pci)->metrics.descent)
[261] Fix | Delete
[262] Fix | Delete
#define GLYPHWIDTHBYTES(pci) (((GLYPHWIDTHPIXELS(pci))+7) >> 3)
[263] Fix | Delete
[264] Fix | Delete
#define GLYPHWIDTHPADDED(bc) (((bc)+7) & ~0x7)
[265] Fix | Delete
[266] Fix | Delete
#define BYTES_PER_ROW(bits, nbytes) \
[267] Fix | Delete
((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \
[268] Fix | Delete
:(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \
[269] Fix | Delete
:(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \
[270] Fix | Delete
:(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \
[271] Fix | Delete
: 0)
[272] Fix | Delete
[273] Fix | Delete
#define BYTES_FOR_GLYPH(ci,pad) (GLYPHHEIGHTPIXELS(ci) * \
[274] Fix | Delete
BYTES_PER_ROW(GLYPHWIDTHPIXELS(ci),pad))
[275] Fix | Delete
/*
[276] Fix | Delete
* Macros for computing different bounding boxes for fonts; from
[277] Fix | Delete
* the font protocol
[278] Fix | Delete
*/
[279] Fix | Delete
[280] Fix | Delete
#define FONT_MAX_ASCENT(pi) ((pi)->fontAscent > (pi)->ink_maxbounds.ascent ? \
[281] Fix | Delete
(pi)->fontAscent : (pi)->ink_maxbounds.ascent)
[282] Fix | Delete
#define FONT_MAX_DESCENT(pi) ((pi)->fontDescent > (pi)->ink_maxbounds.descent ? \
[283] Fix | Delete
(pi)->fontDescent : (pi)->ink_maxbounds.descent)
[284] Fix | Delete
#define FONT_MAX_HEIGHT(pi) (FONT_MAX_ASCENT(pi) + FONT_MAX_DESCENT(pi))
[285] Fix | Delete
#define FONT_MIN_LEFT(pi) ((pi)->ink_minbounds.leftSideBearing < 0 ? \
[286] Fix | Delete
(pi)->ink_minbounds.leftSideBearing : 0)
[287] Fix | Delete
#define FONT_MAX_RIGHT(pi) ((pi)->ink_maxbounds.rightSideBearing > \
[288] Fix | Delete
(pi)->ink_maxbounds.characterWidth ? \
[289] Fix | Delete
(pi)->ink_maxbounds.rightSideBearing : \
[290] Fix | Delete
(pi)->ink_maxbounds.characterWidth)
[291] Fix | Delete
#define FONT_MAX_WIDTH(pi) (FONT_MAX_RIGHT(pi) - FONT_MIN_LEFT(pi))
[292] Fix | Delete
[293] Fix | Delete
#include "fontproto.h"
[294] Fix | Delete
[295] Fix | Delete
#endif /* FONTSTR_H */
[296] Fix | Delete
[297] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function