Disabling auto-refresh of game list by default, as it is causing bugs sometimes
[open-ps2-loader.git] / thirdparty / freetype-2.3.12 / src / pfr / pfrload.h
blobed010715d1cd44717d3d325529d261882bdb39e1
1 /***************************************************************************/
2 /* */
3 /* pfrload.h */
4 /* */
5 /* FreeType PFR loader (specification). */
6 /* */
7 /* Copyright 2002 by */
8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */
9 /* */
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 */
12 /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
13 /* this file you indicate that you have read the license and */
14 /* understand and accept it fully. */
15 /* */
16 /***************************************************************************/
19 #ifndef __PFRLOAD_H__
20 #define __PFRLOAD_H__
22 #include "pfrobjs.h"
23 #include FT_INTERNAL_STREAM_H
26 FT_BEGIN_HEADER
28 #ifdef PFR_CONFIG_NO_CHECKS
29 #define PFR_CHECK( x ) do { } while ( 0 )
30 #else
31 #define PFR_CHECK( x ) do \
32 { \
33 if ( p + (x) > limit ) \
34 goto Too_Short; \
35 } while ( 0 )
36 #endif
38 #define PFR_NEXT_BYTE( p ) FT_NEXT_BYTE( p )
39 #define PFR_NEXT_INT8( p ) FT_NEXT_CHAR( p )
40 #define PFR_NEXT_SHORT( p ) FT_NEXT_SHORT( p )
41 #define PFR_NEXT_USHORT( p ) FT_NEXT_USHORT( p )
42 #define PFR_NEXT_LONG( p ) FT_NEXT_OFF3( p )
43 #define PFR_NEXT_ULONG( p ) FT_NEXT_UOFF3( p )
46 /* handling extra items */
48 typedef FT_Error
49 (*PFR_ExtraItem_ParseFunc)( FT_Byte* p,
50 FT_Byte* limit,
51 FT_Pointer data );
53 typedef struct PFR_ExtraItemRec_
55 FT_UInt type;
56 PFR_ExtraItem_ParseFunc parser;
58 } PFR_ExtraItemRec;
60 typedef const struct PFR_ExtraItemRec_* PFR_ExtraItem;
63 FT_LOCAL( FT_Error )
64 pfr_extra_items_skip( FT_Byte* *pp,
65 FT_Byte* limit );
67 FT_LOCAL( FT_Error )
68 pfr_extra_items_parse( FT_Byte* *pp,
69 FT_Byte* limit,
70 PFR_ExtraItem item_list,
71 FT_Pointer item_data );
74 /* load a PFR header */
75 FT_LOCAL( FT_Error )
76 pfr_header_load( PFR_Header header,
77 FT_Stream stream );
79 /* check a PFR header */
80 FT_LOCAL( FT_Bool )
81 pfr_header_check( PFR_Header header );
84 /* return number of logical fonts in this file */
85 FT_LOCAL( FT_Error )
86 pfr_log_font_count( FT_Stream stream,
87 FT_UInt32 log_section_offset,
88 FT_UInt *acount );
90 /* load a pfr logical font entry */
91 FT_LOCAL( FT_Error )
92 pfr_log_font_load( PFR_LogFont log_font,
93 FT_Stream stream,
94 FT_UInt face_index,
95 FT_UInt32 section_offset,
96 FT_Bool size_increment );
99 /* load a physical font entry */
100 FT_LOCAL( FT_Error )
101 pfr_phy_font_load( PFR_PhyFont phy_font,
102 FT_Stream stream,
103 FT_UInt32 offset,
104 FT_UInt32 size );
106 /* finalize a physical font */
107 FT_LOCAL( void )
108 pfr_phy_font_done( PFR_PhyFont phy_font,
109 FT_Memory memory );
111 /* */
113 FT_END_HEADER
115 #endif /* __PFRLOAD_H__ */
118 /* END */