sdk-world
v2026.11.05
PS2 SDK - world tier (copyleft-allowed, non-essential packages)
Toggle main menu visibility
Loading...
Searching...
No Matches
pfrload.h
Go to the documentation of this file.
1
/****************************************************************************
2
*
3
* pfrload.h
4
*
5
* FreeType PFR loader (specification).
6
*
7
* Copyright (C) 2002-2025 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
23
#ifndef PFRLOAD_H_
24
#define PFRLOAD_H_
25
26
#include "
pfrobjs.h
"
27
#include <
freetype/internal/ftstream.h
>
28
29
30
FT_BEGIN_HEADER
31
32
/* some size checks should be always done (mainly to prevent */
33
/* excessive allocation for malformed data), ... */
34
#define PFR_CHECK_SIZE( x ) do \
35
{ \
36
if ( p + (x) > limit ) \
37
goto Too_Short; \
38
} while ( 0 )
39
40
/* ... and some only if intensive checking is explicitly requested */
41
#ifdef PFR_CONFIG_NO_CHECKS
42
#define PFR_CHECK( x ) do { } while ( 0 )
43
#else
44
#define PFR_CHECK PFR_CHECK_SIZE
45
#endif
46
47
#define PFR_NEXT_BYTE( p ) FT_NEXT_BYTE( p )
48
#define PFR_NEXT_INT8( p ) FT_NEXT_CHAR( p )
49
#define PFR_NEXT_SHORT( p ) FT_NEXT_SHORT( p )
50
#define PFR_NEXT_USHORT( p ) FT_NEXT_USHORT( p )
51
#define PFR_NEXT_LONG( p ) FT_NEXT_OFF3( p )
52
#define PFR_NEXT_ULONG( p ) FT_NEXT_UOFF3( p )
53
54
55
/* handling extra items */
56
57
typedef
FT_Error
58
(*PFR_ExtraItem_ParseFunc)( FT_Byte* p,
59
FT_Byte* limit,
60
FT_Pointer data );
61
62
typedef
struct
PFR_ExtraItemRec_
63
{
64
FT_UInt type;
65
PFR_ExtraItem_ParseFunc parser;
66
67
} PFR_ExtraItemRec;
68
69
typedef
const
struct
PFR_ExtraItemRec_
* PFR_ExtraItem;
70
71
72
FT_LOCAL( FT_Error )
73
pfr_extra_items_skip( FT_Byte* *pp,
74
FT_Byte* limit );
75
76
FT_LOCAL( FT_Error )
77
pfr_extra_items_parse( FT_Byte* *pp,
78
FT_Byte* limit,
79
PFR_ExtraItem item_list,
80
FT_Pointer item_data );
81
82
83
/* load a PFR header */
84
FT_LOCAL( FT_Error )
85
pfr_header_load( PFR_Header header,
86
FT_Stream stream );
87
88
/* check a PFR header */
89
FT_LOCAL( FT_Bool )
90
pfr_header_check( PFR_Header header );
91
92
93
/* return number of logical fonts in this file */
94
FT_LOCAL( FT_Error )
95
pfr_log_font_count( FT_Stream stream,
96
FT_UInt32 log_section_offset,
97
FT_Long *acount );
98
99
/* load a pfr logical font entry */
100
FT_LOCAL( FT_Error )
101
pfr_log_font_load( PFR_LogFont log_font,
102
FT_Stream stream,
103
FT_UInt face_index,
104
FT_UInt32 section_offset,
105
FT_Bool size_increment );
106
107
108
/* load a physical font entry */
109
FT_LOCAL( FT_Error )
110
pfr_phy_font_load( PFR_PhyFont phy_font,
111
FT_Stream stream,
112
FT_UInt32 offset,
113
FT_UInt32 size );
114
115
/* finalize a physical font */
116
FT_LOCAL(
void
)
117
pfr_phy_font_done( PFR_PhyFont phy_font,
118
FT_Memory memory );
119
120
/* */
121
122
FT_END_HEADER
123
124
#endif
/* PFRLOAD_H_ */
125
126
127
/* END */
ftstream.h
pfrobjs.h
PFR_ExtraItemRec_
Definition
pfrload.h:63
freetype
src
pfr
pfrload.h
Generated by
1.18.0