@@ -276,7 +276,7 @@ static void PyGlyph_dealloc(PyGlyph *self)
276
276
static PyObject *PyGlyph_get_bbox (PyGlyph *self, void *closure)
277
277
{
278
278
return Py_BuildValue (
279
- " iiii " , self->bbox .xMin , self->bbox .yMin , self->bbox .xMax , self->bbox .yMax );
279
+ " llll " , self->bbox .xMin , self->bbox .yMin , self->bbox .xMax , self->bbox .yMax );
280
280
}
281
281
282
282
static PyTypeObject *PyGlyph_init_type (PyObject *m, PyTypeObject *type)
@@ -1025,7 +1025,7 @@ static PyObject *PyFT2Font_get_sfnt(PyFT2Font *self, PyObject *args, PyObject *k
1025
1025
}
1026
1026
1027
1027
PyObject *key = Py_BuildValue (
1028
- " iiii " , sfnt.platform_id , sfnt.encoding_id , sfnt.language_id , sfnt.name_id );
1028
+ " HHHH " , sfnt.platform_id , sfnt.encoding_id , sfnt.language_id , sfnt.name_id );
1029
1029
if (key == NULL ) {
1030
1030
Py_DECREF (names);
1031
1031
return NULL ;
@@ -1089,7 +1089,7 @@ static PyObject *PyFT2Font_get_ps_font_info(PyFT2Font *self, PyObject *args, PyO
1089
1089
return NULL ;
1090
1090
}
1091
1091
1092
- return Py_BuildValue (" sssssliii " ,
1092
+ return Py_BuildValue (" ssssslbhH " ,
1093
1093
fontinfo.version ? fontinfo.version : " " ,
1094
1094
fontinfo.notice ? fontinfo.notice : " " ,
1095
1095
fontinfo.full_name ? fontinfo.full_name : " " ,
@@ -1134,8 +1134,8 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1134
1134
switch (tag) {
1135
1135
case 0 : {
1136
1136
char head_dict[] =
1137
- " {s:(h,h ), s:(h,h ), s:l, s:l, s:i , s:i ,"
1138
- " s:(l,l), s:(l,l), s:h, s:h, s:h, s:h, s:i , s:i , s:h, s:h, s:h}" ;
1137
+ " {s:(H,H ), s:(H,H ), s:l, s:l, s:H , s:H ,"
1138
+ " s:(l,l), s:(l,l), s:h, s:h, s:h, s:h, s:H , s:H , s:h, s:h, s:h}" ;
1139
1139
TT_Header *t = (TT_Header *)table;
1140
1140
return Py_BuildValue (head_dict,
1141
1141
" version" ,
@@ -1149,9 +1149,9 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1149
1149
" magicNumber" ,
1150
1150
t->Magic_Number ,
1151
1151
" flags" ,
1152
- ( unsigned ) t->Flags ,
1152
+ t->Flags ,
1153
1153
" unitsPerEm" ,
1154
- ( unsigned ) t->Units_Per_EM ,
1154
+ t->Units_Per_EM ,
1155
1155
" created" ,
1156
1156
t->Created [0 ],
1157
1157
t->Created [1 ],
@@ -1167,9 +1167,9 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1167
1167
" yMax" ,
1168
1168
t->yMax ,
1169
1169
" macStyle" ,
1170
- ( unsigned ) t->Mac_Style ,
1170
+ t->Mac_Style ,
1171
1171
" lowestRecPPEM" ,
1172
- ( unsigned ) t->Lowest_Rec_PPEM ,
1172
+ t->Lowest_Rec_PPEM ,
1173
1173
" fontDirectionHint" ,
1174
1174
t->Font_Direction ,
1175
1175
" indexToLocFormat" ,
@@ -1179,64 +1179,64 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1179
1179
}
1180
1180
case 1 : {
1181
1181
char maxp_dict[] =
1182
- " {s:(h,h), s:i , s:i , s:i , s:i , s:i , s:i ,"
1183
- " s:i , s:i , s:i , s:i , s:i , s:i , s:i , s:i }" ;
1182
+ " {s:(h,h), s:H , s:H , s:H , s:H , s:H , s:H ,"
1183
+ " s:H , s:H , s:H , s:H , s:H , s:H , s:H , s:H }" ;
1184
1184
TT_MaxProfile *t = (TT_MaxProfile *)table;
1185
1185
return Py_BuildValue (maxp_dict,
1186
1186
" version" ,
1187
1187
FIXED_MAJOR (t->version ),
1188
1188
FIXED_MINOR (t->version ),
1189
1189
" numGlyphs" ,
1190
- ( unsigned ) t->numGlyphs ,
1190
+ t->numGlyphs ,
1191
1191
" maxPoints" ,
1192
- ( unsigned ) t->maxPoints ,
1192
+ t->maxPoints ,
1193
1193
" maxContours" ,
1194
- ( unsigned ) t->maxContours ,
1194
+ t->maxContours ,
1195
1195
" maxComponentPoints" ,
1196
- ( unsigned ) t->maxCompositePoints ,
1196
+ t->maxCompositePoints ,
1197
1197
" maxComponentContours" ,
1198
- ( unsigned ) t->maxCompositeContours ,
1198
+ t->maxCompositeContours ,
1199
1199
" maxZones" ,
1200
- ( unsigned ) t->maxZones ,
1200
+ t->maxZones ,
1201
1201
" maxTwilightPoints" ,
1202
- ( unsigned ) t->maxTwilightPoints ,
1202
+ t->maxTwilightPoints ,
1203
1203
" maxStorage" ,
1204
- ( unsigned ) t->maxStorage ,
1204
+ t->maxStorage ,
1205
1205
" maxFunctionDefs" ,
1206
- ( unsigned ) t->maxFunctionDefs ,
1206
+ t->maxFunctionDefs ,
1207
1207
" maxInstructionDefs" ,
1208
- ( unsigned ) t->maxInstructionDefs ,
1208
+ t->maxInstructionDefs ,
1209
1209
" maxStackElements" ,
1210
- ( unsigned ) t->maxStackElements ,
1210
+ t->maxStackElements ,
1211
1211
" maxSizeOfInstructions" ,
1212
- ( unsigned ) t->maxSizeOfInstructions ,
1212
+ t->maxSizeOfInstructions ,
1213
1213
" maxComponentElements" ,
1214
- ( unsigned ) t->maxComponentElements ,
1214
+ t->maxComponentElements ,
1215
1215
" maxComponentDepth" ,
1216
- ( unsigned ) t->maxComponentDepth );
1216
+ t->maxComponentDepth );
1217
1217
}
1218
1218
case 2 : {
1219
1219
#if PY3K
1220
1220
char os_2_dict[] =
1221
- " {s:h , s:h, s:h , s:h , s:h , s:h, s:h, s:h,"
1222
- " s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:y#, s:(llll ),"
1223
- " s:y#, s:h , s:h , s:h }" ;
1221
+ " {s:H , s:h, s:H , s:H , s:H , s:h, s:h, s:h,"
1222
+ " s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:y#, s:(kkkk ),"
1223
+ " s:y#, s:H , s:H , s:H }" ;
1224
1224
#else
1225
1225
char os_2_dict[] =
1226
- " {s:h , s:h, s:h , s:h , s:h , s:h, s:h, s:h,"
1227
- " s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:s#, s:(llll ),"
1228
- " s:s#, s:h , s:h , s:h }" ;
1226
+ " {s:H , s:h, s:H , s:H , s:H , s:h, s:h, s:h,"
1227
+ " s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:s#, s:(kkkk ),"
1228
+ " s:s#, s:H , s:H , s:H }" ;
1229
1229
#endif
1230
1230
TT_OS2 *t = (TT_OS2 *)table;
1231
1231
return Py_BuildValue (os_2_dict,
1232
1232
" version" ,
1233
- ( unsigned ) t->version ,
1233
+ t->version ,
1234
1234
" xAvgCharWidth" ,
1235
1235
t->xAvgCharWidth ,
1236
1236
" usWeightClass" ,
1237
- ( unsigned ) t->usWeightClass ,
1237
+ t->usWeightClass ,
1238
1238
" usWidthClass" ,
1239
- ( unsigned ) t->usWidthClass ,
1239
+ t->usWidthClass ,
1240
1240
" fsType" ,
1241
1241
t->fsType ,
1242
1242
" ySubscriptXSize" ,
@@ -1265,24 +1265,24 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1265
1265
t->panose ,
1266
1266
10 ,
1267
1267
" ulCharRange" ,
1268
- ( unsigned long ) t->ulUnicodeRange1 ,
1269
- ( unsigned long ) t->ulUnicodeRange2 ,
1270
- ( unsigned long ) t->ulUnicodeRange3 ,
1271
- ( unsigned long ) t->ulUnicodeRange4 ,
1268
+ t->ulUnicodeRange1 ,
1269
+ t->ulUnicodeRange2 ,
1270
+ t->ulUnicodeRange3 ,
1271
+ t->ulUnicodeRange4 ,
1272
1272
" achVendID" ,
1273
1273
t->achVendID ,
1274
1274
4 ,
1275
1275
" fsSelection" ,
1276
- ( unsigned ) t->fsSelection ,
1276
+ t->fsSelection ,
1277
1277
" fsFirstCharIndex" ,
1278
- ( unsigned ) t->usFirstCharIndex ,
1278
+ t->usFirstCharIndex ,
1279
1279
" fsLastCharIndex" ,
1280
- ( unsigned ) t->usLastCharIndex );
1280
+ t->usLastCharIndex );
1281
1281
}
1282
1282
case 3 : {
1283
1283
char hhea_dict[] =
1284
- " {s:(h,h ), s:h, s:h, s:h, s:i , s:h, s:h, s:h,"
1285
- " s:h, s:h, s:h, s:h, s:i }" ;
1284
+ " {s:(H,H ), s:h, s:h, s:h, s:H , s:h, s:h, s:h,"
1285
+ " s:h, s:h, s:h, s:h, s:H }" ;
1286
1286
TT_HoriHeader *t = (TT_HoriHeader *)table;
1287
1287
return Py_BuildValue (hhea_dict,
1288
1288
" version" ,
@@ -1295,7 +1295,7 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1295
1295
" lineGap" ,
1296
1296
t->Line_Gap ,
1297
1297
" advanceWidthMax" ,
1298
- ( unsigned ) t->advance_Width_Max ,
1298
+ t->advance_Width_Max ,
1299
1299
" minLeftBearing" ,
1300
1300
t->min_Left_Side_Bearing ,
1301
1301
" minRightBearing" ,
@@ -1311,12 +1311,12 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1311
1311
" metricDataFormat" ,
1312
1312
t->metric_Data_Format ,
1313
1313
" numOfLongHorMetrics" ,
1314
- ( unsigned ) t->number_Of_HMetrics );
1314
+ t->number_Of_HMetrics );
1315
1315
}
1316
1316
case 4 : {
1317
1317
char vhea_dict[] =
1318
- " {s:(h,h ), s:h, s:h, s:h, s:i , s:h, s:h, s:h,"
1319
- " s:h, s:h, s:h, s:h, s:i }" ;
1318
+ " {s:(H,H ), s:h, s:h, s:h, s:H , s:h, s:h, s:h,"
1319
+ " s:h, s:h, s:h, s:h, s:H }" ;
1320
1320
TT_VertHeader *t = (TT_VertHeader *)table;
1321
1321
return Py_BuildValue (vhea_dict,
1322
1322
" version" ,
@@ -1329,7 +1329,7 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1329
1329
" vertTypoLineGap" ,
1330
1330
t->Line_Gap ,
1331
1331
" advanceHeightMax" ,
1332
- ( unsigned ) t->advance_Height_Max ,
1332
+ t->advance_Height_Max ,
1333
1333
" minTopSideBearing" ,
1334
1334
t->min_Top_Side_Bearing ,
1335
1335
" minBottomSizeBearing" ,
@@ -1345,10 +1345,10 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1345
1345
" metricDataFormat" ,
1346
1346
t->metric_Data_Format ,
1347
1347
" numOfLongVerMetrics" ,
1348
- ( unsigned ) t->number_Of_VMetrics );
1348
+ t->number_Of_VMetrics );
1349
1349
}
1350
1350
case 5 : {
1351
- char post_dict[] = " {s:(h,h ), s:(h,h ), s:h, s:h, s:k, s:k, s:k, s:k, s:k}" ;
1351
+ char post_dict[] = " {s:(H,H ), s:(H,H ), s:h, s:h, s:k, s:k, s:k, s:k, s:k}" ;
1352
1352
TT_Postscript *t = (TT_Postscript *)table;
1353
1353
return Py_BuildValue (post_dict,
1354
1354
" format" ,
@@ -1375,12 +1375,12 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1375
1375
case 6 : {
1376
1376
#if PY3K
1377
1377
char pclt_dict[] =
1378
- " {s:(h,h ), s:k, s:H, s:H, s:H, s:H, s:H, s:H, s:y, s:y, s:b , s:b, "
1379
- " s:b}" ;
1378
+ " {s:(H,H ), s:k, s:H, s:H, s:H, s:H, s:H, s:H, s:y# , s:y# , s:b, "
1379
+ " s:b, s:b }" ;
1380
1380
#else
1381
1381
char pclt_dict[] =
1382
- " {s:(h,h ), s:k, s:H, s:H, s:H, s:H, s:H, s:H, s:s, s:s, s:b , s:b, "
1383
- " s:b}" ;
1382
+ " {s:(H,H ), s:k, s:H, s:H, s:H, s:H, s:H, s:H, s:s# , s:s# , s:b, "
1383
+ " s:b, s:b }" ;
1384
1384
#endif
1385
1385
TT_PCLT *t = (TT_PCLT *)table;
1386
1386
return Py_BuildValue (pclt_dict,
@@ -1403,8 +1403,10 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1403
1403
t->SymbolSet ,
1404
1404
" typeFace" ,
1405
1405
t->TypeFace ,
1406
+ 16 ,
1406
1407
" characterComplement" ,
1407
1408
t->CharacterComplement ,
1409
+ 8 ,
1408
1410
" strokeWeight" ,
1409
1411
t->StrokeWeight ,
1410
1412
" widthType" ,
@@ -1527,7 +1529,8 @@ static PyObject *PyFT2Font_get_bbox(PyFT2Font *self, void *closure)
1527
1529
{
1528
1530
FT_BBox *bbox = &(self->x ->get_face ()->bbox );
1529
1531
1530
- return Py_BuildValue (" iiii" , bbox->xMin , bbox->yMin , bbox->xMax , bbox->yMax );
1532
+ return Py_BuildValue (" llll" ,
1533
+ bbox->xMin , bbox->yMin , bbox->xMax , bbox->yMax );
1531
1534
}
1532
1535
1533
1536
static PyObject *PyFT2Font_ascender (PyFT2Font *self, void *closure)
0 commit comments