ReactOS 0.4.15-dev-8109-gd7be748
aftypes.h File Reference
#include <ft2build.h>
#include "afblue.h"
#include "afwrtsys.h"
#include "afscript.h"
#include "afcover.h"
#include "afstyles.h"
Include dependency graph for aftypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AF_WidthRec_
 
struct  AF_ScalerRec_
 
struct  AF_WritingSystemClassRec_
 
struct  AF_Script_UniRangeRec_
 
struct  AF_ScriptClassRec_
 
struct  AF_StyleClassRec_
 
struct  AF_StyleMetricsRec_
 

Macros

#define AF_ANGLE_PI   256
 
#define AF_ANGLE_2PI   ( AF_ANGLE_PI * 2 )
 
#define AF_ANGLE_PI2   ( AF_ANGLE_PI / 2 )
 
#define AF_ANGLE_PI4   ( AF_ANGLE_PI / 4 )
 
#define AF_ANGLE_DIFF(result, angle1, angle2)
 
#define AF_SCALER_FLAG_NO_HORIZONTAL   1U /* disable horizontal hinting */
 
#define AF_SCALER_FLAG_NO_VERTICAL   2U /* disable vertical hinting */
 
#define AF_SCALER_FLAG_NO_ADVANCE   4U /* disable advance hinting */
 
#define AF_SCALER_FLAG_NO_WARPER   8U /* disable warper */
 
#define AF_SCALER_EQUAL_SCALES(a, b)
 
#define AFWRTSYS_H_   /* don't load header files */
 
#define WRITING_SYSTEM(ws, WS)    AF_WRITING_SYSTEM_ ## WS,
 
#define SCRIPT(s, S, d, h, H, ss)    AF_SCRIPT_ ## S,
 
#define AF_UNIRANGE_REC(a, b)   { (FT_UInt32)(a), (FT_UInt32)(b) }
 
#define COVERAGE(name, NAME, description, tag1, tag2, tag3, tag4)    AF_COVERAGE_ ## NAME,
 
#define STYLE(s, S, d, ws, sc, ss, c)    AF_STYLE_ ## S,
 
#define AF_HINTING_BOTTOM_TO_TOP   0
 
#define AF_HINTING_TOP_TO_BOTTOM   1
 
#define AF_DECLARE_WRITING_SYSTEM_CLASS(writing_system_class)
 
#define AF_DEFINE_WRITING_SYSTEM_CLASS( writing_system_class, system, m_size, m_init, m_scale, m_done, m_stdw, h_init, h_apply)
 
#define AF_DECLARE_SCRIPT_CLASS(script_class)
 
#define AF_DEFINE_SCRIPT_CLASS( script_class, script, ranges, nonbase_ranges, top_to_bottom, std_charstring)
 
#define AF_DECLARE_STYLE_CLASS(style_class)
 
#define AF_DEFINE_STYLE_CLASS( style_class, style, writing_system, script, blue_stringset, coverage)
 

Typedefs

typedef FT_BEGIN_HEADER struct AF_WidthRec_ AF_WidthRec
 
typedef FT_BEGIN_HEADER struct AF_WidthRec_AF_Width
 
typedef FT_Int AF_Angle
 
typedef struct AF_GlyphHintsRec_AF_GlyphHints
 
typedef struct AF_ScalerRec_ AF_ScalerRec
 
typedef struct AF_ScalerRec_AF_Scaler
 
typedef struct AF_StyleMetricsRec_AF_StyleMetrics
 
typedef FT_Error(* AF_WritingSystem_InitMetricsFunc) (AF_StyleMetrics metrics, FT_Face face)
 
typedef void(* AF_WritingSystem_ScaleMetricsFunc) (AF_StyleMetrics metrics, AF_Scaler scaler)
 
typedef void(* AF_WritingSystem_DoneMetricsFunc) (AF_StyleMetrics metrics)
 
typedef void(* AF_WritingSystem_GetStdWidthsFunc) (AF_StyleMetrics metrics, FT_Pos *stdHW, FT_Pos *stdVW)
 
typedef FT_Error(* AF_WritingSystem_InitHintsFunc) (AF_GlyphHints hints, AF_StyleMetrics metrics)
 
typedef FT_Error(* AF_WritingSystem_ApplyHintsFunc) (FT_UInt glyph_index, AF_GlyphHints hints, FT_Outline *outline, AF_StyleMetrics metrics)
 
typedef enum AF_WritingSystem_ AF_WritingSystem
 
typedef struct AF_WritingSystemClassRec_ AF_WritingSystemClassRec
 
typedef const AF_WritingSystemClassRecAF_WritingSystemClass
 
typedef enum AF_Script_ AF_Script
 
typedef struct AF_Script_UniRangeRec_ AF_Script_UniRangeRec
 
typedef const AF_Script_UniRangeRecAF_Script_UniRange
 
typedef struct AF_ScriptClassRec_ AF_ScriptClassRec
 
typedef const AF_ScriptClassRecAF_ScriptClass
 
typedef enum AF_Coverage_ AF_Coverage
 
typedef enum AF_Style_ AF_Style
 
typedef struct AF_StyleClassRec_ AF_StyleClassRec
 
typedef const AF_StyleClassRecAF_StyleClass
 
typedef struct AF_FaceGlobalsRec_AF_FaceGlobals
 
typedef struct AF_StyleMetricsRec_ AF_StyleMetricsRec
 

Enumerations

enum  AF_WritingSystem_ { AF_WRITING_SYSTEM_MAX }
 
enum  AF_Script_ { AF_SCRIPT_MAX }
 
enum  AF_Coverage_ { AF_COVERAGE_DEFAULT }
 
enum  AF_Style_ { AF_STYLE_MAX }
 

Functions

 af_sort_pos (FT_UInt count, FT_Pos *table)
 
 af_sort_and_quantize_widths (FT_UInt *count, AF_Width widths, FT_Pos threshold)
 

Macro Definition Documentation

◆ AF_ANGLE_2PI

#define AF_ANGLE_2PI   ( AF_ANGLE_PI * 2 )

Definition at line 114 of file aftypes.h.

◆ AF_ANGLE_DIFF

#define AF_ANGLE_DIFF (   result,
  angle1,
  angle2 
)
Value:
FT_BEGIN_STMNT \
AF_Angle _delta = (angle2) - (angle1); \
\
\
while ( _delta <= -AF_ANGLE_PI ) \
_delta += AF_ANGLE_2PI; \
\
while ( _delta > AF_ANGLE_PI ) \
_delta -= AF_ANGLE_2PI; \
\
result = _delta; \
#define AF_ANGLE_2PI
Definition: aftypes.h:114
#define AF_ANGLE_PI
Definition: aftypes.h:113
#define FT_END_STMNT
Definition: ftconfig.h:353
GLuint64EXT * result
Definition: glext.h:11304

Definition at line 138 of file aftypes.h.

◆ AF_ANGLE_PI

#define AF_ANGLE_PI   256

Definition at line 113 of file aftypes.h.

◆ AF_ANGLE_PI2

#define AF_ANGLE_PI2   ( AF_ANGLE_PI / 2 )

Definition at line 115 of file aftypes.h.

◆ AF_ANGLE_PI4

#define AF_ANGLE_PI4   ( AF_ANGLE_PI / 4 )

Definition at line 116 of file aftypes.h.

◆ AF_DECLARE_SCRIPT_CLASS

#define AF_DECLARE_SCRIPT_CLASS (   script_class)
Value:
FT_CALLBACK_TABLE const AF_ScriptClassRec \
script_class;
#define FT_CALLBACK_TABLE
Definition: ftconfig.h:552

Definition at line 522 of file aftypes.h.

◆ AF_DECLARE_STYLE_CLASS

#define AF_DECLARE_STYLE_CLASS (   style_class)
Value:
FT_CALLBACK_TABLE const AF_StyleClassRec \
style_class;

Definition at line 544 of file aftypes.h.

◆ AF_DECLARE_WRITING_SYSTEM_CLASS

#define AF_DECLARE_WRITING_SYSTEM_CLASS (   writing_system_class)
Value:
FT_CALLBACK_TABLE const AF_WritingSystemClassRec \
writing_system_class;

Definition at line 491 of file aftypes.h.

◆ AF_DEFINE_SCRIPT_CLASS

#define AF_DEFINE_SCRIPT_CLASS (   script_class,
  script,
  ranges,
  nonbase_ranges,
  top_to_bottom,
  std_charstring 
)
Value:
FT_CALLBACK_TABLE_DEF \
const AF_ScriptClassRec script_class = \
{ \
script, \
ranges, \
nonbase_ranges, \
top_to_bottom, \
std_charstring, \
};
script
Definition: msipriv.h:383

Definition at line 526 of file aftypes.h.

◆ AF_DEFINE_STYLE_CLASS

#define AF_DEFINE_STYLE_CLASS (   style_class,
  style,
  writing_system,
  script,
  blue_stringset,
  coverage 
)
Value:
FT_CALLBACK_TABLE_DEF \
const AF_StyleClassRec style_class = \
{ \
style, \
writing_system, \
script, \
blue_stringset, \
coverage \
};
Arabic default style
Definition: afstyles.h:94

Definition at line 548 of file aftypes.h.

◆ AF_DEFINE_WRITING_SYSTEM_CLASS

#define AF_DEFINE_WRITING_SYSTEM_CLASS (   writing_system_class,
  system,
  m_size,
  m_init,
  m_scale,
  m_done,
  m_stdw,
  h_init,
  h_apply 
)
Value:
FT_CALLBACK_TABLE_DEF \
const AF_WritingSystemClassRec writing_system_class = \
{ \
system, \
\
m_size, \
\
m_init, \
m_scale, \
m_done, \
m_stdw, \
\
h_init, \
h_apply \
};
int __cdecl system(_In_opt_z_ const char *_Command)

Definition at line 495 of file aftypes.h.

◆ AF_HINTING_BOTTOM_TO_TOP

#define AF_HINTING_BOTTOM_TO_TOP   0

Definition at line 484 of file aftypes.h.

◆ AF_HINTING_TOP_TO_BOTTOM

#define AF_HINTING_TOP_TO_BOTTOM   1

Definition at line 485 of file aftypes.h.

◆ AF_SCALER_EQUAL_SCALES

#define AF_SCALER_EQUAL_SCALES (   a,
  b 
)
Value:
( (a)->x_scale == (b)->x_scale && \
(a)->y_scale == (b)->y_scale && \
(a)->x_delta == (b)->x_delta && \
(a)->y_delta == (b)->y_delta )
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define a
Definition: ke_i.h:78

Definition at line 191 of file aftypes.h.

◆ AF_SCALER_FLAG_NO_ADVANCE

#define AF_SCALER_FLAG_NO_ADVANCE   4U /* disable advance hinting */

Definition at line 174 of file aftypes.h.

◆ AF_SCALER_FLAG_NO_HORIZONTAL

#define AF_SCALER_FLAG_NO_HORIZONTAL   1U /* disable horizontal hinting */

Definition at line 172 of file aftypes.h.

◆ AF_SCALER_FLAG_NO_VERTICAL

#define AF_SCALER_FLAG_NO_VERTICAL   2U /* disable vertical hinting */

Definition at line 173 of file aftypes.h.

◆ AF_SCALER_FLAG_NO_WARPER

#define AF_SCALER_FLAG_NO_WARPER   8U /* disable warper */

Definition at line 175 of file aftypes.h.

◆ AF_UNIRANGE_REC

#define AF_UNIRANGE_REC (   a,
  b 
)    { (FT_UInt32)(a), (FT_UInt32)(b) }

Definition at line 333 of file aftypes.h.

◆ AFWRTSYS_H_

#define AFWRTSYS_H_   /* don't load header files */

Definition at line 258 of file aftypes.h.

◆ COVERAGE

#define COVERAGE (   name,
  NAME,
  description,
  tag1,
  tag2,
  tag3,
  tag4 
)     AF_COVERAGE_ ## NAME,

Definition at line 403 of file aftypes.h.

◆ SCRIPT

#define SCRIPT (   s,
  S,
  d,
  h,
  H,
  ss 
)     AF_SCRIPT_ ## S,

Definition at line 312 of file aftypes.h.

◆ STYLE

#define STYLE (   s,
  S,
  d,
  ws,
  sc,
  ss,
  c 
)     AF_STYLE_ ## S,

Definition at line 431 of file aftypes.h.

◆ WRITING_SYSTEM

#define WRITING_SYSTEM (   ws,
  WS 
)     AF_WRITING_SYSTEM_ ## WS,

Definition at line 260 of file aftypes.h.

Typedef Documentation

◆ AF_Angle

typedef FT_Int AF_Angle

Definition at line 110 of file aftypes.h.

◆ AF_Coverage

◆ AF_FaceGlobals

Definition at line 467 of file aftypes.h.

◆ AF_GlyphHints

Definition at line 156 of file aftypes.h.

◆ AF_Scaler

◆ AF_ScalerRec

◆ AF_Script

◆ AF_Script_UniRange

Definition at line 335 of file aftypes.h.

◆ AF_Script_UniRangeRec

◆ AF_ScriptClass

Definition at line 352 of file aftypes.h.

◆ AF_ScriptClassRec

◆ AF_Style

◆ AF_StyleClass

Definition at line 456 of file aftypes.h.

◆ AF_StyleClassRec

◆ AF_StyleMetrics

Definition at line 198 of file aftypes.h.

◆ AF_StyleMetricsRec

◆ AF_Width

◆ AF_WidthRec

◆ AF_WritingSystem

◆ AF_WritingSystem_ApplyHintsFunc

typedef FT_Error(* AF_WritingSystem_ApplyHintsFunc) (FT_UInt glyph_index, AF_GlyphHints hints, FT_Outline *outline, AF_StyleMetrics metrics)

Definition at line 224 of file aftypes.h.

◆ AF_WritingSystem_DoneMetricsFunc

typedef void(* AF_WritingSystem_DoneMetricsFunc) (AF_StyleMetrics metrics)

Definition at line 211 of file aftypes.h.

◆ AF_WritingSystem_GetStdWidthsFunc

typedef void(* AF_WritingSystem_GetStdWidthsFunc) (AF_StyleMetrics metrics, FT_Pos *stdHW, FT_Pos *stdVW)

Definition at line 214 of file aftypes.h.

◆ AF_WritingSystem_InitHintsFunc

typedef FT_Error(* AF_WritingSystem_InitHintsFunc) (AF_GlyphHints hints, AF_StyleMetrics metrics)

Definition at line 220 of file aftypes.h.

◆ AF_WritingSystem_InitMetricsFunc

typedef FT_Error(* AF_WritingSystem_InitMetricsFunc) (AF_StyleMetrics metrics, FT_Face face)

Definition at line 203 of file aftypes.h.

◆ AF_WritingSystem_ScaleMetricsFunc

typedef void(* AF_WritingSystem_ScaleMetricsFunc) (AF_StyleMetrics metrics, AF_Scaler scaler)

Definition at line 207 of file aftypes.h.

◆ AF_WritingSystemClass

Definition at line 291 of file aftypes.h.

◆ AF_WritingSystemClassRec

Enumeration Type Documentation

◆ AF_Coverage_

Enumerator
AF_COVERAGE_DEFAULT 

Definition at line 408 of file aftypes.h.

409 {
410#include "afcover.h"
411
413
414 } AF_Coverage;
@ AF_COVERAGE_DEFAULT
Definition: aftypes.h:412
enum AF_Coverage_ AF_Coverage

◆ AF_Script_

Enumerator
AF_SCRIPT_MAX 

Definition at line 316 of file aftypes.h.

317 {
318
319#include "afscript.h"
320
321 AF_SCRIPT_MAX /* do not remove */
322
323 } AF_Script;
enum AF_Script_ AF_Script
@ AF_SCRIPT_MAX
Definition: aftypes.h:321

◆ AF_Style_

Enumerator
AF_STYLE_MAX 

Definition at line 435 of file aftypes.h.

436 {
437
438#include "afstyles.h"
439
440 AF_STYLE_MAX /* do not remove */
441
442 } AF_Style;
@ AF_STYLE_MAX
Definition: aftypes.h:440
enum AF_Style_ AF_Style

◆ AF_WritingSystem_

Enumerator
AF_WRITING_SYSTEM_MAX 

Definition at line 264 of file aftypes.h.

265 {
266
267#include "afwrtsys.h"
268
269 AF_WRITING_SYSTEM_MAX /* do not remove */
270
@ AF_WRITING_SYSTEM_MAX
Definition: aftypes.h:269
enum AF_WritingSystem_ AF_WritingSystem

Function Documentation

◆ af_sort_and_quantize_widths()

af_sort_and_quantize_widths ( FT_UInt count,
AF_Width  widths,
FT_Pos  threshold 
)

Definition at line 210 of file afangles.c.

213 {
214 FT_UInt i, j;
215 FT_UInt cur_idx;
216 FT_Pos cur_val;
217 FT_Pos sum;
219
220
221 if ( *count == 1 )
222 return;
223
224 /* sort */
225 for ( i = 1; i < *count; i++ )
226 {
227 for ( j = i; j > 0; j-- )
228 {
229 if ( table[j].org >= table[j - 1].org )
230 break;
231
232 swap = table[j];
233 table[j] = table[j - 1];
234 table[j - 1] = swap;
235 }
236 }
237
238 cur_idx = 0;
239 cur_val = table[cur_idx].org;
240
241 /* compute and use mean values for clusters not larger than */
242 /* `threshold'; this is very primitive and might not yield */
243 /* the best result, but normally, using reference character */
244 /* `o', `*count' is 2, so the code below is fully sufficient */
245 for ( i = 1; i < *count; i++ )
246 {
247 if ( table[i].org - cur_val > threshold ||
248 i == *count - 1 )
249 {
250 sum = 0;
251
252 /* fix loop for end of array */
253 if ( table[i].org - cur_val <= threshold &&
254 i == *count - 1 )
255 i++;
256
257 for ( j = cur_idx; j < i; j++ )
258 {
259 sum += table[j].org;
260 table[j].org = 0;
261 }
262 table[cur_idx].org = sum / (FT_Pos)j;
263
264 if ( i < *count - 1 )
265 {
266 cur_idx = i + 1;
267 cur_val = table[cur_idx].org;
268 }
269 }
270 }
271
272 cur_idx = 1;
273
274 /* compress array to remove zero values */
275 for ( i = 1; i < *count; i++ )
276 {
277 if ( table[i].org )
278 table[cur_idx++] = table[i];
279 }
280
281 *count = cur_idx;
282 }
FT_BEGIN_HEADER struct AF_WidthRec_ AF_WidthRec
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:58
unsigned int FT_UInt
Definition: fttypes.h:231
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
static char org[]
Definition: encode.c:7456
static int sum(int x_, int y_)
Definition: ptr2_test.cpp:35
#define swap(a, b)
Definition: qsort.c:63

Referenced by af_latin_metrics_init_widths().

◆ af_sort_pos()

af_sort_pos ( FT_UInt  count,
FT_Pos table 
)

Definition at line 187 of file afangles.c.

189 {
190 FT_UInt i, j;
191 FT_Pos swap;
192
193
194 for ( i = 1; i < count; i++ )
195 {
196 for ( j = i; j > 0; j-- )
197 {
198 if ( table[j] >= table[j - 1] )
199 break;
200
201 swap = table[j];
202 table[j] = table[j - 1];
203 table[j - 1] = swap;
204 }
205 }
206 }

Referenced by af_latin_metrics_init_blues().