zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pfrload.h
Go to the documentation of this file.
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 /***************************************************************************/
17 
18 
19 #ifndef __PFRLOAD_H__
20 #define __PFRLOAD_H__
21 
22 #include "pfrobjs.h"
23 #include FT_INTERNAL_STREAM_H
24 
25 
27 
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
37 
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 )
44 
45 
46  /* handling extra items */
47 
48  typedef FT_Error
50  FT_Byte* limit,
51  FT_Pointer data );
52 
53  typedef struct PFR_ExtraItemRec_
54  {
57 
59 
60  typedef const struct PFR_ExtraItemRec_* PFR_ExtraItem;
61 
62 
65  FT_Byte* limit );
66 
69  FT_Byte* limit,
70  PFR_ExtraItem item_list,
71  FT_Pointer item_data );
72 
73 
74  /* load a PFR header */
77  FT_Stream stream );
78 
79  /* check a PFR header */
80  FT_LOCAL( FT_Bool )
81  pfr_header_check( PFR_Header header );
82 
83 
84  /* return number of logical fonts in this file */
87  FT_UInt32 log_section_offset,
88  FT_UInt *acount );
89 
90  /* load a pfr logical font entry */
93  FT_Stream stream,
94  FT_UInt face_index,
95  FT_UInt32 section_offset,
96  FT_Bool size_increment );
97 
98 
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 );
105 
106  /* finalize a physical font */
107  FT_LOCAL( void )
108  pfr_phy_font_done( PFR_PhyFont phy_font,
109  FT_Memory memory );
110 
111  /* */
112 
114 
115 #endif /* __PFRLOAD_H__ */
116 
117 
118 /* END */
FT_BEGIN_HEADER struct PFR_HeaderRec_ * PFR_Header
pfr_header_load(PFR_Header header, FT_Stream stream)
Definition: pfrload.c:153
int FT_Error
Definition: fttypes.h:296
cannot open resource broken file module version is too low unimplemented feature broken offset within table missing module invalid character code cannot render this glyph format invalid composite glyph invalid pixel size invalid library handle invalid face handle invalid glyph slot handle invalid cache manager handle too many modules out of memory cannot open stream invalid stream skip invalid stream operation nested frame access raster uninitialized raster overflow too many registered caches too few arguments code overflow division by zero found debug opcode nested DEFS execution context too long too many instruction definitions horizontal header(hhea) table missing" ) FT_ERRORDEF_( Locations_Missing
struct PFR_ExtraItemRec_ * PFR_ExtraItem
Definition: pfrload.h:60
#define FT_END_HEADER
Definition: ftheader.h:54
GLuint GLuint stream
Definition: glew.h:6573
pfr_header_check(PFR_Header header)
Definition: pfrload.c:173
png_sPLT_entryp pp
Definition: pngrutil.c:1375
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
FT_UInt type
Definition: pfrload.h:55
pfr_log_font_count(FT_Stream stream, FT_UInt32 section_offset, FT_UInt *acount)
Definition: pfrload.c:200
unsigned char FT_Byte
Definition: fttypes.h:150
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
#define FT_LOCAL(x)
Definition: ftconfig.h:466
pfr_extra_items_skip(FT_Byte **pp, FT_Byte *limit)
Definition: pfrload.c:39
FT_Error(* PFR_ExtraItem_ParseFunc)(FT_Byte *p, FT_Byte *limit, FT_Pointer data)
Definition: pfrload.h:49
pfr_phy_font_load(PFR_PhyFont phy_font, FT_Stream stream, FT_UInt32 offset, FT_UInt32 size)
Definition: pfrload.c:712
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl2ext.h:848
void * FT_Pointer
Definition: fttypes.h:307
PFR_ExtraItem_ParseFunc parser
Definition: pfrload.h:56
GLfloat GLfloat p
Definition: glew.h:14938
struct PFR_ExtraItemRec_ PFR_ExtraItemRec
GLint limit
Definition: glew.h:11829
pfr_log_font_load(PFR_LogFont log_font, FT_Stream stream, FT_UInt idx, FT_UInt32 section_offset, FT_Bool size_increment)
Definition: pfrload.c:221
pfr_extra_items_parse(FT_Byte **pp, FT_Byte *limit, PFR_ExtraItem item_list, FT_Pointer item_data)
Definition: pfrload.c:47
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
GLintptr offset
Definition: glew.h:1668
unsigned int FT_UInt
Definition: fttypes.h:227
pfr_phy_font_done(PFR_PhyFont phy_font, FT_Memory memory)
Definition: pfrload.c:668
GLsizei size
Definition: gl2ext.h:1467