1c76ae52dSmrg/* 2c76ae52dSmrg * Copyright © 2001 Keith Packard 3c76ae52dSmrg * 4c76ae52dSmrg * Permission to use, copy, modify, distribute, and sell this software and its 5c76ae52dSmrg * documentation for any purpose is hereby granted without fee, provided that 6c76ae52dSmrg * the above copyright notice appear in all copies and that both that 7c76ae52dSmrg * copyright notice and this permission notice appear in supporting 8c76ae52dSmrg * documentation, and that the name of Keith Packard not be used in 9c76ae52dSmrg * advertising or publicity pertaining to distribution of the software without 10c76ae52dSmrg * specific, written prior permission. Keith Packard makes no 11c76ae52dSmrg * representations about the suitability of this software for any purpose. It 12c76ae52dSmrg * is provided "as is" without express or implied warranty. 13c76ae52dSmrg * 14c76ae52dSmrg * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15c76ae52dSmrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16c76ae52dSmrg * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17c76ae52dSmrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18c76ae52dSmrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19c76ae52dSmrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20c76ae52dSmrg * PERFORMANCE OF THIS SOFTWARE. 21c76ae52dSmrg */ 22c76ae52dSmrg 23c76ae52dSmrg#ifndef _XFTCOMPAT_H_ 24c76ae52dSmrg#define _XFTCOMPAT_H_ 25c76ae52dSmrg#include <X11/Xfuncproto.h> 26c76ae52dSmrg 27c76ae52dSmrg/* 28c76ae52dSmrg * Compatibility definitions -- map Fc names to Xft names 29c76ae52dSmrg */ 30c76ae52dSmrg 31c76ae52dSmrgtypedef FcChar8 XftChar8; 32c76ae52dSmrgtypedef FcChar16 XftChar16; 33c76ae52dSmrgtypedef FcChar32 XftChar32; 34c76ae52dSmrg 35c76ae52dSmrg#define XFT_FAMILY FC_FAMILY 36c76ae52dSmrg#define XFT_STYLE FC_STYLE 37c76ae52dSmrg#define XFT_SLANT FC_SLANT 38c76ae52dSmrg#define XFT_WEIGHT FC_WEIGHT 39c76ae52dSmrg#define XFT_SIZE FC_SIZE 40c76ae52dSmrg#define XFT_PIXEL_SIZE FC_PIXEL_SIZE 41c76ae52dSmrg#define XFT_SPACING FC_SPACING 42c76ae52dSmrg#define XFT_FOUNDRY FC_FOUNDRY 43c76ae52dSmrg#define XFT_ANTIALIAS FC_ANTIALIAS 44c76ae52dSmrg#define XFT_FILE FC_FILE 45c76ae52dSmrg#define XFT_INDEX FC_INDEX 46c76ae52dSmrg#define XFT_RASTERIZER FC_RASTERIZER 47c76ae52dSmrg#define XFT_OUTLINE FC_OUTLINE 48c76ae52dSmrg#define XFT_SCALABLE FC_SCALABLE 49c76ae52dSmrg#define XFT_RGBA FC_RGBA 50c76ae52dSmrg 51c76ae52dSmrg/* defaults from resources */ 52c76ae52dSmrg#define XFT_SCALE FC_SCALE 53c76ae52dSmrg#define XFT_MINSPACE FC_MINSPACE 54c76ae52dSmrg#define XFT_DPI FC_DPI 55c76ae52dSmrg 56c76ae52dSmrg/* specific to FreeType rasterizer */ 57c76ae52dSmrg#define XFT_CHAR_WIDTH FC_CHAR_WIDTH 58c76ae52dSmrg#define XFT_CHAR_HEIGHT FC_CHAR_HEIGHT 59c76ae52dSmrg#define XFT_MATRIX FC_MATRIX 60c76ae52dSmrg 61c76ae52dSmrg#define XFT_WEIGHT_LIGHT FC_WEIGHT_LIGHT 62c76ae52dSmrg#define XFT_WEIGHT_MEDIUM FC_WEIGHT_MEDIUM 63c76ae52dSmrg#define XFT_WEIGHT_DEMIBOLD FC_WEIGHT_DEMIBOLD 64c76ae52dSmrg#define XFT_WEIGHT_BOLD FC_WEIGHT_BOLD 65c76ae52dSmrg#define XFT_WEIGHT_BLACK FC_WEIGHT_BLACK 66c76ae52dSmrg 67c76ae52dSmrg#define XFT_SLANT_ROMAN FC_SLANT_ROMAN 68c76ae52dSmrg#define XFT_SLANT_ITALIC FC_SLANT_ITALIC 69c76ae52dSmrg#define XFT_SLANT_OBLIQUE FC_SLANT_OBLIQUE 70c76ae52dSmrg 71c76ae52dSmrg#define XFT_PROPORTIONAL FC_PROPORTIONAL 72c76ae52dSmrg#define XFT_MONO FC_MONO 73c76ae52dSmrg#define XFT_CHARCELL FC_CHARCELL 74c76ae52dSmrg 75c76ae52dSmrg#define XFT_RGBA_UNKNOWN FC_RGBA_UNKNOWN 76c76ae52dSmrg#define XFT_RGBA_RGB FC_RGBA_RGB 77c76ae52dSmrg#define XFT_RGBA_BGR FC_RGBA_BGR 78c76ae52dSmrg#define XFT_RGBA_VRGB FC_RGBA_VRGB 79c76ae52dSmrg#define XFT_RGBA_VBGR FC_RGBA_VBGR 80c76ae52dSmrg#define XFT_RGBA_NONE FC_RGBA_NONE 81c76ae52dSmrg 82c76ae52dSmrg/* 83c76ae52dSmrg * Old constants 84c76ae52dSmrg */ 85c76ae52dSmrg#define XFT_ENCODING "encoding" 86c76ae52dSmrg 87c76ae52dSmrgtypedef FcType XftType; 88c76ae52dSmrg 89c76ae52dSmrgtypedef FcMatrix XftMatrix; 90c76ae52dSmrg 91c76ae52dSmrg#define XftMatrixInit(m) FcMatrixInit(m) 92c76ae52dSmrg 93c76ae52dSmrgtypedef FcResult XftResult; 94c76ae52dSmrg 95c76ae52dSmrg#define XftResultMatch FcResultMatch 96c76ae52dSmrg#define XftResultNoMatch FcResultNoMatch 97c76ae52dSmrg#define XftResultTypeMismatch FcResultTypeMismatch 98c76ae52dSmrg#define XftResultNoId FcResultNoId 99c76ae52dSmrg 100c76ae52dSmrgtypedef FcValue XftValue; 101c76ae52dSmrgtypedef FcPattern XftPattern; 102c76ae52dSmrgtypedef FcFontSet XftFontSet; 103c76ae52dSmrgtypedef FcObjectSet XftObjectSet; 104c76ae52dSmrg 105c76ae52dSmrg#define XftGlyphExists XftCharExists 106c76ae52dSmrg 107c76ae52dSmrg#define XftObjectSetCreate FcObjectSetCreate 108c76ae52dSmrg#define XftObjectSetAdd FcObjectSetAdd 109c76ae52dSmrg#define XftObjectSetDestroy FcObjectSetDestroy 110c76ae52dSmrg#define XftObjectSetVaBuild FcObjectSetVaBuild 111c76ae52dSmrg#define XftObjectSetBuild FcObjectSetBuild 112c76ae52dSmrg 113c76ae52dSmrg#define XftFontSetMatch FcFontSetMatch 114c76ae52dSmrg#define XftFontSetDestroy FcFontSetDestroy 115c76ae52dSmrg 116c76ae52dSmrg#define XftMatrixEqual FcMatrixEqual 117c76ae52dSmrg#define XftMatrixMultiply FcMatrixMultiply 118c76ae52dSmrg#define XftMatrixRotate FcMatrixRotate 119c76ae52dSmrg#define XftMatrixScale FcMatrixScale 120c76ae52dSmrg#define XftMatrixShear FcMatrixShear 121c76ae52dSmrg 122c76ae52dSmrg#define XftPatternCreate FcPatternCreate 123c76ae52dSmrg#define XftPatternDuplicate FcPatternDuplicate 124c76ae52dSmrg#define XftValueDestroy FcValueDestroy 125c76ae52dSmrg#define XftValueListDestroy FcValueListDestroy 126c76ae52dSmrg#define XftPatternDestroy FcPatternDestroy 127c76ae52dSmrg#define XftPatternFind FcPatternFind 128c76ae52dSmrg#define XftPatternAdd FcPatternAdd 129c76ae52dSmrg#define XftPatternGet FcPatternGet 130c76ae52dSmrg#define XftPatternDel FcPatternDel 131c76ae52dSmrg#define XftPatternAddInteger FcPatternAddInteger 132c76ae52dSmrg#define XftPatternAddDouble FcPatternAddDouble 133c76ae52dSmrg#define XftPatternAddString(p,e,s) FcPatternAddString(p,e,(FcChar8 *)(s)) 134c76ae52dSmrg#define XftPatternAddMatrix FcPatternAddMatrix 135c76ae52dSmrg#define XftPatternAddBool FcPatternAddBool 136c76ae52dSmrg#define XftPatternGetInteger FcPatternGetInteger 137c76ae52dSmrg#define XftPatternGetDouble FcPatternGetDouble 138c76ae52dSmrg#define XftPatternGetString(p,e,i,n) FcPatternGetString(p,e,i,(FcChar8 **) (n)) 139c76ae52dSmrg#define XftPatternGetMatrix FcPatternGetMatrix 140c76ae52dSmrg#define XftPatternGetBool FcPatternGetBool 141c76ae52dSmrg#define XftPatternVaBuild FcPatternVaBuild 142c76ae52dSmrg#define XftPatternBuild FcPatternBuild 143c76ae52dSmrg 144c76ae52dSmrg#define XftUtf8ToUcs4 FcUtf8ToUcs4 145c76ae52dSmrg#define XftUtf8Len FcUtf8Len 146c76ae52dSmrg 147c76ae52dSmrg#define XftTypeVoid FcTypeVoid 148c76ae52dSmrg#define XftTypeInteger FcTypeInteger 149c76ae52dSmrg#define XftTypeDouble FcTypeDouble 150c76ae52dSmrg#define XftTypeString FcTypeString 151c76ae52dSmrg#define XftTypeBool FcTypeBool 152c76ae52dSmrg#define XftTypeMatrix FcTypeMatrix 153c76ae52dSmrg 154c76ae52dSmrg#define XftConfigSubstitute(p) FcConfigSubstitute (0, p, FcMatchPattern) 155c76ae52dSmrg 156c76ae52dSmrg#endif /* _XFTCOMPAT_H_ */ 157