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]
afloader.c
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* afloader.c */
4 /* */
5 /* Auto-fitter glyph loading routines (body). */
6 /* */
7 /* Copyright 2003-2009, 2011-2013 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 #include "afglobal.h"
20 #include "afloader.h"
21 #include "afhints.h"
22 #include "aferrors.h"
23 #include "afmodule.h"
24 
25 
26  /* Initialize glyph loader. */
27 
30  {
31  AF_Loader loader = module->loader;
32  FT_Memory memory = module->root.library->memory;
33 
34 
35  FT_ZERO( loader );
36 
37  af_glyph_hints_init( &loader->hints, memory );
38 #ifdef FT_DEBUG_AUTOFIT
39  _af_debug_hints = &loader->hints;
40 #endif
41  return FT_GlyphLoader_New( memory, &loader->gloader );
42  }
43 
44 
45  /* Reset glyph loader and compute globals if necessary. */
46 
49  FT_Face face )
50  {
52  AF_Loader loader = module->loader;
53 
54 
55  loader->face = face;
56  loader->globals = (AF_FaceGlobals)face->autohint.data;
57 
58  FT_GlyphLoader_Rewind( loader->gloader );
59 
60  if ( loader->globals == NULL )
61  {
62  error = af_face_globals_new( face, &loader->globals, module );
63  if ( !error )
64  {
65  face->autohint.data =
66  (FT_Pointer)loader->globals;
67  face->autohint.finalizer =
69  }
70  }
71 
72  return error;
73  }
74 
75 
76  /* Finalize glyph loader. */
77 
78  FT_LOCAL_DEF( void )
80  {
81  AF_Loader loader = module->loader;
82 
83 
84  af_glyph_hints_done( &loader->hints );
85 
86  loader->face = NULL;
87  loader->globals = NULL;
88 
89 #ifdef FT_DEBUG_AUTOFIT
90  _af_debug_hints = NULL;
91 #endif
92  FT_GlyphLoader_Done( loader->gloader );
93  loader->gloader = NULL;
94  }
95 
96 
97  /* Load a single glyph component. This routine calls itself */
98  /* recursively, if necessary, and does the main work of */
99  /* `af_loader_load_glyph.' */
100 
101  static FT_Error
102  af_loader_load_g( AF_Loader loader,
103  AF_Scaler scaler,
104  FT_UInt glyph_index,
105  FT_Int32 load_flags,
106  FT_UInt depth )
107  {
108  FT_Error error;
109  FT_Face face = loader->face;
110  FT_GlyphLoader gloader = loader->gloader;
111  AF_ScriptMetrics metrics = loader->metrics;
112  AF_GlyphHints hints = &loader->hints;
113  FT_GlyphSlot slot = face->glyph;
114  FT_Slot_Internal internal = slot->internal;
115  FT_Int32 flags;
116 
117 
118  flags = load_flags | FT_LOAD_LINEAR_DESIGN;
119  error = FT_Load_Glyph( face, glyph_index, flags );
120  if ( error )
121  goto Exit;
122 
123  loader->transformed = internal->glyph_transformed;
124  if ( loader->transformed )
125  {
126  FT_Matrix inverse;
127 
128 
129  loader->trans_matrix = internal->glyph_matrix;
130  loader->trans_delta = internal->glyph_delta;
131 
132  inverse = loader->trans_matrix;
133  FT_Matrix_Invert( &inverse );
134  FT_Vector_Transform( &loader->trans_delta, &inverse );
135  }
136 
137  switch ( slot->format )
138  {
140  /* translate the loaded glyph when an internal transform is needed */
141  if ( loader->transformed )
143  loader->trans_delta.x,
144  loader->trans_delta.y );
145 
146  /* copy the outline points in the loader's current */
147  /* extra points which are used to keep original glyph coordinates */
148  error = FT_GLYPHLOADER_CHECK_POINTS( gloader,
149  slot->outline.n_points + 4,
150  slot->outline.n_contours );
151  if ( error )
152  goto Exit;
153 
154  FT_ARRAY_COPY( gloader->current.outline.points,
155  slot->outline.points,
156  slot->outline.n_points );
157 
158  FT_ARRAY_COPY( gloader->current.outline.contours,
159  slot->outline.contours,
160  slot->outline.n_contours );
161 
162  FT_ARRAY_COPY( gloader->current.outline.tags,
163  slot->outline.tags,
164  slot->outline.n_points );
165 
166  gloader->current.outline.n_points = slot->outline.n_points;
167  gloader->current.outline.n_contours = slot->outline.n_contours;
168 
169  /* compute original horizontal phantom points (and ignore */
170  /* vertical ones) */
171  loader->pp1.x = hints->x_delta;
172  loader->pp1.y = hints->y_delta;
173  loader->pp2.x = FT_MulFix( slot->metrics.horiAdvance,
174  hints->x_scale ) + hints->x_delta;
175  loader->pp2.y = hints->y_delta;
176 
177  /* be sure to check for spacing glyphs */
178  if ( slot->outline.n_points == 0 )
179  goto Hint_Metrics;
180 
181  /* now load the slot image into the auto-outline and run the */
182  /* automatic hinting process */
183  if ( metrics->clazz->script_hints_apply )
184  metrics->clazz->script_hints_apply( hints,
185  &gloader->current.outline,
186  metrics );
187 
188  /* we now need to adjust the metrics according to the change in */
189  /* width/positioning that occurred during the hinting process */
190  if ( scaler->render_mode != FT_RENDER_MODE_LIGHT )
191  {
192  FT_Pos old_rsb, old_lsb, new_lsb;
193  FT_Pos pp1x_uh, pp2x_uh;
194  AF_AxisHints axis = &hints->axis[AF_DIMENSION_HORZ];
195  AF_Edge edge1 = axis->edges; /* leftmost edge */
196  AF_Edge edge2 = edge1 +
197  axis->num_edges - 1; /* rightmost edge */
198 
199 
200  if ( axis->num_edges > 1 && AF_HINTS_DO_ADVANCE( hints ) )
201  {
202  old_rsb = loader->pp2.x - edge2->opos;
203  old_lsb = edge1->opos;
204  new_lsb = edge1->pos;
205 
206  /* remember unhinted values to later account */
207  /* for rounding errors */
208 
209  pp1x_uh = new_lsb - old_lsb;
210  pp2x_uh = edge2->pos + old_rsb;
211 
212  /* prefer too much space over too little space */
213  /* for very small sizes */
214 
215  if ( old_lsb < 24 )
216  pp1x_uh -= 8;
217 
218  if ( old_rsb < 24 )
219  pp2x_uh += 8;
220 
221  loader->pp1.x = FT_PIX_ROUND( pp1x_uh );
222  loader->pp2.x = FT_PIX_ROUND( pp2x_uh );
223 
224  if ( loader->pp1.x >= new_lsb && old_lsb > 0 )
225  loader->pp1.x -= 64;
226 
227  if ( loader->pp2.x <= edge2->pos && old_rsb > 0 )
228  loader->pp2.x += 64;
229 
230  slot->lsb_delta = loader->pp1.x - pp1x_uh;
231  slot->rsb_delta = loader->pp2.x - pp2x_uh;
232  }
233  else
234  {
235  FT_Pos pp1x = loader->pp1.x;
236  FT_Pos pp2x = loader->pp2.x;
237 
238 
239  loader->pp1.x = FT_PIX_ROUND( pp1x );
240  loader->pp2.x = FT_PIX_ROUND( pp2x );
241 
242  slot->lsb_delta = loader->pp1.x - pp1x;
243  slot->rsb_delta = loader->pp2.x - pp2x;
244  }
245  }
246  else
247  {
248  FT_Pos pp1x = loader->pp1.x;
249  FT_Pos pp2x = loader->pp2.x;
250 
251 
252  loader->pp1.x = FT_PIX_ROUND( pp1x + hints->xmin_delta );
253  loader->pp2.x = FT_PIX_ROUND( pp2x + hints->xmax_delta );
254 
255  slot->lsb_delta = loader->pp1.x - pp1x;
256  slot->rsb_delta = loader->pp2.x - pp2x;
257  }
258 
259  /* good, we simply add the glyph to our loader's base */
260  FT_GlyphLoader_Add( gloader );
261  break;
262 
263  case FT_GLYPH_FORMAT_COMPOSITE:
264  {
265  FT_UInt nn, num_subglyphs = slot->num_subglyphs;
266  FT_UInt num_base_subgs, start_point;
267  FT_SubGlyph subglyph;
268 
269 
270  start_point = gloader->base.outline.n_points;
271 
272  /* first of all, copy the subglyph descriptors in the glyph loader */
273  error = FT_GlyphLoader_CheckSubGlyphs( gloader, num_subglyphs );
274  if ( error )
275  goto Exit;
276 
277  FT_ARRAY_COPY( gloader->current.subglyphs,
278  slot->subglyphs,
279  num_subglyphs );
280 
281  gloader->current.num_subglyphs = num_subglyphs;
282  num_base_subgs = gloader->base.num_subglyphs;
283 
284  /* now read each subglyph independently */
285  for ( nn = 0; nn < num_subglyphs; nn++ )
286  {
287  FT_Vector pp1, pp2;
288  FT_Pos x, y;
289  FT_UInt num_points, num_new_points, num_base_points;
290 
291 
292  /* gloader.current.subglyphs can change during glyph loading due */
293  /* to re-allocation -- we must recompute the current subglyph on */
294  /* each iteration */
295  subglyph = gloader->base.subglyphs + num_base_subgs + nn;
296 
297  pp1 = loader->pp1;
298  pp2 = loader->pp2;
299 
300  num_base_points = gloader->base.outline.n_points;
301 
302  error = af_loader_load_g( loader, scaler, subglyph->index,
303  load_flags, depth + 1 );
304  if ( error )
305  goto Exit;
306 
307  /* recompute subglyph pointer */
308  subglyph = gloader->base.subglyphs + num_base_subgs + nn;
309 
310  if ( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS )
311  {
312  pp1 = loader->pp1;
313  pp2 = loader->pp2;
314  }
315  else
316  {
317  loader->pp1 = pp1;
318  loader->pp2 = pp2;
319  }
320 
321  num_points = gloader->base.outline.n_points;
322  num_new_points = num_points - num_base_points;
323 
324  /* now perform the transformation required for this subglyph */
325 
326  if ( subglyph->flags & ( FT_SUBGLYPH_FLAG_SCALE |
329  {
330  FT_Vector* cur = gloader->base.outline.points +
331  num_base_points;
332  FT_Vector* limit = cur + num_new_points;
333 
334 
335  for ( ; cur < limit; cur++ )
336  FT_Vector_Transform( cur, &subglyph->transform );
337  }
338 
339  /* apply offset */
340 
341  if ( !( subglyph->flags & FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ) )
342  {
343  FT_Int k = subglyph->arg1;
344  FT_UInt l = subglyph->arg2;
345  FT_Vector* p1;
346  FT_Vector* p2;
347 
348 
349  if ( start_point + k >= num_base_points ||
350  l >= (FT_UInt)num_new_points )
351  {
352  error = FT_THROW( Invalid_Composite );
353  goto Exit;
354  }
355 
356  l += num_base_points;
357 
358  /* for now, only use the current point coordinates; */
359  /* we eventually may consider another approach */
360  p1 = gloader->base.outline.points + start_point + k;
361  p2 = gloader->base.outline.points + start_point + l;
362 
363  x = p1->x - p2->x;
364  y = p1->y - p2->y;
365  }
366  else
367  {
368  x = FT_MulFix( subglyph->arg1, hints->x_scale ) + hints->x_delta;
369  y = FT_MulFix( subglyph->arg2, hints->y_scale ) + hints->y_delta;
370 
371  x = FT_PIX_ROUND( x );
372  y = FT_PIX_ROUND( y );
373  }
374 
375  {
376  FT_Outline dummy = gloader->base.outline;
377 
378 
379  dummy.points += num_base_points;
380  dummy.n_points = (short)num_new_points;
381 
382  FT_Outline_Translate( &dummy, x, y );
383  }
384  }
385  }
386  break;
387 
388  default:
389  /* we don't support other formats (yet?) */
390  error = FT_THROW( Unimplemented_Feature );
391  }
392 
393  Hint_Metrics:
394  if ( depth == 0 )
395  {
396  FT_BBox bbox;
397  FT_Vector vvector;
398 
399 
400  vvector.x = slot->metrics.vertBearingX - slot->metrics.horiBearingX;
401  vvector.y = slot->metrics.vertBearingY - slot->metrics.horiBearingY;
402  vvector.x = FT_MulFix( vvector.x, metrics->scaler.x_scale );
403  vvector.y = FT_MulFix( vvector.y, metrics->scaler.y_scale );
404 
405  /* transform the hinted outline if needed */
406  if ( loader->transformed )
407  {
408  FT_Outline_Transform( &gloader->base.outline, &loader->trans_matrix );
409  FT_Vector_Transform( &vvector, &loader->trans_matrix );
410  }
411 #if 1
412  /* we must translate our final outline by -pp1.x and compute */
413  /* the new metrics */
414  if ( loader->pp1.x )
415  FT_Outline_Translate( &gloader->base.outline, -loader->pp1.x, 0 );
416 #endif
417  FT_Outline_Get_CBox( &gloader->base.outline, &bbox );
418 
419  bbox.xMin = FT_PIX_FLOOR( bbox.xMin );
420  bbox.yMin = FT_PIX_FLOOR( bbox.yMin );
421  bbox.xMax = FT_PIX_CEIL( bbox.xMax );
422  bbox.yMax = FT_PIX_CEIL( bbox.yMax );
423 
424  slot->metrics.width = bbox.xMax - bbox.xMin;
425  slot->metrics.height = bbox.yMax - bbox.yMin;
426  slot->metrics.horiBearingX = bbox.xMin;
427  slot->metrics.horiBearingY = bbox.yMax;
428 
429  slot->metrics.vertBearingX = FT_PIX_FLOOR( bbox.xMin + vvector.x );
430  slot->metrics.vertBearingY = FT_PIX_FLOOR( bbox.yMax + vvector.y );
431 
432  /* for mono-width fonts (like Andale, Courier, etc.) we need */
433  /* to keep the original rounded advance width; ditto for */
434  /* digits if all have the same advance width */
435 #if 0
436  if ( !FT_IS_FIXED_WIDTH( slot->face ) )
437  slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
438  else
439  slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
440  x_scale );
441 #else
442  if ( scaler->render_mode != FT_RENDER_MODE_LIGHT &&
443  ( FT_IS_FIXED_WIDTH( slot->face ) ||
444  ( af_face_globals_is_digit( loader->globals, glyph_index ) &&
445  metrics->digits_have_same_width ) ) )
446  {
447  slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
448  metrics->scaler.x_scale );
449 
450  /* Set delta values to 0. Otherwise code that uses them is */
451  /* going to ruin the fixed advance width. */
452  slot->lsb_delta = 0;
453  slot->rsb_delta = 0;
454  }
455  else
456  {
457  /* non-spacing glyphs must stay as-is */
458  if ( slot->metrics.horiAdvance )
459  slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
460  }
461 #endif
462 
463  slot->metrics.vertAdvance = FT_MulFix( slot->metrics.vertAdvance,
464  metrics->scaler.y_scale );
465 
466  slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );
467  slot->metrics.vertAdvance = FT_PIX_ROUND( slot->metrics.vertAdvance );
468 
469  /* now copy outline into glyph slot */
470  FT_GlyphLoader_Rewind( internal->loader );
471  error = FT_GlyphLoader_CopyPoints( internal->loader, gloader );
472  if ( error )
473  goto Exit;
474 
475  /* reassign all outline fields except flags to protect them */
476  slot->outline.n_contours = internal->loader->base.outline.n_contours;
477  slot->outline.n_points = internal->loader->base.outline.n_points;
478  slot->outline.points = internal->loader->base.outline.points;
479  slot->outline.tags = internal->loader->base.outline.tags;
480  slot->outline.contours = internal->loader->base.outline.contours;
481 
483  }
484 
485  Exit:
486  return error;
487  }
488 
489 
490  /* Load a glyph. */
491 
494  FT_Face face,
495  FT_UInt gindex,
496  FT_Int32 load_flags )
497  {
498  FT_Error error;
499  FT_Size size = face->size;
500  AF_Loader loader = module->loader;
501  AF_ScalerRec scaler;
502 
503 
504  if ( !size )
505  return FT_THROW( Invalid_Argument );
506 
507  FT_ZERO( &scaler );
508 
509  scaler.face = face;
510  scaler.x_scale = size->metrics.x_scale;
511  scaler.x_delta = 0; /* XXX: TODO: add support for sub-pixel hinting */
512  scaler.y_scale = size->metrics.y_scale;
513  scaler.y_delta = 0; /* XXX: TODO: add support for sub-pixel hinting */
514 
515  scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
516  scaler.flags = 0; /* XXX: fix this */
517 
518  error = af_loader_reset( module, face );
519  if ( !error )
520  {
522  FT_UInt options = 0;
523 
524 
525 #ifdef FT_OPTION_AUTOFIT2
526  /* XXX: undocumented hook to activate the latin2 hinter */
527  if ( load_flags & ( 1UL << 20 ) )
528  options = 2;
529 #endif
530 
531  error = af_face_globals_get_metrics( loader->globals, gindex,
532  options, &metrics );
533  if ( !error )
534  {
535  loader->metrics = metrics;
536 
537  if ( metrics->clazz->script_metrics_scale )
538  metrics->clazz->script_metrics_scale( metrics, &scaler );
539  else
540  metrics->scaler = scaler;
541 
543  load_flags &= ~FT_LOAD_RENDER;
544 
545  if ( metrics->clazz->script_hints_init )
546  {
547  error = metrics->clazz->script_hints_init( &loader->hints,
548  metrics );
549  if ( error )
550  goto Exit;
551  }
552 
553  error = af_loader_load_g( loader, &scaler, gindex, load_flags, 0 );
554  }
555  }
556  Exit:
557  return error;
558  }
559 
560 
561 /* END */
#define FT_PIX_CEIL(x)
Definition: ftobjs.h:82
int FT_Error
Definition: fttypes.h:296
FT_Vector pp2
Definition: afloader.h:52
af_glyph_hints_done(AF_GlyphHints hints)
Definition: afhints.c:539
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:59
#define FT_SUBGLYPH_FLAG_SCALE
Definition: freetype.h:3264
FT_Pos xmax_delta
Definition: afhints.h:357
FT_Pos pos
Definition: afhints.h:295
FT_Bool digits_have_same_width
Definition: aftypes.h:255
typedefFT_BEGIN_HEADER struct AF_ModuleRec_ * AF_Module
Definition: afloader.h:28
GLint GLint GLsizei GLsizei GLsizei depth
#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES
Definition: freetype.h:3262
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS
Definition: freetype.h:3267
#define NULL
Definition: ftobjs.h:61
FT_Fixed y_scale
Definition: afhints.h:338
GLint GLint GLint GLint GLint GLint y
signed int FT_Int
Definition: fttypes.h:216
short n_contours
Definition: ftimage.h:385
FT_Vector pp1
Definition: afloader.h:51
#define FT_ARRAY_COPY(dest, source, count)
Definition: ftmemory.h:216
FT_Pos y_delta
Definition: aftypes.h:187
FT_BBox bbox
Definition: ftbbox.c:565
af_glyph_hints_init(AF_GlyphHints hints, FT_Memory memory)
Definition: afhints.c:530
void(* FT_Generic_Finalizer)(void *object)
Definition: fttypes.h:424
return FT_THROW(Missing_Property)
short * contours
Definition: ftimage.h:390
FT_Pos x_delta
Definition: aftypes.h:186
FT_Int arg1
Definition: ftgloadr.h:61
char * tags
Definition: ftimage.h:389
GLint GLint GLint GLint GLint x
FT_GlyphLoader_New(FT_Memory memory, FT_GlyphLoader *aloader)
Definition: ftgloadr.c:70
FT_GlyphLoader_CopyPoints(FT_GlyphLoader target, FT_GlyphLoader source)
Definition: ftgloadr.c:361
FT_UInt32 flags
Definition: aftypes.h:189
return FT_Err_Ok
Definition: ftbbox.c:645
af_face_globals_new(FT_Face face, AF_FaceGlobals *aglobals, AF_Module module)
Definition: afglobal.c:159
FT_Int index
Definition: ftgloadr.h:59
FT_UShort flags
Definition: ftgloadr.h:60
#define FT_LOAD_LINEAR_DESIGN
Definition: freetype.h:2561
#define FT_LOAD_NO_SCALE
Definition: freetype.h:2549
GLenum GLuint GLint GLenum face
#define FT_SUBGLYPH_FLAG_2X2
Definition: freetype.h:3266
af_loader_init(AF_Module module)
Definition: afloader.c:29
FT_Outline outline
Definition: freetype.h:1631
typedefFT_BEGIN_HEADER struct FT_GlyphLoaderRec_ * FT_GlyphLoader
Definition: ftgloadr.h:43
#define FT_LOAD_RENDER
Definition: freetype.h:2551
FT_Pos x_delta
Definition: afhints.h:336
FT_Load_Glyph(FT_Face face, FT_UInt glyph_index, FT_Int32 load_flags)
Definition: ftobjs.c:574
FT_Matrix transform
Definition: ftgloadr.h:63
FT_Outline_Get_CBox(const FT_Outline *outline, FT_BBox *acbox)
Definition: ftoutln.c:468
FT_GlyphLoader_Add(FT_GlyphLoader loader)
Definition: ftgloadr.c:324
AF_ScalerRec scaler
Definition: aftypes.h:254
FT_Face face
Definition: aftypes.h:183
FT_Fixed x_scale
Definition: aftypes.h:184
#define FT_PIX_FLOOR(x)
Definition: ftobjs.h:80
FT_Outline_Transform(const FT_Outline *outline, const FT_Matrix *matrix)
Definition: ftoutln.c:703
af_loader_reset(AF_Module module, FT_Face face)
Definition: afloader.c:48
FT_Pos rsb_delta
Definition: freetype.h:1640
FT_GlyphLoader_Done(FT_GlyphLoader loader)
Definition: ftgloadr.c:128
FT_Pos yMax
Definition: ftimage.h:119
FT_Pos xMin
Definition: ftimage.h:118
#define FT_IS_FIXED_WIDTH(face)
Definition: freetype.h:1182
FT_GlyphLoader_CheckSubGlyphs(FT_GlyphLoader loader, FT_UInt n_subs)
Definition: ftgloadr.c:277
FT_Error error
Definition: cffdrivr.c:411
FT_UInt num_subglyphs
Definition: freetype.h:1633
FT_Pos x
Definition: ftimage.h:77
void * FT_Pointer
Definition: fttypes.h:307
#define FT_ZERO(p)
Definition: ftmemory.h:210
GLbitfield flags
#define FT_SUBGLYPH_FLAG_XY_SCALE
Definition: freetype.h:3265
FT_Pos y
Definition: ftimage.h:78
FT_Fixed x_scale
Definition: afhints.h:335
signed int FT_Int32
Definition: ftconfig.h:132
FT_Pos y_delta
Definition: afhints.h:339
af_face_globals_free(AF_FaceGlobals globals)
Definition: afglobal.c:195
FT_Fixed y_scale
Definition: aftypes.h:185
FT_SubGlyph subglyphs
Definition: freetype.h:1634
AF_ScriptMetrics metrics
Definition: afloader.h:47
FT_Int num_edges
Definition: afhints.h:322
FT_Pos xMax
Definition: ftimage.h:119
FT_Pos lsb_delta
Definition: freetype.h:1639
short n_points
Definition: ftimage.h:386
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
FT_MulFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:485
af_loader_load_glyph(AF_Module module, FT_Face face, FT_UInt gindex, FT_Int32 load_flags)
Definition: afloader.c:493
af_loader_done(AF_Module module)
Definition: afloader.c:79
AF_FaceGlobals globals
Definition: afloader.h:42
FT_Fixed y_scale
Definition: freetype.h:1373
FT_Vector_Transform(FT_Vector *vec, const FT_Matrix *matrix)
Definition: ftoutln.c:680
FT_Glyph_Format format
Definition: freetype.h:1625
af_face_globals_is_digit(AF_FaceGlobals globals, FT_UInt gindex)
Definition: afglobal.c:294
FT_GlyphSlot glyph
Definition: freetype.h:956
struct AF_FaceGlobalsRec_ * AF_FaceGlobals
Definition: aftypes.h:249
unsigned int FT_UInt
Definition: fttypes.h:227
FT_GlyphLoader_Rewind(FT_GlyphLoader loader)
Definition: ftgloadr.c:88
FT_Slot_Internal internal
Definition: freetype.h:1644
FT_Pos xmin_delta
Definition: afhints.h:356
AF_ScriptClass clazz
Definition: aftypes.h:253
AF_Edge edges
Definition: afhints.h:324
FT_Int arg2
Definition: ftgloadr.h:62
FT_Fixed x_scale
Definition: freetype.h:1372
FT_Glyph_Metrics metrics
Definition: freetype.h:1620
FT_Outline_Translate(const FT_Outline *outline, FT_Pos xOffset, FT_Pos yOffset)
Definition: ftoutln.c:518
FT_Pos opos
Definition: afhints.h:294
FT_Vector trans_delta
Definition: afloader.h:50
AF_AxisHintsRec axis[AF_DIMENSION_MAX]
Definition: afhints.h:349
FT_Matrix_Invert(FT_Matrix *matrix)
Definition: ftcalc.c:774
#define AF_HINTS_DO_ADVANCE(h)
Definition: afhints.h:389
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
FT_Render_Mode render_mode
Definition: aftypes.h:188
#define FT_LOAD_IGNORE_TRANSFORM
Definition: freetype.h:2559
#define FT_GLYPHLOADER_CHECK_POINTS(_loader, _points, _contours)
Definition: ftgloadr.h:134
FT_Pos yMin
Definition: ftimage.h:118
FT_Matrix trans_matrix
Definition: afloader.h:49
FT_Bool transformed
Definition: afloader.h:48
AF_GlyphHintsRec hints
Definition: afloader.h:46
GLsizeiptr size
FT_Face face
Definition: afloader.h:41
FT_Vector * points
Definition: ftimage.h:388
#define FT_PIX_ROUND(x)
Definition: ftobjs.h:81
FT_Module_Constructor FT_GLYPH_FORMAT_OUTLINE
Definition: ftrend1.c:284
FT_GlyphLoader gloader
Definition: afloader.h:45
GLint limit
FT_Size_Metrics metrics
Definition: freetype.h:1406
af_face_globals_get_metrics(AF_FaceGlobals globals, FT_UInt gindex, FT_UInt options, AF_ScriptMetrics *ametrics)
Definition: afglobal.c:229
#define FT_LOCAL_DEF(x)
Definition: ftconfig.h:236
#define FT_LOAD_TARGET_MODE(x)
Definition: freetype.h:2655