Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:26

0001 /*
0002  * Copyright © 2001 Keith Packard
0003  *
0004  * Permission to use, copy, modify, distribute, and sell this software and its
0005  * documentation for any purpose is hereby granted without fee, provided that
0006  * the above copyright notice appear in all copies and that both that
0007  * copyright notice and this permission notice appear in supporting
0008  * documentation, and that the name of Keith Packard not be used in
0009  * advertising or publicity pertaining to distribution of the software without
0010  * specific, written prior permission.  Keith Packard makes no
0011  * representations about the suitability of this software for any purpose.  It
0012  * is provided "as is" without express or implied warranty.
0013  *
0014  * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
0015  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
0016  * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
0017  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
0018  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
0019  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
0020  * PERFORMANCE OF THIS SOFTWARE.
0021  */
0022 
0023 #ifndef _XFTCOMPAT_H_
0024 #define _XFTCOMPAT_H_
0025 #include <X11/Xfuncproto.h>
0026 
0027 /*
0028  * Compatibility definitions -- map Fc names to Xft names
0029  */
0030 
0031 typedef FcChar8     XftChar8;
0032 typedef FcChar16    XftChar16;
0033 typedef FcChar32    XftChar32;
0034 
0035 #define XFT_FAMILY  FC_FAMILY
0036 #define XFT_STYLE   FC_STYLE
0037 #define XFT_SLANT   FC_SLANT
0038 #define XFT_WEIGHT  FC_WEIGHT
0039 #define XFT_SIZE    FC_SIZE
0040 #define XFT_PIXEL_SIZE  FC_PIXEL_SIZE
0041 #define XFT_SPACING FC_SPACING
0042 #define XFT_FOUNDRY FC_FOUNDRY
0043 #define XFT_ANTIALIAS   FC_ANTIALIAS
0044 #define XFT_FILE    FC_FILE
0045 #define XFT_INDEX   FC_INDEX
0046 #define XFT_RASTERIZER  FC_RASTERIZER
0047 #define XFT_OUTLINE FC_OUTLINE
0048 #define XFT_SCALABLE    FC_SCALABLE
0049 #define XFT_RGBA    FC_RGBA
0050 
0051 /* defaults from resources */
0052 #define XFT_SCALE   FC_SCALE
0053 #define XFT_MINSPACE    FC_MINSPACE
0054 #define XFT_DPI     FC_DPI
0055 
0056 /* specific to FreeType rasterizer */
0057 #define XFT_CHAR_WIDTH  FC_CHAR_WIDTH
0058 #define XFT_CHAR_HEIGHT FC_CHAR_HEIGHT
0059 #define XFT_MATRIX  FC_MATRIX
0060 
0061 #define XFT_WEIGHT_LIGHT    FC_WEIGHT_LIGHT
0062 #define XFT_WEIGHT_MEDIUM   FC_WEIGHT_MEDIUM
0063 #define XFT_WEIGHT_DEMIBOLD FC_WEIGHT_DEMIBOLD
0064 #define XFT_WEIGHT_BOLD     FC_WEIGHT_BOLD
0065 #define XFT_WEIGHT_BLACK    FC_WEIGHT_BLACK
0066 
0067 #define XFT_SLANT_ROMAN     FC_SLANT_ROMAN
0068 #define XFT_SLANT_ITALIC    FC_SLANT_ITALIC
0069 #define XFT_SLANT_OBLIQUE   FC_SLANT_OBLIQUE
0070 
0071 #define XFT_PROPORTIONAL    FC_PROPORTIONAL
0072 #define XFT_MONO        FC_MONO
0073 #define XFT_CHARCELL        FC_CHARCELL
0074 
0075 #define XFT_RGBA_UNKNOWN    FC_RGBA_UNKNOWN
0076 #define XFT_RGBA_RGB        FC_RGBA_RGB
0077 #define XFT_RGBA_BGR        FC_RGBA_BGR
0078 #define XFT_RGBA_VRGB       FC_RGBA_VRGB
0079 #define XFT_RGBA_VBGR       FC_RGBA_VBGR
0080 #define XFT_RGBA_NONE       FC_RGBA_NONE
0081 
0082 /*
0083  * Old constants
0084  */
0085 #define XFT_ENCODING        "encoding"
0086 
0087 typedef FcType XftType;
0088 
0089 typedef FcMatrix XftMatrix;
0090 
0091 #define XftMatrixInit(m)    FcMatrixInit(m)
0092 
0093 typedef FcResult    XftResult;
0094 
0095 #define XftResultMatch      FcResultMatch
0096 #define XftResultNoMatch    FcResultNoMatch
0097 #define XftResultTypeMismatch   FcResultTypeMismatch
0098 #define XftResultNoId       FcResultNoId
0099 
0100 typedef FcValue     XftValue;
0101 typedef FcPattern   XftPattern;
0102 typedef FcFontSet   XftFontSet;
0103 typedef FcObjectSet XftObjectSet;
0104 
0105 #define XftGlyphExists      XftCharExists
0106 
0107 #define XftObjectSetCreate  FcObjectSetCreate
0108 #define XftObjectSetAdd     FcObjectSetAdd
0109 #define XftObjectSetDestroy FcObjectSetDestroy
0110 #define XftObjectSetVaBuild FcObjectSetVaBuild
0111 #define XftObjectSetBuild   FcObjectSetBuild
0112 
0113 #define XftFontSetMatch     FcFontSetMatch
0114 #define XftFontSetDestroy   FcFontSetDestroy
0115 
0116 #define XftMatrixEqual      FcMatrixEqual
0117 #define XftMatrixMultiply   FcMatrixMultiply
0118 #define XftMatrixRotate     FcMatrixRotate
0119 #define XftMatrixScale      FcMatrixScale
0120 #define XftMatrixShear      FcMatrixShear
0121 
0122 #define XftPatternCreate    FcPatternCreate
0123 #define XftPatternDuplicate FcPatternDuplicate
0124 #define XftValueDestroy     FcValueDestroy
0125 #define XftValueListDestroy FcValueListDestroy
0126 #define XftPatternDestroy   FcPatternDestroy
0127 #define XftPatternFind      FcPatternFind
0128 #define XftPatternAdd       FcPatternAdd
0129 #define XftPatternGet       FcPatternGet
0130 #define XftPatternDel       FcPatternDel
0131 #define XftPatternAddInteger    FcPatternAddInteger
0132 #define XftPatternAddDouble FcPatternAddDouble
0133 #define XftPatternAddString(p,e,s)  FcPatternAddString(p,e,(FcChar8 *)(s))
0134 #define XftPatternAddMatrix FcPatternAddMatrix
0135 #define XftPatternAddBool   FcPatternAddBool
0136 #define XftPatternGetInteger    FcPatternGetInteger
0137 #define XftPatternGetDouble FcPatternGetDouble
0138 #define XftPatternGetString(p,e,i,n)    FcPatternGetString(p,e,i,(FcChar8 **) (n))
0139 #define XftPatternGetMatrix FcPatternGetMatrix
0140 #define XftPatternGetBool   FcPatternGetBool
0141 #define XftPatternVaBuild   FcPatternVaBuild
0142 #define XftPatternBuild     FcPatternBuild
0143 
0144 #define XftUtf8ToUcs4       FcUtf8ToUcs4
0145 #define XftUtf8Len      FcUtf8Len
0146 
0147 #define XftTypeVoid FcTypeVoid
0148 #define XftTypeInteger  FcTypeInteger
0149 #define XftTypeDouble   FcTypeDouble
0150 #define XftTypeString   FcTypeString
0151 #define XftTypeBool FcTypeBool
0152 #define XftTypeMatrix   FcTypeMatrix
0153 
0154 #define XftConfigSubstitute(p) FcConfigSubstitute (0, p, FcMatchPattern)
0155 
0156 _XFUNCPROTOBEGIN
0157 
0158 FcBool
0159 XftNameUnparse (XftPattern *pat, char *dest, int len);
0160 
0161 _XFUNCPROTOEND
0162 
0163 #endif /* _XFTCOMPAT_H_ */