Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
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 */
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,
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
int FT_Error
Definition: fttypes.h:296
GLuint GLuint stream
GLfloat GLfloat p
#define FT_END_HEADER
Definition: ftheader.h:54
pfr_phy_font_done(PFR_PhyFont phy_font, FT_Memory memory)
Definition: pfrload.c:668
pfr_extra_items_parse(FT_Byte **pp, FT_Byte *limit, PFR_ExtraItem item_list, FT_Pointer item_data)
Definition: pfrload.c:47
unsigned int FT_UInt32
Definition: ftconfig.h:133
const struct PFR_ExtraItemRec_ * PFR_ExtraItem
Definition: pfrload.h:60
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
pfr_log_font_count(FT_Stream stream, FT_UInt32 log_section_offset, FT_UInt *acount)
Definition: pfrload.c:200
FT_UInt type
Definition: pfrload.h:55
unsigned char FT_Byte
Definition: fttypes.h:150
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
pfr_header_check(PFR_Header header)
Definition: pfrload.c:173
#define FT_LOCAL(x)
Definition: ftconfig.h:235
GLsizei GLsizei GLenum GLenum const GLvoid * data
void * FT_Pointer
Definition: fttypes.h:307
PFR_ExtraItem_ParseFunc parser
Definition: pfrload.h:56
FT_Error(* PFR_ExtraItem_ParseFunc)(FT_Byte *p, FT_Byte *limit, FT_Pointer data)
Definition: pfrload.h:49
struct PFR_ExtraItemRec_ PFR_ExtraItemRec
pfr_header_load(PFR_Header header, FT_Stream stream)
Definition: pfrload.c:153
GLintptr offset
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
unsigned int FT_UInt
Definition: fttypes.h:227
pfr_extra_items_skip(FT_Byte **pp, FT_Byte *limit)
Definition: pfrload.c:39
pfr_log_font_load(PFR_LogFont log_font, FT_Stream stream, FT_UInt face_index, FT_UInt32 section_offset, FT_Bool size_increment)
Definition: pfrload.c:221
pfr_phy_font_load(PFR_PhyFont phy_font, FT_Stream stream, FT_UInt32 offset, FT_UInt32 size)
Definition: pfrload.c:712
GLsizeiptr size
GLint limit