ReactOS 0.4.15-dev-5666-gc548b97
pfrload.h
Go to the documentation of this file.
1/***************************************************************************/
2/* */
3/* pfrload.h */
4/* */
5/* FreeType PFR loader (specification). */
6/* */
7/* Copyright 2002-2018 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 /* some size checks should be always done (mainly to prevent */
29 /* excessive allocation for malformed data), ... */
30#define PFR_CHECK_SIZE( x ) do \
31 { \
32 if ( p + (x) > limit ) \
33 goto Too_Short; \
34 } while ( 0 )
35
36 /* ... and some only if intensive checking is explicitly requested */
37#ifdef PFR_CONFIG_NO_CHECKS
38#define PFR_CHECK( x ) do { } while ( 0 )
39#else
40#define PFR_CHECK PFR_CHECK_SIZE
41#endif
42
43#define PFR_NEXT_BYTE( p ) FT_NEXT_BYTE( p )
44#define PFR_NEXT_INT8( p ) FT_NEXT_CHAR( p )
45#define PFR_NEXT_SHORT( p ) FT_NEXT_SHORT( p )
46#define PFR_NEXT_USHORT( p ) FT_NEXT_USHORT( p )
47#define PFR_NEXT_LONG( p ) FT_NEXT_OFF3( p )
48#define PFR_NEXT_ULONG( p ) FT_NEXT_UOFF3( p )
49
50
51 /* handling extra items */
52
53 typedef FT_Error
57
58 typedef struct PFR_ExtraItemRec_
59 {
62
64
65 typedef const struct PFR_ExtraItemRec_* PFR_ExtraItem;
66
67
70 FT_Byte* limit );
71
75 PFR_ExtraItem item_list,
76 FT_Pointer item_data );
77
78
79 /* load a PFR header */
83
84 /* check a PFR header */
87
88
89 /* return number of logical fonts in this file */
92 FT_UInt32 log_section_offset,
93 FT_Long *acount );
94
95 /* load a pfr logical font entry */
99 FT_UInt face_index,
100 FT_UInt32 section_offset,
101 FT_Bool size_increment );
102
103
104 /* load a physical font entry */
108 FT_UInt32 offset,
109 FT_UInt32 size );
110
111 /* finalize a physical font */
112 FT_LOCAL( void )
115
116 /* */
117
119
120#endif /* PFRLOAD_H_ */
121
122
123/* END */
#define FT_LOCAL(x)
Definition: ftconfig.h:387
#define FT_END_HEADER
Definition: ftheader.h:54
#define FT_BEGIN_HEADER
Definition: ftheader.h:36
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:108
unsigned char FT_Byte
Definition: fttypes.h:154
int FT_Error
Definition: fttypes.h:300
signed long FT_Long
Definition: fttypes.h:242
unsigned int FT_UInt
Definition: fttypes.h:231
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLint limit
Definition: glext.h:10326
GLfloat GLfloat p
Definition: glext.h:8902
GLintptr offset
Definition: glext.h:5920
static char memory[1024 *256]
Definition: process.c:116
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:327
pfr_log_font_count(FT_Stream stream, FT_UInt32 log_section_offset, FT_Long *acount)
Definition: pfrload.c:289
const struct PFR_ExtraItemRec_ * PFR_ExtraItem
Definition: pfrload.h:65
struct PFR_ExtraItemRec_ PFR_ExtraItemRec
pfr_extra_items_parse(FT_Byte **pp, FT_Byte *limit, PFR_ExtraItem item_list, FT_Pointer item_data)
Definition: pfrload.c:134
pfr_extra_items_skip(FT_Byte **pp, FT_Byte *limit)
Definition: pfrload.c:126
pfr_header_load(PFR_Header header, FT_Stream stream)
Definition: pfrload.c:241
FT_Error(* PFR_ExtraItem_ParseFunc)(FT_Byte *p, FT_Byte *limit, FT_Pointer data)
Definition: pfrload.h:54
pfr_phy_font_done(PFR_PhyFont phy_font, FT_Memory memory)
Definition: pfrload.c:778
pfr_header_check(PFR_Header header)
Definition: pfrload.c:261
pfr_phy_font_load(PFR_PhyFont phy_font, FT_Stream stream, FT_UInt32 offset, FT_UInt32 size)
Definition: pfrload.c:822
FT_BEGIN_HEADER struct PFR_HeaderRec_ * PFR_Header
FT_UInt type
Definition: pfrload.h:60
PFR_ExtraItem_ParseFunc parser
Definition: pfrload.h:61
Definition: parse.h:23