source: trunk/poppler/fc-emulate-os2/fontconfig/fontconfig.h @ 71

Last change on this file since 71 was 71, checked in by Eugene Romanenko, 15 years ago

fontconfig replacement fixes, removed wrong text in file headers

File size: 4.4 KB
Line 
1/*
2 * Copyright (c) 2006, Eugene Romanenko, netlabs.org
3 *
4 *----------------------------------------------------------------------
5 * This file is part of poppler plugin for Lucide (lupoppler).
6 *
7 *  lupoppler is free software; you can redistribute it and/or modify
8 *  it under the terms of the GNU General Public License as published by
9 *  the Free Software Foundation; either version 2 of the License, or
10 *  (at your option) any later version.
11 *
12 *  lupoppler is distributed in the hope that it will be useful,
13 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 *  GNU General Public License for more details.
16 *----------------------------------------------------------------------
17 */
18
19// This file is fontconfig replacement which emulates functions
20// used by poppler.
21
22#ifndef _ERFONTCONFIG_H_
23#define _ERFONTCONFIG_H_
24
25typedef unsigned char   FcChar8;
26typedef unsigned short  FcChar16;
27typedef unsigned int    FcChar32;
28typedef int             FcBool;
29
30
31#define FcTrue      1
32#define FcFalse     0
33
34#define FC_FAMILY           "family"            /* String */
35#define FC_STYLE            "style"             /* String */
36#define FC_SLANT            "slant"             /* Int */
37#define FC_WEIGHT           "weight"            /* Int */
38#define FC_SPACING          "spacing"           /* Int */
39#define FC_WIDTH            "width"             /* Int */
40#define FC_FILE             "file"              /* String */
41#define FC_INDEX            "index"             /* Int */
42#define FC_LANG             "lang"              /* String RFC 3066 langs */
43
44#define FC_WEIGHT_EXTRALIGHT    40
45#define FC_WEIGHT_LIGHT         50
46#define FC_WEIGHT_REGULAR       80
47#define FC_WEIGHT_NORMAL        FC_WEIGHT_REGULAR
48#define FC_WEIGHT_MEDIUM        100
49#define FC_WEIGHT_DEMIBOLD      180
50#define FC_WEIGHT_SEMIBOLD      FC_WEIGHT_DEMIBOLD
51#define FC_WEIGHT_BOLD          200
52#define FC_WEIGHT_EXTRABOLD     205
53#define FC_WEIGHT_ULTRABOLD     FC_WEIGHT_EXTRABOLD
54#define FC_WEIGHT_BLACK         210
55
56#define FC_SLANT_ROMAN          0
57#define FC_SLANT_ITALIC         100
58#define FC_SLANT_OBLIQUE        110
59
60#define FC_WIDTH_ULTRACONDENSED     50
61#define FC_WIDTH_EXTRACONDENSED     63
62#define FC_WIDTH_CONDENSED          75
63#define FC_WIDTH_SEMICONDENSED      87
64#define FC_WIDTH_NORMAL             100
65#define FC_WIDTH_SEMIEXPANDED       113
66#define FC_WIDTH_EXPANDED           125
67#define FC_WIDTH_EXTRAEXPANDED      150
68#define FC_WIDTH_ULTRAEXPANDED      200
69
70
71#define FC_PROPORTIONAL         0
72#define FC_MONO                 100
73
74typedef enum _FcType {
75    FcTypeVoid,
76    FcTypeInteger,
77    FcTypeDouble,
78    FcTypeString,
79    FcTypeBool,
80    FcTypeMatrix,
81    FcTypeCharSet,
82    FcTypeFTFace,
83    FcTypeLangSet
84} FcType;
85
86
87/*
88 * A data structure to represent the available glyphs in a font.
89 * This is represented as a sparse boolean btree.
90 */
91
92typedef enum _FcResult {
93    FcResultMatch, FcResultNoMatch, FcResultTypeMismatch, FcResultNoId,
94    FcResultOutOfMemory
95} FcResult;
96
97typedef struct _FcPattern   FcPattern;
98
99
100typedef struct _FcFontSet {
101    int     nfont;
102    int     sfont;
103    FcPattern   **fonts;
104} FcFontSet;
105
106typedef enum _FcMatchKind {
107    FcMatchPattern, FcMatchFont
108} FcMatchKind;
109
110
111typedef struct _FcConfig    FcConfig;
112
113typedef struct _FcCharSet FcCharSet;
114
115
116FcConfig *FcConfigGetCurrent();
117
118
119FcBool FcConfigSubstitute( FcConfig *config, FcPattern *p, FcMatchKind kind );
120
121void FcDefaultSubstitute( FcPattern *pattern );
122
123void FcFontSetDestroy( FcFontSet *s );
124
125FcBool FcInit();
126
127FcFontSet *FcFontSort( FcConfig *config, FcPattern *p, FcBool trim,
128                       FcCharSet **csp, FcResult *result );
129
130void FcFontSetSortDestroy( FcFontSet *fs );
131
132void FcPatternDestroy( FcPattern *p );
133
134FcResult FcPatternGetInteger( const FcPattern *p, const char *object, int n, int *i );
135
136FcResult FcPatternGetString( const FcPattern *p, const char *object, int n, FcChar8 **s );
137
138//FcPattern *FcPatternBuild( FcPattern *orig, ... );
139
140FcPattern *FcPatternBuild(void *,
141                                        const char *fcFamily, FcType tFamily, const char *family,
142                                        const char *fcSlant, FcType tSlant, int slant,
143                                        const char *fcWeight, FcType tWeight, int weight,
144                                        const char *fcWidth, FcType tWidth, int width,
145                                        const char *fcSpacing, FcType tSpacing, int spacing,
146                                        const char *fcLang, FcType tLang, const char *lang,
147                    void *);
148
149#endif // _ERFONTCONFIG_H_
150
Note: See TracBrowser for help on using the repository browser.