| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* ftgloadr.h */ | 3 /* ftgloadr.h */ |
| 4 /* */ | 4 /* */ |
| 5 /* The FreeType glyph loader (specification). */ | 5 /* The FreeType glyph loader (specification). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 2002, 2003, 2005, 2006 by */ | 7 /* Copyright 2002, 2003, 2005, 2006 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
| 11 /* modified, and distributed under the terms of the FreeType project */ | 11 /* modified, and distributed under the terms of the FreeType project */ |
| 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ | 12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ |
| 13 /* this file you indicate that you have read the license and */ | 13 /* this file you indicate that you have read the license and */ |
| 14 /* understand and accept it fully. */ | 14 /* understand and accept it fully. */ |
| 15 /* */ | 15 /* */ |
| 16 /***************************************************************************/ | 16 /***************************************************************************/ |
| 17 | 17 |
| 18 | 18 |
| 19 #ifndef __FTGLOADR_H__ | 19 #ifndef __FTGLOADR_H__ |
| 20 #define __FTGLOADR_H__ | 20 #define __FTGLOADR_H__ |
| 21 | 21 |
| 22 | 22 |
| 23 #include "../../ft2build.h" | 23 #include <ft2build.h> |
| 24 #include "../freetype.h" | 24 #include FT_FREETYPE_H |
| 25 | 25 |
| 26 | 26 |
| 27 FT_BEGIN_HEADER | 27 FT_BEGIN_HEADER |
| 28 | 28 |
| 29 | 29 |
| 30 /*************************************************************************/ | 30 /*************************************************************************/ |
| 31 /* */ | 31 /* */ |
| 32 /* <Struct> */ | 32 /* <Struct> */ |
| 33 /* FT_GlyphLoader */ | 33 /* FT_GlyphLoader */ |
| 34 /* */ | 34 /* */ |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 FT_GlyphLoader_Rewind( FT_GlyphLoader loader ); | 114 FT_GlyphLoader_Rewind( FT_GlyphLoader loader ); |
| 115 | 115 |
| 116 /* check that there is enough space to add `n_points' and `n_contours' */ | 116 /* check that there is enough space to add `n_points' and `n_contours' */ |
| 117 /* to the glyph loader */ | 117 /* to the glyph loader */ |
| 118 FT_BASE( FT_Error ) | 118 FT_BASE( FT_Error ) |
| 119 FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader, | 119 FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader, |
| 120 FT_UInt n_points, | 120 FT_UInt n_points, |
| 121 FT_UInt n_contours ); | 121 FT_UInt n_contours ); |
| 122 | 122 |
| 123 | 123 |
| 124 #define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \ | 124 #define FT_GLYPHLOADER_CHECK_P( _loader, _count ) \ |
| 125 ( (_count) == 0 || ((_loader)->base.outline.n_points + \ | 125 ( (_count) == 0 || \ |
| 126 (_loader)->current.outline.n_points + \ | 126 ( (_loader)->base.outline.n_points + \ |
| 127 (unsigned long)(_count)) <= (_loader)->max_points ) | 127 (_loader)->current.outline.n_points + \ |
| 128 (unsigned long)(_count) ) <= (_loader)->max_points ) |
| 128 | 129 |
| 129 #define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \ | 130 #define FT_GLYPHLOADER_CHECK_C( _loader, _count ) \ |
| 130 ( (_count) == 0 || ((_loader)->base.outline.n_contours + \ | 131 ( (_count) == 0 || \ |
| 131 (_loader)->current.outline.n_contours + \ | 132 ( (_loader)->base.outline.n_contours + \ |
| 132 (unsigned long)(_count)) <= (_loader)->max_contours ) | 133 (_loader)->current.outline.n_contours + \ |
| 134 (unsigned long)(_count)) <= (_loader)->max_contours ) |
| 133 | 135 |
| 134 #define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours ) \ | 136 #define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points, _contours ) \ |
| 135 ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \ | 137 ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points ) && \ |
| 136 FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \ | 138 FT_GLYPHLOADER_CHECK_C( _loader, _contours ) ) \ |
| 137 ? 0 \ | 139 ? 0 \ |
| 138 : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) ) | 140 : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) ) |
| 139 | 141 |
| 140 | 142 |
| 141 /* check that there is enough space to add `n_subs' sub-glyphs to */ | 143 /* check that there is enough space to add `n_subs' sub-glyphs to */ |
| 142 /* a glyph loader */ | 144 /* a glyph loader */ |
| 143 FT_BASE( FT_Error ) | 145 FT_BASE( FT_Error ) |
| 144 FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader, | 146 FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader, |
| 145 FT_UInt n_subs ); | 147 FT_UInt n_subs ); |
| 146 | 148 |
| 147 /* prepare a glyph loader, i.e. empty the current glyph */ | 149 /* prepare a glyph loader, i.e. empty the current glyph */ |
| (...skipping 11 matching lines...) Expand all Loading... |
| 159 | 161 |
| 160 /* */ | 162 /* */ |
| 161 | 163 |
| 162 | 164 |
| 163 FT_END_HEADER | 165 FT_END_HEADER |
| 164 | 166 |
| 165 #endif /* __FTGLOADR_H__ */ | 167 #endif /* __FTGLOADR_H__ */ |
| 166 | 168 |
| 167 | 169 |
| 168 /* END */ | 170 /* END */ |
| OLD | NEW |