Hash :
3469d0d0
Author :
Date :
2000-07-19T20:02:14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
/***************************************************************************/
/* */
/* ahloader.h */
/* */
/* Glyph loader implementation for the auto-hinting module */
/* This defines the AG_GlyphLoader type in two different ways: */
/* */
/* - when the module is compiled within FreeType 2, the type */
/* is simply a typedef to FT_GlyphLoader */
/* */
/* - when the module is compiled as a standalone object, */
/* AG_GlyphLoader has its own implementation.. */
/* */
/* Copyright 2000: Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
/* be used, modified, and distributed under the terms of the Catharon */
/* Open Source License that should come with this file under the name */
/* "CatharonLicense.txt". By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/* Note that this license is compatible with the FreeType license */
/* */
/***************************************************************************/
#ifndef AGLOADER_H
#define AGLOADER_H
#ifdef _STANDALONE_
typedef struct AH_GlyphLoad_
{
FT_Outline outline; /* outline */
FT_UInt num_subglyphs; /* number of subglyphs */
FT_SubGlyph* subglyphs; /* subglyphs */
FT_Vector* extra_points; /* extra points table.. */
} AH_GlyphLoad;
struct AH_GlyphLoader_
{
FT_Memory memory;
FT_UInt max_points;
FT_UInt max_contours;
FT_UInt max_subglyphs;
FT_Bool use_extra;
AH_GlyphLoad base;
AH_GlyphLoad current;
void* other; /* for possible future extension ? */
};
LOCAL_DEF FT_Error AH_GlyphLoader_New( FT_Memory memory,
AH_GlyphLoader* *aloader );
LOCAL_DEF FT_Error AH_GlyphLoader_Create_Extra( AH_GlyphLoader* loader );
LOCAL_DEF void AH_GlyphLoader_Done( AH_GlyphLoader* loader );
LOCAL_DEF void AH_GlyphLoader_Reset( AH_GlyphLoader* loader );
LOCAL_DEF void AH_GlyphLoader_Rewind( AH_GlyphLoader* loader );
LOCAL_DEF FT_Error AH_GlyphLoader_Check_Points( AH_GlyphLoader* loader,
FT_UInt n_points,
FT_UInt n_contours );
LOCAL_DEF FT_Error AH_GlyphLoader_Check_Subglyphs( AH_GlyphLoader* loader,
FT_UInt n_subs );
LOCAL_DEF void AH_GlyphLoader_Prepare( AH_GlyphLoader* loader );
LOCAL_DEF void AH_GlyphLoader_Add( AH_GlyphLoader* loader );
LOCAL_DEF FT_Error AH_GlyphLoader_Copy_Points( AH_GlyphLoader* target,
FT_GlyphLoader* source );
#else
#include <freetype/internal/ftobjs.h>
#define AH_Load FT_GlyphLoad
#define AH_Loader FT_GlyphLoader
#define ah_loader_new FT_GlyphLoader_New
#define ah_loader_done FT_GlyphLoader_Done
#define ah_loader_reset FT_GlyphLoader_Reset
#define ah_loader_rewind FT_GlyphLoader_Rewind
#define ah_loader_create_extra FT_GlyphLoader_Create_Extra
#define ah_loader_check_points FT_GlyphLoader_Check_Points
#define ah_loader_check_subglyphs FT_GlyphLoader_Check_Subglyphs
#define ah_loader_prepare FT_GlyphLoader_Prepare
#define ah_loader_add FT_GlyphLoader_Add
#define ah_loader_copy_points FT_GlyphLoader_Copy_Points
#endif
#endif /* AGLOADER_H */