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]
cf2ft.c
Go to the documentation of this file.
1 /***************************************************************************/
2 /* */
3 /* cf2ft.c */
4 /* */
5 /* FreeType Glue Component to Adobe's Interpreter (body). */
6 /* */
7 /* Copyright 2013 Adobe Systems Incorporated. */
8 /* */
9 /* This software, and all works of authorship, whether in source or */
10 /* object code form as indicated by the copyright notice(s) included */
11 /* herein (collectively, the "Work") is made available, and may only be */
12 /* used, modified, and distributed under the FreeType Project License, */
13 /* LICENSE.TXT. Additionally, subject to the terms and conditions of the */
14 /* FreeType Project License, each contributor to the Work hereby grants */
15 /* to any individual or legal entity exercising permissions granted by */
16 /* the FreeType Project License and this section (hereafter, "You" or */
17 /* "Your") a perpetual, worldwide, non-exclusive, no-charge, */
18 /* royalty-free, irrevocable (except as stated in this section) patent */
19 /* license to make, have made, use, offer to sell, sell, import, and */
20 /* otherwise transfer the Work, where such license applies only to those */
21 /* patent claims licensable by such contributor that are necessarily */
22 /* infringed by their contribution(s) alone or by combination of their */
23 /* contribution(s) with the Work to which such contribution(s) was */
24 /* submitted. If You institute patent litigation against any entity */
25 /* (including a cross-claim or counterclaim in a lawsuit) alleging that */
26 /* the Work or a contribution incorporated within the Work constitutes */
27 /* direct or contributory patent infringement, then any patent licenses */
28 /* granted to You under this License for that Work shall terminate as of */
29 /* the date such litigation is filed. */
30 /* */
31 /* By using, modifying, or distributing the Work you indicate that you */
32 /* have read and understood the terms and conditions of the */
33 /* FreeType Project License as well as those provided in this section, */
34 /* and you accept them fully. */
35 /* */
36 /***************************************************************************/
37 
38 
39 #include "cf2ft.h"
40 #include FT_INTERNAL_DEBUG_H
41 
42 #include "cf2font.h"
43 #include "cf2error.h"
44 
45 
46 #define CF2_MAX_SIZE cf2_intToFixed( 2000 ) /* max ppem */
47 
48 
49  /*
50  * This check should avoid most internal overflow cases. Clients should
51  * generally respond to `Glyph_Too_Big' by getting a glyph outline
52  * at EM size, scaling it and filling it as a graphics operation.
53  *
54  */
55  static FT_Error
56  cf2_checkTransform( const CF2_Matrix* transform,
57  CF2_Int unitsPerEm )
58  {
59  CF2_Fixed maxScale;
60 
61 
62  FT_ASSERT( unitsPerEm > 0 );
63 
64  FT_ASSERT( transform->a > 0 && transform->d > 0 );
65  FT_ASSERT( transform->b == 0 && transform->c == 0 );
66  FT_ASSERT( transform->tx == 0 && transform->ty == 0 );
67 
68  if ( unitsPerEm > 0x7FFF )
69  return FT_THROW( Glyph_Too_Big );
70 
71  maxScale = FT_DivFix( CF2_MAX_SIZE, cf2_intToFixed( unitsPerEm ) );
72 
73  if ( transform->a > maxScale || transform->d > maxScale )
74  return FT_THROW( Glyph_Too_Big );
75 
76  return FT_Err_Ok;
77  }
78 
79 
80  static void
81  cf2_setGlyphWidth( CF2_Outline outline,
83  {
84  CFF_Decoder* decoder = outline->decoder;
85 
86 
87  FT_ASSERT( decoder );
88 
89  decoder->glyph_width = cf2_fixedToInt( width );
90  }
91 
92 
93  /* Clean up font instance. */
94  static void
95  cf2_free_instance( void* ptr )
96  {
97  CF2_Font font = (CF2_Font)ptr;
98 
99 
100  if ( font )
101  {
102  FT_Memory memory = font->memory;
103 
104 
105  (void)memory;
106  }
107  }
108 
109 
110  /********************************************/
111  /* */
112  /* functions for handling client outline; */
113  /* FreeType uses coordinates in 26.6 format */
114  /* */
115  /********************************************/
116 
117  static void
118  cf2_builder_moveTo( CF2_OutlineCallbacks callbacks,
119  const CF2_CallbackParams params )
120  {
121  /* downcast the object pointer */
122  CF2_Outline outline = (CF2_Outline)callbacks;
123  CFF_Builder* builder;
124 
125 
126  FT_ASSERT( outline && outline->decoder );
127  FT_ASSERT( params->op == CF2_PathOpMoveTo );
128 
129  builder = &outline->decoder->builder;
130 
131  /* note: two successive moves simply close the contour twice */
132  cff_builder_close_contour( builder );
133  builder->path_begun = 0;
134  }
135 
136 
137  static void
138  cf2_builder_lineTo( CF2_OutlineCallbacks callbacks,
139  const CF2_CallbackParams params )
140  {
141  /* downcast the object pointer */
142  CF2_Outline outline = (CF2_Outline)callbacks;
143  CFF_Builder* builder;
144 
145 
146  FT_ASSERT( outline && outline->decoder );
147  FT_ASSERT( params->op == CF2_PathOpLineTo );
148 
149  builder = &outline->decoder->builder;
150 
151  if ( !builder->path_begun )
152  {
153  /* record the move before the line; also check points and set */
154  /* `path_begun' */
155  cff_builder_start_point( builder,
156  params->pt0.x,
157  params->pt0.y );
158  }
159 
160  /* `cff_builder_add_point1' includes a check_points call for one point */
161  cff_builder_add_point1( builder,
162  params->pt1.x,
163  params->pt1.y );
164  }
165 
166 
167  static void
168  cf2_builder_cubeTo( CF2_OutlineCallbacks callbacks,
169  const CF2_CallbackParams params )
170  {
171  /* downcast the object pointer */
172  CF2_Outline outline = (CF2_Outline)callbacks;
173  CFF_Builder* builder;
174 
175 
176  FT_ASSERT( outline && outline->decoder );
177  FT_ASSERT( params->op == CF2_PathOpCubeTo );
178 
179  builder = &outline->decoder->builder;
180 
181  if ( !builder->path_begun )
182  {
183  /* record the move before the line; also check points and set */
184  /* `path_begun' */
185  cff_builder_start_point( builder,
186  params->pt0.x,
187  params->pt0.y );
188  }
189 
190  /* prepare room for 3 points: 2 off-curve, 1 on-curve */
191  cff_check_points( builder, 3 );
192 
193  cff_builder_add_point( builder,
194  params->pt1.x,
195  params->pt1.y, 0 );
196  cff_builder_add_point( builder,
197  params->pt2.x,
198  params->pt2.y, 0 );
199  cff_builder_add_point( builder,
200  params->pt3.x,
201  params->pt3.y, 1 );
202  }
203 
204 
205  static void
206  cf2_outline_init( CF2_Outline outline,
207  FT_Memory memory,
208  FT_Error* error )
209  {
210  FT_MEM_ZERO( outline, sizeof ( CF2_OutlineRec ) );
211 
212  outline->root.memory = memory;
213  outline->root.error = error;
214 
215  outline->root.moveTo = cf2_builder_moveTo;
216  outline->root.lineTo = cf2_builder_lineTo;
217  outline->root.cubeTo = cf2_builder_cubeTo;
218  }
219 
220 
221  /* get scaling and hint flag from GlyphSlot */
222  static void
223  cf2_getScaleAndHintFlag( CFF_Decoder* decoder,
224  CF2_Fixed* x_scale,
225  CF2_Fixed* y_scale,
226  FT_Bool* hinted,
227  FT_Bool* scaled )
228  {
229  FT_ASSERT( decoder && decoder->builder.glyph );
230 
231  /* note: FreeType scale includes a factor of 64 */
232  *hinted = decoder->builder.glyph->hint;
233  *scaled = decoder->builder.glyph->scaled;
234 
235  if ( *hinted )
236  {
237  *x_scale = FT_DivFix( decoder->builder.glyph->x_scale,
238  cf2_intToFixed( 64 ) );
239  *y_scale = FT_DivFix( decoder->builder.glyph->y_scale,
240  cf2_intToFixed( 64 ) );
241  }
242  else
243  {
244  /* for unhinted outlines, `cff_slot_load' does the scaling, */
245  /* thus render at `unity' scale */
246 
247  *x_scale = 0x0400; /* 1/64 as 16.16 */
248  *y_scale = 0x0400;
249  }
250  }
251 
252 
253  /* get units per em from `FT_Face' */
254  /* TODO: should handle font matrix concatenation? */
255  static FT_UShort
256  cf2_getUnitsPerEm( CFF_Decoder* decoder )
257  {
258  FT_ASSERT( decoder && decoder->builder.face );
259  FT_ASSERT( decoder->builder.face->root.units_per_EM );
260 
261  return decoder->builder.face->root.units_per_EM;
262  }
263 
264 
265  /* Main entry point: Render one glyph. */
268  FT_Byte* charstring_base,
269  FT_ULong charstring_len )
270  {
271  FT_Memory memory;
273  CF2_Font font;
274 
275 
276  FT_ASSERT( decoder && decoder->cff );
277 
278  memory = decoder->builder.memory;
279 
280  /* CF2 data is saved here across glyphs */
281  font = (CF2_Font)decoder->cff->cf2_instance.data;
282 
283  /* on first glyph, allocate instance structure */
284  if ( decoder->cff->cf2_instance.data == NULL )
285  {
286  decoder->cff->cf2_instance.finalizer =
287  (FT_Generic_Finalizer)cf2_free_instance;
288 
289  if ( FT_ALLOC( decoder->cff->cf2_instance.data,
290  sizeof ( CF2_FontRec ) ) )
291  return FT_THROW( Out_Of_Memory );
292 
293  font = (CF2_Font)decoder->cff->cf2_instance.data;
294 
295  font->memory = memory;
296 
297  /* initialize a client outline, to be shared by each glyph rendered */
298  cf2_outline_init( &font->outline, font->memory, &font->error );
299  }
300 
301  /* save decoder; it is a stack variable and will be different on each */
302  /* call */
303  font->decoder = decoder;
304  font->outline.decoder = decoder;
305 
306  {
307  /* build parameters for Adobe engine */
308 
309  CFF_Builder* builder = &decoder->builder;
311 
312  /* local error */
313  FT_Error error2 = FT_Err_Ok;
316  CF2_F16Dot16 glyphWidth;
317 
318  FT_Bool hinted;
319  FT_Bool scaled;
320 
321 
322  /* FreeType has already looked up the GID; convert to */
323  /* `RegionBuffer', assuming that the input has been validated */
324  FT_ASSERT( charstring_base + charstring_len >= charstring_base );
325 
326  FT_ZERO( &buf );
327  buf.start =
328  buf.ptr = charstring_base;
329  buf.end = charstring_base + charstring_len;
330 
331  FT_ZERO( &transform );
332 
333  cf2_getScaleAndHintFlag( decoder,
334  &transform.a,
335  &transform.d,
336  &hinted,
337  &scaled );
338 
339  font->renderingFlags = 0;
340  if ( hinted )
342  if ( scaled && !driver->no_stem_darkening )
344 
345  /* now get an outline for this glyph; */
346  /* also get units per em to validate scale */
347  font->unitsPerEm = (CF2_Int)cf2_getUnitsPerEm( decoder );
348 
349  error2 = cf2_checkTransform( &transform, font->unitsPerEm );
350  if ( error2 )
351  return error2;
352 
353  error2 = cf2_getGlyphWidth( font, &buf, &transform, &glyphWidth );
354  if ( error2 )
355  return FT_ERR( Invalid_File_Format );
356 
357  cf2_setGlyphWidth( &font->outline, glyphWidth );
358 
359  return FT_Err_Ok;
360  }
361  }
362 
363 
364  /* get pointer to current FreeType subfont (based on current glyphID) */
367  {
368  FT_ASSERT( decoder && decoder->current_subfont );
369 
370  return decoder->current_subfont;
371  }
372 
373 
374  /* get `y_ppem' from `CFF_Size' */
377  {
378  FT_ASSERT( decoder &&
379  decoder->builder.face &&
380  decoder->builder.face->root.size );
381  FT_ASSERT( decoder->builder.face->root.size->metrics.y_ppem );
382 
383  return cf2_intToFixed(
384  decoder->builder.face->root.size->metrics.y_ppem );
385  }
386 
387 
388  /* get standard stem widths for the current subfont; */
389  /* FreeType stores these as integer font units */
390  /* (note: variable names seem swapped) */
393  {
394  FT_ASSERT( decoder && decoder->current_subfont );
395 
396  return cf2_intToFixed(
398  }
399 
400 
403  {
404  FT_ASSERT( decoder && decoder->current_subfont );
405 
406  return cf2_intToFixed(
408  }
409 
410 
411  /* note: FreeType stores 1000 times the actual value for `BlueScale' */
412  FT_LOCAL_DEF( void )
414  CF2_Fixed* blueScale,
415  CF2_Fixed* blueShift,
416  CF2_Fixed* blueFuzz )
417  {
418  FT_ASSERT( decoder && decoder->current_subfont );
419 
420  *blueScale = FT_DivFix(
422  cf2_intToFixed( 1000 ) );
423  *blueShift = cf2_intToFixed(
425  *blueFuzz = cf2_intToFixed(
427  }
428 
429 
430  /* get blue values counts and arrays; the FreeType parser has validated */
431  /* the counts and verified that each is an even number */
432  FT_LOCAL_DEF( void )
434  size_t* count,
435  FT_Pos* *data )
436  {
437  FT_ASSERT( decoder && decoder->current_subfont );
438 
440  *data = (FT_Pos*)
442  }
443 
444 
445  FT_LOCAL_DEF( void )
447  size_t* count,
448  FT_Pos* *data )
449  {
450  FT_ASSERT( decoder && decoder->current_subfont );
451 
452  *count = decoder->current_subfont->private_dict.num_other_blues;
453  *data = (FT_Pos*)
454  &decoder->current_subfont->private_dict.other_blues;
455  }
456 
457 
458  FT_LOCAL_DEF( void )
460  size_t* count,
461  FT_Pos* *data )
462  {
463  FT_ASSERT( decoder && decoder->current_subfont );
464 
465  *count = decoder->current_subfont->private_dict.num_family_blues;
466  *data = (FT_Pos*)
467  &decoder->current_subfont->private_dict.family_blues;
468  }
469 
470 
471  FT_LOCAL_DEF( void )
473  size_t* count,
474  FT_Pos* *data )
475  {
476  FT_ASSERT( decoder && decoder->current_subfont );
477 
478  *count = decoder->current_subfont->private_dict.num_family_other_blues;
479  *data = (FT_Pos*)
480  &decoder->current_subfont->private_dict.family_other_blues;
481  }
482 
483 
486  {
487  FT_ASSERT( decoder && decoder->current_subfont );
488 
489  return decoder->current_subfont->private_dict.language_group;
490  }
491 
492 
493  /* convert unbiased subroutine index to `CF2_Buffer' and */
494  /* return 0 on success */
497  CF2_UInt idx,
498  CF2_Buffer buf )
499  {
500  FT_ASSERT( decoder && decoder->globals );
501 
502  FT_ZERO( buf );
503 
504  idx += decoder->globals_bias;
505  if ( idx >= decoder->num_globals )
506  return TRUE; /* error */
507 
508  buf->start =
509  buf->ptr = decoder->globals[idx];
510  buf->end = decoder->globals[idx + 1];
511 
512  return FALSE; /* success */
513  }
514 
515 
516  /* convert AdobeStandardEncoding code to CF2_Buffer; */
517  /* used for seac component */
520  CF2_UInt code,
521  CF2_Buffer buf )
522  {
523  CF2_Int gid;
524  FT_Byte* charstring;
525  FT_ULong len;
526  FT_Error error;
527 
528 
529  FT_ASSERT( decoder );
530 
531  FT_ZERO( buf );
532 
533  gid = cff_lookup_glyph_by_stdcharcode( decoder->cff, code );
534  if ( gid < 0 )
535  return FT_THROW( Invalid_Glyph_Format );
536 
537  error = cff_get_glyph_data( decoder->builder.face,
538  gid,
539  &charstring,
540  &len );
541  /* TODO: for now, just pass the FreeType error through */
542  if ( error )
543  return error;
544 
545  /* assume input has been validated */
546  FT_ASSERT( charstring + len >= charstring );
547 
548  buf->start = charstring;
549  buf->end = charstring + len;
550  buf->ptr = buf->start;
551 
552  return FT_Err_Ok;
553  }
554 
555 
556  FT_LOCAL_DEF( void )
558  CF2_Buffer buf )
559  {
560  FT_ASSERT( decoder );
561 
562  cff_free_glyph_data( decoder->builder.face,
563  (FT_Byte**)&buf->start,
564  buf->end - buf->start );
565  }
566 
567 
570  CF2_UInt idx,
571  CF2_Buffer buf )
572  {
573  FT_ASSERT( decoder && decoder->locals );
574 
575  FT_ZERO( buf );
576 
577  idx += decoder->locals_bias;
578  if ( idx >= decoder->num_locals )
579  return TRUE; /* error */
580 
581  buf->start =
582  buf->ptr = decoder->locals[idx];
583  buf->end = decoder->locals[idx + 1];
584 
585  return FALSE; /* success */
586  }
587 
588 
591  {
592  FT_ASSERT( decoder && decoder->current_subfont );
593 
594  return cf2_intToFixed(
596  }
597 
598 
601  {
602  FT_ASSERT( decoder && decoder->current_subfont );
603 
604  return cf2_intToFixed(
606  }
607 
608 
609  FT_LOCAL_DEF( void )
611  {
612  CFF_Decoder* decoder = outline->decoder;
613 
614 
615  FT_ASSERT( decoder );
616 
617  outline->root.windingMomentum = 0;
618 
620  }
621 
622 
623  FT_LOCAL_DEF( void )
625  {
626  CFF_Decoder* decoder = outline->decoder;
627 
628 
629  FT_ASSERT( decoder );
630 
631  cff_builder_close_contour( &decoder->builder );
632 
633  FT_GlyphLoader_Add( decoder->builder.loader );
634  }
635 
636 
637 /* END */
cf2_getStdVW(CFF_Decoder *decoder)
Definition: cf2ft.c:392
FT_UShort units_per_EM
Definition: freetype.h:945
cff_builder_close_contour(CFF_Builder *builder)
Definition: cffgload.c:581
#define FT_ALLOC(ptr, size)
Definition: ftmemory.h:260
#define CF2_FlagsHinted
Definition: cf2glue.h:56
#define CF2_Int
Definition: cf2types.h:65
cf2_getFamilyOtherBlues(CFF_Decoder *decoder, size_t *count, FT_Pos **data)
Definition: cf2ft.c:472
int FT_Error
Definition: fttypes.h:296
FT_DivFix(FT_Long a, FT_Long b)
Definition: ftcalc.c:586
FT_GlyphLoader loader
Definition: cffgload.h:86
CF2_F16Dot16 d
Definition: cf2glue.h:81
FT_Byte ** globals
Definition: cffgload.h:185
CF2_F16Dot16 ty
Definition: cf2glue.h:83
cf2_freeSeacComponent(CFF_Decoder *decoder, CF2_Buffer buf)
Definition: cf2ft.c:557
unsigned long FT_ULong
Definition: fttypes.h:249
FT_BEGIN_HEADER typedef signed long FT_Pos
Definition: ftimage.h:59
struct CF2_FontRec_ * CF2_Font
Definition: cf2glue.h:90
FT_BEGIN_HEADER struct CF2_BufferRec_ CF2_BufferRec
FT_Generic_Finalizer finalizer
Definition: fttypes.h:458
cff_get_glyph_data(TT_Face face, FT_UInt glyph_index, FT_Byte **pointer, FT_ULong *length)
Definition: cffgload.c:655
FT_UInt num_locals
Definition: cffgload.h:178
#define FT_MEM_ZERO(dest, count)
Definition: ftmemory.h:208
CFF_Builder builder
Definition: cffgload.h:157
CF2_F16Dot16 a
Definition: cf2glue.h:78
#define NULL
Definition: ftobjs.h:61
sizeof(AF_ModuleRec)
FT_Fixed blue_scale
Definition: cfftypes.h:163
cf2_getOtherBlues(CFF_Decoder *decoder, size_t *count, FT_Pos **data)
Definition: cf2ft.c:446
png_voidp ptr
Definition: png.h:1908
FT_Pos blue_shift
Definition: cfftypes.h:164
cff_builder_add_point1(CFF_Builder *builder, FT_Pos x, FT_Pos y)
Definition: cffgload.c:514
void(* FT_Generic_Finalizer)(void *object)
Definition: fttypes.h:424
return FT_THROW(Missing_Property)
#define CF2_FlagsDarkened
Definition: cf2glue.h:58
cff_lookup_glyph_by_stdcharcode(CFF_Font cff, FT_Int charcode)
Definition: cffgload.c:626
CF2_OutlineCallbacksRec root
Definition: cf2ft.h:129
struct CF2_OutlineRec_ * CF2_Outline
cf2_getFamilyBlues(CFF_Decoder *decoder, size_t *count, FT_Pos **data)
Definition: cf2ft.c:459
GLint GLint GLsizei width
FT_Pos default_width
Definition: cfftypes.h:180
cf2_initLocalRegionBuffer(CFF_Decoder *decoder, CF2_UInt idx, CF2_Buffer buf)
Definition: cf2ft.c:569
FT_Memory memory
Definition: cf2font.h:57
return FT_Err_Ok
Definition: ftbbox.c:645
cf2_getSeacComponent(CFF_Decoder *decoder, CF2_UInt code, CF2_Buffer buf)
Definition: cf2ft.c:519
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
FT_Error error
Definition: cf2font.h:58
cf2_getBlueValues(CFF_Decoder *decoder, size_t *count, FT_Pos **data)
Definition: cf2ft.c:433
#define FT_FACE_DRIVER(x)
Definition: ftobjs.h:561
FT_BEGIN_HEADER typedef unsigned char FT_Bool
Definition: fttypes.h:104
cf2_getLanguageGroup(CFF_Decoder *decoder)
Definition: cf2ft.c:485
FT_Int globals_bias
Definition: cffgload.h:182
CF2_OutlineRec outline
Definition: cf2font.h:77
GLenum GLuint GLenum GLsizei const GLchar * buf
FT_Pos glyph_width
Definition: cffgload.h:170
CF2_Callback_Type cubeTo
Definition: cf2glue.h:129
CF2_RenderingFlags renderingFlags
Definition: cf2font.h:60
unsigned char FT_Byte
Definition: fttypes.h:150
#define FT_ASSERT(condition)
Definition: ftdebug.h:211
CF2_F16Dot16 b
Definition: cf2glue.h:79
FT_GlyphLoader_Add(FT_GlyphLoader loader)
Definition: ftgloadr.c:324
FT_Byte ** locals
Definition: cffgload.h:184
cf2_getGlyphWidth(CF2_Font font, CF2_Buffer charstring, const CF2_Matrix *transform, CF2_F16Dot16 *glyphWidth)
Definition: cf2font.c:321
FT_Pos blue_values[14]
Definition: cfftypes.h:158
GLenum GLsizei len
cf2_getSubfont(CFF_Decoder *decoder)
Definition: cf2ft.c:366
FT_Fixed y_scale
Definition: cffobjs.h:79
FT_UInt idx
Definition: cffcmap.c:127
CF2_F16Dot16 c
Definition: cf2glue.h:80
#define FT_ERR(e)
Definition: fttypes.h:582
FT_Error error
Definition: cffdrivr.c:411
FT_Pos x
Definition: ftimage.h:77
cf2_getDefaultWidthX(CFF_Decoder *decoder)
Definition: cf2ft.c:590
GLsizei GLsizei GLenum GLenum const GLvoid * data
#define CF2_Fixed
Definition: cf2fixed.h:48
#define cf2_intToFixed(i)
Definition: cf2fixed.h:60
#define FT_ZERO(p)
Definition: ftmemory.h:210
CF2_Callback_Type lineTo
Definition: cf2glue.h:127
#define cf2_fixedToInt(x)
Definition: cf2fixed.h:62
FT_Pos y
Definition: ftimage.h:78
CFF_PrivateRec private_dict
Definition: cfftypes.h:208
FT_Pos standard_width
Definition: cfftypes.h:166
FT_UInt num_globals
Definition: cffgload.h:179
FT_Memory memory
Definition: cffgload.h:83
cf2_outline_reset(CF2_Outline outline)
Definition: cf2ft.c:610
#define FALSE
Definition: ftobjs.h:57
FT_Int32 CF2_F16Dot16
Definition: cf2types.h:69
CFF_Decoder * decoder
Definition: cf2font.h:78
FT_Bool path_begun
Definition: cffgload.h:97
FT_Size size
Definition: freetype.h:957
#define CF2_UInt
Definition: cf2types.h:64
CFF_GlyphSlot glyph
Definition: cffgload.h:85
cf2_getBlueMetrics(CFF_Decoder *decoder, CF2_Fixed *blueScale, CF2_Fixed *blueShift, CF2_Fixed *blueFuzz)
Definition: cf2ft.c:413
typedefFT_BEGIN_HEADER struct FT_MemoryRec_ * FT_Memory
Definition: ftsystem.h:66
CF2_F16Dot16 tx
Definition: cf2glue.h:82
cff_check_points(CFF_Builder *builder, FT_Int count)
Definition: cffgload.c:469
cf2_getNominalWidthX(CFF_Decoder *decoder)
Definition: cf2ft.c:600
Definition: inftree9.h:24
FT_FaceRec root
Definition: tttypes.h:1260
CFF_Driver driver
Definition: cffdrivr.c:585
void * data
Definition: fttypes.h:457
if(!abbox) return FT_THROW(Invalid_Argument)
#define CF2_MAX_SIZE
Definition: cf2ft.c:46
FT_Bool scaled
Definition: cffobjs.h:76
GLenum const GLfloat * params
cff_builder_add_point(CFF_Builder *builder, FT_Pos x, FT_Pos y, FT_Byte flag)
Definition: cffgload.c:478
FT_Bool hint
Definition: cffobjs.h:75
typedefFT_BEGIN_HEADER struct CFF_DriverRec_ * CFF_Driver
Definition: cffobjs.h:42
cf2_getPpemY(CFF_Decoder *decoder)
Definition: cf2ft.c:376
FT_GlyphLoader_Rewind(FT_GlyphLoader loader)
Definition: ftgloadr.c:88
cf2_outline_close(CF2_Outline outline)
Definition: cf2ft.c:624
FT_Int locals_bias
Definition: cffgload.h:181
CFF_Decoder * decoder
Definition: cf2ft.h:130
TT_Face face
Definition: cffgload.h:84
FT_Byte num_blue_values
Definition: cfftypes.h:153
GLuint GLenum GLenum transform
CFF_Font cff
Definition: cffgload.h:158
CF2_Callback_Type moveTo
Definition: cf2glue.h:126
FT_Pos blue_fuzz
Definition: cfftypes.h:165
GLuint GLuint GLsizei count
cf2_initGlobalRegionBuffer(CFF_Decoder *decoder, CF2_UInt idx, CF2_Buffer buf)
Definition: cf2ft.c:496
CF2_Int unitsPerEm
Definition: cf2font.h:71
cf2_getStdHW(CFF_Decoder *decoder)
Definition: cf2ft.c:402
unsigned short FT_UShort
Definition: fttypes.h:205
FT_Pos standard_height
Definition: cfftypes.h:167
cff_free_glyph_data(TT_Face face, FT_Byte **pointer, FT_ULong length)
Definition: cffgload.c:691
cf2_decoder_parse_charstrings(CFF_Decoder *decoder, FT_Byte *charstring_base, FT_ULong charstring_len)
Definition: cf2ft.c:267
FT_Pos nominal_width
Definition: cfftypes.h:181
#define TRUE
Definition: ftobjs.h:53
FT_Fixed x_scale
Definition: cffobjs.h:78
CFF_SubFont current_subfont
Definition: cffgload.h:194
FT_BEGIN_HEADER struct CF2_BufferRec_ * CF2_Buffer
FT_Generic cf2_instance
Definition: cfftypes.h:274
FT_Size_Metrics metrics
Definition: freetype.h:1406
#define FT_LOCAL_DEF(x)
Definition: ftconfig.h:236
cff_builder_start_point(CFF_Builder *builder, FT_Pos x, FT_Pos y)
Definition: cffgload.c:559
FT_UShort y_ppem
Definition: freetype.h:1370