2 pygame - Python Game Library
3 Copyright (C) 2009 Vicent Marti
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #ifndef _PYGAME_FREETYPE_INTERNAL_H_
21 #define _PYGAME_FREETYPE_INTERNAL_H_
23 #define PGFT_PYGAME1_COMPAT
24 #define HAVE_PYGAME_SDL_VIDEO
25 #define HAVE_PYGAME_SDL_RWOPS
28 #include "pgplatform.h"
32 #include FT_FREETYPE_H
35 #include FT_TRIGONOMETRY_H
37 /**********************************************************
38 * Global module constants
39 **********************************************************/
42 #define FT_STYLE_NORMAL 0x00
43 #define FT_STYLE_STRONG 0x01
44 #define FT_STYLE_OBLIQUE 0x02
45 #define FT_STYLE_UNDERLINE 0x04
46 #define FT_STYLE_WIDE 0x08
47 #define FT_STYLE_DEFAULT 0xFF
49 /* Bounding box modes */
50 #define FT_BBOX_EXACT FT_GLYPH_BBOX_SUBPIXELS
51 #define FT_BBOX_EXACT_GRIDFIT FT_GLYPH_BBOX_GRIDFIT
52 #define FT_BBOX_PIXEL FT_GLYPH_BBOX_TRUNCATE
53 #define FT_BBOX_PIXEL_GRIDFIT FT_GLYPH_BBOX_PIXELS
56 #define FT_RFLAG_NONE (0)
57 #define FT_RFLAG_ANTIALIAS (1 << 0)
58 #define FT_RFLAG_AUTOHINT (1 << 1)
59 #define FT_RFLAG_VERTICAL (1 << 2)
60 #define FT_RFLAG_HINTED (1 << 3)
61 #define FT_RFLAG_KERNING (1 << 4)
62 #define FT_RFLAG_TRANSFORM (1 << 5)
63 #define FT_RFLAG_PAD (1 << 6)
64 #define FT_RFLAG_ORIGIN (1 << 7)
65 #define FT_RFLAG_UCS4 (1 << 8)
66 #define FT_RFLAG_USE_BITMAP_STRIKES (1 << 9)
67 #define FT_RFLAG_DEFAULTS (FT_RFLAG_HINTED | \
68 FT_RFLAG_USE_BITMAP_STRIKES | \
72 #define FT_RENDER_NEWBYTEARRAY 0x0
73 #define FT_RENDER_NEWSURFACE 0x1
74 #define FT_RENDER_EXISTINGSURFACE 0x2
76 /**********************************************************
78 **********************************************************/
80 typedef struct _scale_s {
83 typedef FT_Angle Angle_t;
85 struct fontinternals_;
86 struct freetypeinstance_;
90 FT_Open_Args open_args;
102 FT_Int16 render_flags;
104 double underline_adjustment;
111 struct freetypeinstance_ *freetype; /* Personal reference */
112 struct fontinternals_ *_internals;
115 #define pgFont_IS_ALIVE(o) \
116 (((pgFontObject *)(o))->_internals != 0)
118 /* import public API */
119 #include "include/pygame_freetype.h"
121 #define PYGAMEAPI_FREETYPE_NUMSLOTS 2
123 #endif /* ~_PYGAME_FREETYPE_INTERNAL_H_ */