formatting
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index f5a0814..a66a852 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -173,8 +173,8 @@
static
FT_Error Load_Glyph( CFF_GlyphSlot slot,
CFF_Size size,
- FT_UShort glyph_index,
- FT_UInt load_flags )
+ FT_UShort glyph_index,
+ FT_UInt load_flags )
{
FT_Error error;
@@ -236,10 +236,10 @@
/* */
static
FT_UInt cff_get_char_index( TT_CharMap charmap,
- FT_Long charcode )
+ FT_Long charcode )
{
FT_Error error;
- CFF_Face face;
+ CFF_Face face;
TT_CMapTable* cmap;
@@ -277,8 +277,8 @@
static
- FT_Module_Interface cff_get_interface( CFF_Driver driver,
- const char* interface )
+ FT_Module_Interface cff_get_interface( CFF_Driver driver,
+ const char* interface )
{
FT_Module sfnt;
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 13008e7..7b96e68 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -203,7 +203,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CFF_Init_Builder */
+ /* CFF_Init_Builder */
/* */
/* <Description> */
/* Initializes a given glyph builder. */
@@ -220,9 +220,9 @@
/* */
static
void CFF_Init_Builder( CFF_Builder* builder,
- TT_Face face,
- CFF_Size size,
- CFF_GlyphSlot glyph )
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot glyph )
{
builder->path_begun = 0;
builder->load_points = 1;
@@ -261,7 +261,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CFF_Done_Builder */
+ /* CFF_Done_Builder */
/* */
/* <Description> */
/* Finalizes a given glyph builder. Its contents can still be used */
@@ -285,7 +285,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* cff_compute_bias */
+ /* cff_compute_bias */
/* */
/* <Description> */
/* Computes the bias value in dependence of the number of glyph */
@@ -316,7 +316,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CFF_Init_Decoder */
+ /* CFF_Init_Decoder */
/* */
/* <Description> */
/* Initializes a given glyph decoder. */
@@ -332,10 +332,10 @@
/* slot :: The current glyph object. */
/* */
FT_LOCAL_DEF
- void CFF_Init_Decoder( CFF_Decoder* decoder,
- TT_Face face,
- CFF_Size size,
- CFF_GlyphSlot slot )
+ void CFF_Init_Decoder( CFF_Decoder* decoder,
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot slot )
{
CFF_Font* cff = (CFF_Font*)face->extra.data;
@@ -356,7 +356,7 @@
/* this function is used to select the locals subrs array */
FT_LOCAL_DEF
void CFF_Prepare_Decoder( CFF_Decoder* decoder,
- FT_UInt glyph_index )
+ FT_UInt glyph_index )
{
CFF_Font* cff = (CFF_Font*)decoder->builder.face->extra.data;
CFF_SubFont* sub = &cff->top_font;
@@ -383,7 +383,7 @@
/* check that there is enough room for `count' more points */
static
FT_Error check_points( CFF_Builder* builder,
- FT_Int count )
+ FT_Int count )
{
return FT_GlyphLoader_Check_Points( builder->loader, count, 0 );
}
@@ -392,9 +392,9 @@
/* add a new point, do not check space */
static
void add_point( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y,
- FT_Byte flag )
+ FT_Pos x,
+ FT_Pos y,
+ FT_Byte flag )
{
FT_Outline* outline = builder->current;
@@ -418,8 +418,8 @@
/* check space for a new on-curve point, then add it */
static
FT_Error add_point1( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y )
+ FT_Pos x,
+ FT_Pos y )
{
FT_Error error;
@@ -462,8 +462,8 @@
/* if a path was begun, add its first on-curve point */
static
FT_Error start_point( CFF_Builder* builder,
- FT_Pos x,
- FT_Pos y )
+ FT_Pos x,
+ FT_Pos y )
{
FT_Error error = 0;
@@ -516,7 +516,7 @@
static
FT_Int cff_lookup_glyph_by_stdcharcode( CFF_Font* cff,
- FT_Int charcode )
+ FT_Int charcode )
{
FT_UInt n;
FT_UShort glyph_sid;
@@ -542,10 +542,10 @@
static
FT_Error cff_operator_seac( CFF_Decoder* decoder,
- FT_Pos adx,
- FT_Pos ady,
- FT_Int bchar,
- FT_Int achar )
+ FT_Pos adx,
+ FT_Pos ady,
+ FT_Int bchar,
+ FT_Int achar )
{
FT_Error error;
FT_Int bchar_index, achar_index, n_base_points;
@@ -667,7 +667,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CFF_Parse_CharStrings */
+ /* CFF_Parse_CharStrings */
/* */
/* <Description> */
/* Parses a given Type 2 charstrings program. */
@@ -685,18 +685,18 @@
/* */
FT_LOCAL_DEF
FT_Error CFF_Parse_CharStrings( CFF_Decoder* decoder,
- FT_Byte* charstring_base,
- FT_Int charstring_len )
+ FT_Byte* charstring_base,
+ FT_Int charstring_len )
{
- FT_Error error;
+ FT_Error error;
CFF_Decoder_Zone* zone;
- FT_Byte* ip;
- FT_Byte* limit;
+ FT_Byte* ip;
+ FT_Byte* limit;
CFF_Builder* builder = &decoder->builder;
- FT_Outline* outline;
- FT_Pos x, y;
- FT_Fixed seed;
- FT_Fixed* stack;
+ FT_Outline* outline;
+ FT_Pos x, y;
+ FT_Fixed seed;
+ FT_Fixed* stack;
/* set default width */
@@ -733,7 +733,7 @@
while ( ip < limit )
{
CFF_Operator op;
- FT_Byte v;
+ FT_Byte v;
/********************************************************************/
@@ -1054,7 +1054,7 @@
FT_TRACE4(( op == cff_op_hstem ? " hstem" :
op == cff_op_vstem ? " vstem" :
op == cff_op_hstemhm ? " hstemhm" :
- " vstemhm" ));
+ " vstemhm" ));
decoder->num_hints += num_args / 2;
args = stack;
break;
@@ -1062,7 +1062,7 @@
case cff_op_hintmask:
case cff_op_cntrmask:
FT_TRACE4(( op == cff_op_hintmask ? " hintmask"
- : " cntrmask" ));
+ : " cntrmask" ));
decoder->num_hints += num_args / 2;
ip += ( decoder->num_hints + 7 ) >> 3;
@@ -1127,7 +1127,7 @@
FT_TRACE4(( op == cff_op_hlineto ? " hlineto"
- : " vlineto" ));
+ : " vlineto" ));
if ( start_point ( builder, x, y ) ||
check_points( builder, num_args ) )
@@ -1254,7 +1254,7 @@
FT_TRACE4(( op == cff_op_vhcurveto ? " vhcurveto"
- : " hvcurveto" ));
+ : " hvcurveto" ));
if ( start_point ( builder, x, y ) )
goto Memory_Error;
@@ -1584,8 +1584,9 @@
/* We are going to emulate the seac operator. */
if ( num_args == 4 )
{
- error = cff_operator_seac( decoder, args[0] >> 16, args[1] >> 16,
- args[2] >> 16, args[3] >> 16 );
+ error = cff_operator_seac( decoder,
+ args[0] >> 16, args[1] >> 16,
+ args[2] >> 16, args[3] >> 16 );
args += 4;
}
@@ -2021,12 +2022,12 @@
FT_LOCAL_DEF
FT_Error CFF_Compute_Max_Advance( TT_Face face,
- FT_Int* max_advance )
+ FT_Int* max_advance )
{
- FT_Error error = 0;
+ FT_Error error = 0;
CFF_Decoder decoder;
- FT_Int glyph_index;
- CFF_Font* cff = (CFF_Font*)face->other;
+ FT_Int glyph_index;
+ CFF_Font* cff = (CFF_Font*)face->other;
*max_advance = 0;
@@ -2048,7 +2049,7 @@
/* now get load the unscaled outline */
error = CFF_Access_Element( &cff->charstrings_index, glyph_index,
- &charstring, &charstring_len );
+ &charstring, &charstring_len );
if ( !error )
{
CFF_Prepare_Decoder( &decoder, glyph_index );
@@ -2088,18 +2089,18 @@
FT_LOCAL_DEF
FT_Error CFF_Load_Glyph( CFF_GlyphSlot glyph,
- CFF_Size size,
- FT_Int glyph_index,
- FT_Int load_flags )
+ CFF_Size size,
+ FT_Int glyph_index,
+ FT_Int load_flags )
{
- FT_Error error;
+ FT_Error error;
CFF_Decoder decoder;
- TT_Face face = (TT_Face)glyph->root.face;
- FT_Bool hinting;
- CFF_Font* cff = (CFF_Font*)face->extra.data;
+ TT_Face face = (TT_Face)glyph->root.face;
+ FT_Bool hinting;
+ CFF_Font* cff = (CFF_Font*)face->extra.data;
- FT_Matrix font_matrix;
- FT_Vector font_offset;
+ FT_Matrix font_matrix;
+ FT_Vector font_offset;
if ( load_flags & FT_LOAD_NO_RECURSE )
diff --git a/src/cff/cffgload.h b/src/cff/cffgload.h
index e8d7e11..fb07274 100644
--- a/src/cff/cffgload.h
+++ b/src/cff/cffgload.h
@@ -35,7 +35,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Structure> */
- /* CFF_Builder */
+ /* CFF_Builder */
/* */
/* <Description> */
/* A structure used during glyph loading to store its outline. */
@@ -86,31 +86,31 @@ FT_BEGIN_HEADER
/* */
typedef struct CFF_Builder_
{
- FT_Memory memory;
- TT_Face face;
+ FT_Memory memory;
+ TT_Face face;
CFF_GlyphSlot glyph;
- FT_GlyphLoader* loader;
- FT_Outline* base;
- FT_Outline* current;
+ FT_GlyphLoader* loader;
+ FT_Outline* base;
+ FT_Outline* current;
- FT_Vector last;
+ FT_Vector last;
- FT_Fixed scale_x;
- FT_Fixed scale_y;
+ FT_Fixed scale_x;
+ FT_Fixed scale_y;
- FT_Pos pos_x;
- FT_Pos pos_y;
+ FT_Pos pos_x;
+ FT_Pos pos_y;
- FT_Vector left_bearing;
- FT_Vector advance;
+ FT_Vector left_bearing;
+ FT_Vector advance;
- FT_BBox bbox; /* bounding box */
- FT_Bool path_begun;
- FT_Bool load_points;
- FT_Bool no_recurse;
+ FT_BBox bbox; /* bounding box */
+ FT_Bool path_begun;
+ FT_Bool load_points;
+ FT_Bool no_recurse;
- FT_Error error; /* only used for memory errors */
- FT_Bool metrics_only;
+ FT_Error error; /* only used for memory errors */
+ FT_Bool metrics_only;
} CFF_Builder;
@@ -129,70 +129,70 @@ FT_BEGIN_HEADER
typedef struct CFF_Decoder_
{
CFF_Builder builder;
- CFF_Font* cff;
+ CFF_Font* cff;
- FT_Fixed stack[CFF_MAX_OPERANDS + 1];
- FT_Fixed* top;
+ FT_Fixed stack[CFF_MAX_OPERANDS + 1];
+ FT_Fixed* top;
CFF_Decoder_Zone zones[CFF_MAX_SUBRS_CALLS + 1];
CFF_Decoder_Zone* zone;
- FT_Int flex_state;
- FT_Int num_flex_vectors;
- FT_Vector flex_vectors[7];
+ FT_Int flex_state;
+ FT_Int num_flex_vectors;
+ FT_Vector flex_vectors[7];
- FT_Pos glyph_width;
- FT_Pos nominal_width;
+ FT_Pos glyph_width;
+ FT_Pos nominal_width;
- FT_Bool read_width;
- FT_Int num_hints;
- FT_Fixed* buildchar;
- FT_Int len_buildchar;
+ FT_Bool read_width;
+ FT_Int num_hints;
+ FT_Fixed* buildchar;
+ FT_Int len_buildchar;
- FT_UInt num_locals;
- FT_UInt num_globals;
+ FT_UInt num_locals;
+ FT_UInt num_globals;
- FT_Int locals_bias;
- FT_Int globals_bias;
+ FT_Int locals_bias;
+ FT_Int globals_bias;
- FT_Byte** locals;
- FT_Byte** globals;
+ FT_Byte** locals;
+ FT_Byte** globals;
- FT_Byte** glyph_names; /* for pure CFF fonts only */
- FT_UInt num_glyphs; /* number of glyphs in font */
+ FT_Byte** glyph_names; /* for pure CFF fonts only */
+ FT_UInt num_glyphs; /* number of glyphs in font */
} CFF_Decoder;
FT_LOCAL
void CFF_Init_Decoder( CFF_Decoder* decoder,
- TT_Face face,
- CFF_Size size,
- CFF_GlyphSlot slot );
+ TT_Face face,
+ CFF_Size size,
+ CFF_GlyphSlot slot );
FT_LOCAL
void CFF_Prepare_Decoder( CFF_Decoder* decoder,
- FT_UInt glyph_index );
+ FT_UInt glyph_index );
#if 0 /* unused until we support pure CFF fonts */
/* Compute the maximum advance width of a font through quick parsing */
FT_LOCAL
FT_Error CFF_Compute_Max_Advance( TT_Face face,
- FT_Int* max_advance );
+ FT_Int* max_advance );
#endif /* 0 */
FT_LOCAL
FT_Error CFF_Parse_CharStrings( CFF_Decoder* decoder,
- FT_Byte* charstring_base,
- FT_Int charstring_len );
+ FT_Byte* charstring_base,
+ FT_Int charstring_len );
FT_LOCAL
FT_Error CFF_Load_Glyph( CFF_GlyphSlot glyph,
- CFF_Size size,
- FT_Int glyph_index,
- FT_Int load_flags );
+ CFF_Size size,
+ FT_Int glyph_index,
+ FT_Int load_flags );
FT_END_HEADER
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index cb2fe5c..b535a3d 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -50,7 +50,7 @@
static
FT_String* CFF_StrCopy( FT_Memory memory,
- const FT_String* source )
+ const FT_String* source )
{
FT_Error error;
FT_String* result = 0;
@@ -71,7 +71,7 @@
/* this function is used to build a Unicode charmap from the glyph names */
/* in a file */
static
- FT_Error CFF_Build_Unicode_Charmap( CFF_Face face,
+ FT_Error CFF_Build_Unicode_Charmap( CFF_Face face,
FT_ULong base_offset,
PSNames_Interface* psnames )
{
@@ -119,8 +119,8 @@
for ( ; gname < limit; gname++ )
gname[0] = CFF_Get_String( &font->string_index,
- GET_UShort(),
- psnames );
+ GET_UShort(),
+ psnames );
FORGET_Frame();
break;
}
@@ -156,8 +156,8 @@
for ( ; count > 0; count-- )
{
gname[0] = CFF_Get_String( &font->string_index,
- first,
- psnames );
+ first,
+ psnames );
gname++;
first++;
}
@@ -239,7 +239,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CFF_Init_Face */
+ /* CFF_Init_Face */
/* */
/* <Description> */
/* Initializes a given OpenType face object. */
@@ -261,10 +261,10 @@
/* */
FT_LOCAL
FT_Error CFF_Init_Face( FT_Stream stream,
- CFF_Face face,
- FT_Int face_index,
- FT_Int num_params,
- FT_Parameter* params )
+ CFF_Face face,
+ FT_Int face_index,
+ FT_Int num_params,
+ FT_Parameter* params )
{
FT_Error error;
SFNT_Interface* sfnt;
@@ -496,7 +496,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CFF_Done_Face */
+ /* CFF_Done_Face */
/* */
/* <Description> */
/* Finalizes a given face object. */
@@ -530,7 +530,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* CFF_Init_Driver */
+ /* CFF_Init_Driver */
/* */
/* <Description> */
/* Initializes a given OpenType driver object. */
diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h
index 05cee14..fef2b79 100644
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -33,7 +33,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Type> */
- /* CFF_Driver */
+ /* CFF_Driver */
/* */
/* <Description> */
/* A handle to an OpenType driver object. */
@@ -46,7 +46,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Type> */
- /* CFF_Size */
+ /* CFF_Size */
/* */
/* <Description> */
/* A handle to an OpenType size object. */
@@ -57,12 +57,12 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Type> */
- /* CFF_GlyphSlot */
+ /* CFF_GlyphSlot */
/* */
/* <Description> */
/* A handle to an OpenType glyph slot object. */
/* */
- typedef struct CFF_GlyphSlotRec_
+ typedef struct CFF_GlyphSlotRec_
{
FT_GlyphSlotRec root;
@@ -116,10 +116,10 @@ FT_BEGIN_HEADER
/* */
FT_LOCAL
FT_Error CFF_Init_Face( FT_Stream stream,
- CFF_Face face,
- FT_Int face_index,
- FT_Int num_params,
- FT_Parameter* params );
+ CFF_Face face,
+ FT_Int face_index,
+ FT_Int num_params,
+ FT_Parameter* params );
FT_LOCAL
void CFF_Done_Face( CFF_Face face );