| OLD | NEW |
| 1 /***************************************************************************/ | 1 /***************************************************************************/ |
| 2 /* */ | 2 /* */ |
| 3 /* ttcmap.c */ | 3 /* ttcmap.c */ |
| 4 /* */ | 4 /* */ |
| 5 /* TrueType character mapping table (cmap) support (body). */ | 5 /* TrueType character mapping table (cmap) support (body). */ |
| 6 /* */ | 6 /* */ |
| 7 /* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */ | 7 /* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 by */ |
| 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ | 8 /* David Turner, Robert Wilhelm, and Werner Lemberg. */ |
| 9 /* */ | 9 /* */ |
| 10 /* This file is part of the FreeType project, and may only be used, */ | 10 /* This file is part of the FreeType project, and may only be used, */ |
| (...skipping 3345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3356 int i = 0; | 3356 int i = 0; |
| 3357 | 3357 |
| 3358 #define TTCMAPCITEM(a) i++; | 3358 #define TTCMAPCITEM(a) i++; |
| 3359 #include "ttcmapc.h" | 3359 #include "ttcmapc.h" |
| 3360 | 3360 |
| 3361 /* allocate enough space for both the pointers +terminator and the class ins
tances */ | 3361 /* allocate enough space for both the pointers +terminator and the class ins
tances */ |
| 3362 if ( FT_ALLOC( clazz, sizeof(*clazz)*(i+1)+sizeof(TT_CMap_ClassRec)*i ) ) | 3362 if ( FT_ALLOC( clazz, sizeof(*clazz)*(i+1)+sizeof(TT_CMap_ClassRec)*i ) ) |
| 3363 return error; | 3363 return error; |
| 3364 | 3364 |
| 3365 /* the location of the class instances follows the array of pointers */ | 3365 /* the location of the class instances follows the array of pointers */ |
| 3366 recs = (TT_CMap_ClassRec*) (((char*)clazz)+(sizeof(*clazz)*(i+1))); | 3366 recs = (TT_CMap_ClassRec*) (((char*)clazz)+(sizeof(*clazz)*(i+1))); |
| 3367 i=0; | 3367 i=0; |
| 3368 | 3368 |
| 3369 #undef TTCMAPCITEM | 3369 #undef TTCMAPCITEM |
| 3370 #define TTCMAPCITEM(a) \ | 3370 #define TTCMAPCITEM(a) \ |
| 3371 FT_Init_Class_##a(&recs[i]); \ | 3371 FT_Init_Class_##a(&recs[i]); \ |
| 3372 clazz[i] = &recs[i]; \ | 3372 clazz[i] = &recs[i]; \ |
| 3373 i++; | 3373 i++; |
| 3374 #include "ttcmapc.h" | 3374 #include "ttcmapc.h" |
| 3375 | 3375 |
| 3376 clazz[i] = NULL; | 3376 clazz[i] = NULL; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3503 { | 3503 { |
| 3504 FT_CMap cmap = (FT_CMap)charmap; | 3504 FT_CMap cmap = (FT_CMap)charmap; |
| 3505 TT_CMap_Class clazz = (TT_CMap_Class)cmap->clazz; | 3505 TT_CMap_Class clazz = (TT_CMap_Class)cmap->clazz; |
| 3506 | 3506 |
| 3507 | 3507 |
| 3508 return clazz->get_cmap_info( charmap, cmap_info ); | 3508 return clazz->get_cmap_info( charmap, cmap_info ); |
| 3509 } | 3509 } |
| 3510 | 3510 |
| 3511 | 3511 |
| 3512 /* END */ | 3512 /* END */ |
| OLD | NEW |