@@ -277,7 +277,7 @@ static void PyGlyph_dealloc(PyGlyph *self)
277
277
static PyObject *PyGlyph_get_bbox (PyGlyph *self, void *closure)
278
278
{
279
279
return Py_BuildValue (
280
- " iiii " , self->bbox .xMin , self->bbox .yMin , self->bbox .xMax , self->bbox .yMax );
280
+ " llll " , self->bbox .xMin , self->bbox .yMin , self->bbox .xMax , self->bbox .yMax );
281
281
}
282
282
283
283
static PyTypeObject *PyGlyph_init_type (PyObject *m, PyTypeObject *type)
@@ -1029,7 +1029,7 @@ static PyObject *PyFT2Font_get_sfnt(PyFT2Font *self, PyObject *args, PyObject *k
1029
1029
}
1030
1030
1031
1031
PyObject *key = Py_BuildValue (
1032
- " iiii " , sfnt.platform_id , sfnt.encoding_id , sfnt.language_id , sfnt.name_id );
1032
+ " HHHH " , sfnt.platform_id , sfnt.encoding_id , sfnt.language_id , sfnt.name_id );
1033
1033
if (key == NULL ) {
1034
1034
Py_DECREF (names);
1035
1035
return NULL ;
@@ -1093,7 +1093,7 @@ static PyObject *PyFT2Font_get_ps_font_info(PyFT2Font *self, PyObject *args, PyO
1093
1093
return NULL ;
1094
1094
}
1095
1095
1096
- return Py_BuildValue (" sssssliii " ,
1096
+ return Py_BuildValue (" ssssslbhH " ,
1097
1097
fontinfo.version ? fontinfo.version : " " ,
1098
1098
fontinfo.notice ? fontinfo.notice : " " ,
1099
1099
fontinfo.full_name ? fontinfo.full_name : " " ,
@@ -1138,8 +1138,8 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1138
1138
switch (tag) {
1139
1139
case 0 : {
1140
1140
char head_dict[] =
1141
- " {s:(h,h ), s:(h,h ), s:l, s:l, s:i , s:i ,"
1142
- " s:(l,l), s:(l,l), s:h, s:h, s:h, s:h, s:i , s:i , s:h, s:h, s:h}" ;
1141
+ " {s:(h,H ), s:(h,H ), s:l, s:l, s:H , s:H ,"
1142
+ " s:(l,l), s:(l,l), s:h, s:h, s:h, s:h, s:H , s:H , s:h, s:h, s:h}" ;
1143
1143
TT_Header *t = (TT_Header *)table;
1144
1144
return Py_BuildValue (head_dict,
1145
1145
" version" ,
@@ -1153,9 +1153,9 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1153
1153
" magicNumber" ,
1154
1154
t->Magic_Number ,
1155
1155
" flags" ,
1156
- ( unsigned ) t->Flags ,
1156
+ t->Flags ,
1157
1157
" unitsPerEm" ,
1158
- ( unsigned ) t->Units_Per_EM ,
1158
+ t->Units_Per_EM ,
1159
1159
" created" ,
1160
1160
t->Created [0 ],
1161
1161
t->Created [1 ],
@@ -1171,9 +1171,9 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1171
1171
" yMax" ,
1172
1172
t->yMax ,
1173
1173
" macStyle" ,
1174
- ( unsigned ) t->Mac_Style ,
1174
+ t->Mac_Style ,
1175
1175
" lowestRecPPEM" ,
1176
- ( unsigned ) t->Lowest_Rec_PPEM ,
1176
+ t->Lowest_Rec_PPEM ,
1177
1177
" fontDirectionHint" ,
1178
1178
t->Font_Direction ,
1179
1179
" indexToLocFormat" ,
@@ -1183,64 +1183,64 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1183
1183
}
1184
1184
case 1 : {
1185
1185
char maxp_dict[] =
1186
- " {s:(h,h ), s:i , s:i , s:i , s:i , s:i , s:i ,"
1187
- " s:i , s:i , s:i , s:i , s:i , s:i , s:i , s:i }" ;
1186
+ " {s:(h,H ), s:H , s:H , s:H , s:H , s:H , s:H ,"
1187
+ " s:H , s:H , s:H , s:H , s:H , s:H , s:H , s:H }" ;
1188
1188
TT_MaxProfile *t = (TT_MaxProfile *)table;
1189
1189
return Py_BuildValue (maxp_dict,
1190
1190
" version" ,
1191
1191
FIXED_MAJOR (t->version ),
1192
1192
FIXED_MINOR (t->version ),
1193
1193
" numGlyphs" ,
1194
- ( unsigned ) t->numGlyphs ,
1194
+ t->numGlyphs ,
1195
1195
" maxPoints" ,
1196
- ( unsigned ) t->maxPoints ,
1196
+ t->maxPoints ,
1197
1197
" maxContours" ,
1198
- ( unsigned ) t->maxContours ,
1198
+ t->maxContours ,
1199
1199
" maxComponentPoints" ,
1200
- ( unsigned ) t->maxCompositePoints ,
1200
+ t->maxCompositePoints ,
1201
1201
" maxComponentContours" ,
1202
- ( unsigned ) t->maxCompositeContours ,
1202
+ t->maxCompositeContours ,
1203
1203
" maxZones" ,
1204
- ( unsigned ) t->maxZones ,
1204
+ t->maxZones ,
1205
1205
" maxTwilightPoints" ,
1206
- ( unsigned ) t->maxTwilightPoints ,
1206
+ t->maxTwilightPoints ,
1207
1207
" maxStorage" ,
1208
- ( unsigned ) t->maxStorage ,
1208
+ t->maxStorage ,
1209
1209
" maxFunctionDefs" ,
1210
- ( unsigned ) t->maxFunctionDefs ,
1210
+ t->maxFunctionDefs ,
1211
1211
" maxInstructionDefs" ,
1212
- ( unsigned ) t->maxInstructionDefs ,
1212
+ t->maxInstructionDefs ,
1213
1213
" maxStackElements" ,
1214
- ( unsigned ) t->maxStackElements ,
1214
+ t->maxStackElements ,
1215
1215
" maxSizeOfInstructions" ,
1216
- ( unsigned ) t->maxSizeOfInstructions ,
1216
+ t->maxSizeOfInstructions ,
1217
1217
" maxComponentElements" ,
1218
- ( unsigned ) t->maxComponentElements ,
1218
+ t->maxComponentElements ,
1219
1219
" maxComponentDepth" ,
1220
- ( unsigned ) t->maxComponentDepth );
1220
+ t->maxComponentDepth );
1221
1221
}
1222
1222
case 2 : {
1223
1223
#if PY3K
1224
1224
char os_2_dict[] =
1225
- " {s:h , s:h, s:h , s:h , s:h , s:h, s:h, s:h,"
1226
- " s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:y#, s:(llll ),"
1227
- " s:y#, s:h , s:h , s:h }" ;
1225
+ " {s:H , s:h, s:H , s:H , s:H , s:h, s:h, s:h,"
1226
+ " s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:y#, s:(kkkk ),"
1227
+ " s:y#, s:H , s:H , s:H }" ;
1228
1228
#else
1229
1229
char os_2_dict[] =
1230
- " {s:h , s:h, s:h , s:h , s:h , s:h, s:h, s:h,"
1231
- " s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:s#, s:(llll ),"
1232
- " s:s#, s:h , s:h , s:h }" ;
1230
+ " {s:H , s:h, s:H , s:H , s:H , s:h, s:h, s:h,"
1231
+ " s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:h, s:s#, s:(kkkk ),"
1232
+ " s:s#, s:H , s:H , s:H }" ;
1233
1233
#endif
1234
1234
TT_OS2 *t = (TT_OS2 *)table;
1235
1235
return Py_BuildValue (os_2_dict,
1236
1236
" version" ,
1237
- ( unsigned ) t->version ,
1237
+ t->version ,
1238
1238
" xAvgCharWidth" ,
1239
1239
t->xAvgCharWidth ,
1240
1240
" usWeightClass" ,
1241
- ( unsigned ) t->usWeightClass ,
1241
+ t->usWeightClass ,
1242
1242
" usWidthClass" ,
1243
- ( unsigned ) t->usWidthClass ,
1243
+ t->usWidthClass ,
1244
1244
" fsType" ,
1245
1245
t->fsType ,
1246
1246
" ySubscriptXSize" ,
@@ -1269,24 +1269,24 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1269
1269
t->panose ,
1270
1270
10 ,
1271
1271
" ulCharRange" ,
1272
- ( unsigned long ) t->ulUnicodeRange1 ,
1273
- ( unsigned long ) t->ulUnicodeRange2 ,
1274
- ( unsigned long ) t->ulUnicodeRange3 ,
1275
- ( unsigned long ) t->ulUnicodeRange4 ,
1272
+ t->ulUnicodeRange1 ,
1273
+ t->ulUnicodeRange2 ,
1274
+ t->ulUnicodeRange3 ,
1275
+ t->ulUnicodeRange4 ,
1276
1276
" achVendID" ,
1277
1277
t->achVendID ,
1278
1278
4 ,
1279
1279
" fsSelection" ,
1280
- ( unsigned ) t->fsSelection ,
1280
+ t->fsSelection ,
1281
1281
" fsFirstCharIndex" ,
1282
- ( unsigned ) t->usFirstCharIndex ,
1282
+ t->usFirstCharIndex ,
1283
1283
" fsLastCharIndex" ,
1284
- ( unsigned ) t->usLastCharIndex );
1284
+ t->usLastCharIndex );
1285
1285
}
1286
1286
case 3 : {
1287
1287
char hhea_dict[] =
1288
- " {s:(h,h ), s:h, s:h, s:h, s:i , s:h, s:h, s:h,"
1289
- " s:h, s:h, s:h, s:h, s:i }" ;
1288
+ " {s:(h,H ), s:h, s:h, s:h, s:H , s:h, s:h, s:h,"
1289
+ " s:h, s:h, s:h, s:h, s:H }" ;
1290
1290
TT_HoriHeader *t = (TT_HoriHeader *)table;
1291
1291
return Py_BuildValue (hhea_dict,
1292
1292
" version" ,
@@ -1299,7 +1299,7 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1299
1299
" lineGap" ,
1300
1300
t->Line_Gap ,
1301
1301
" advanceWidthMax" ,
1302
- ( unsigned ) t->advance_Width_Max ,
1302
+ t->advance_Width_Max ,
1303
1303
" minLeftBearing" ,
1304
1304
t->min_Left_Side_Bearing ,
1305
1305
" minRightBearing" ,
@@ -1315,12 +1315,12 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1315
1315
" metricDataFormat" ,
1316
1316
t->metric_Data_Format ,
1317
1317
" numOfLongHorMetrics" ,
1318
- ( unsigned ) t->number_Of_HMetrics );
1318
+ t->number_Of_HMetrics );
1319
1319
}
1320
1320
case 4 : {
1321
1321
char vhea_dict[] =
1322
- " {s:(h,h ), s:h, s:h, s:h, s:i , s:h, s:h, s:h,"
1323
- " s:h, s:h, s:h, s:h, s:i }" ;
1322
+ " {s:(h,H ), s:h, s:h, s:h, s:H , s:h, s:h, s:h,"
1323
+ " s:h, s:h, s:h, s:h, s:H }" ;
1324
1324
TT_VertHeader *t = (TT_VertHeader *)table;
1325
1325
return Py_BuildValue (vhea_dict,
1326
1326
" version" ,
@@ -1333,7 +1333,7 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1333
1333
" vertTypoLineGap" ,
1334
1334
t->Line_Gap ,
1335
1335
" advanceHeightMax" ,
1336
- ( unsigned ) t->advance_Height_Max ,
1336
+ t->advance_Height_Max ,
1337
1337
" minTopSideBearing" ,
1338
1338
t->min_Top_Side_Bearing ,
1339
1339
" minBottomSizeBearing" ,
@@ -1349,10 +1349,10 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1349
1349
" metricDataFormat" ,
1350
1350
t->metric_Data_Format ,
1351
1351
" numOfLongVerMetrics" ,
1352
- ( unsigned ) t->number_Of_VMetrics );
1352
+ t->number_Of_VMetrics );
1353
1353
}
1354
1354
case 5 : {
1355
- char post_dict[] = " {s:(h,h ), s:(h,h ), s:h, s:h, s:k, s:k, s:k, s:k, s:k}" ;
1355
+ char post_dict[] = " {s:(h,H ), s:(h,H ), s:h, s:h, s:k, s:k, s:k, s:k, s:k}" ;
1356
1356
TT_Postscript *t = (TT_Postscript *)table;
1357
1357
return Py_BuildValue (post_dict,
1358
1358
" format" ,
@@ -1379,12 +1379,12 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1379
1379
case 6 : {
1380
1380
#if PY3K
1381
1381
char pclt_dict[] =
1382
- " {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, "
1383
- " s:b}" ;
1382
+ " {s:(h,H ), s:k, s:H, s:H, s:H, s:H, s:H, s:H, s:y# , s:y# , s:b, "
1383
+ " s:b, s:b }" ;
1384
1384
#else
1385
1385
char pclt_dict[] =
1386
- " {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, "
1387
- " s:b}" ;
1386
+ " {s:(h,H ), s:k, s:H, s:H, s:H, s:H, s:H, s:H, s:s# , s:s# , s:b, "
1387
+ " s:b, s:b }" ;
1388
1388
#endif
1389
1389
TT_PCLT *t = (TT_PCLT *)table;
1390
1390
return Py_BuildValue (pclt_dict,
@@ -1407,8 +1407,10 @@ static PyObject *PyFT2Font_get_sfnt_table(PyFT2Font *self, PyObject *args, PyObj
1407
1407
t->SymbolSet ,
1408
1408
" typeFace" ,
1409
1409
t->TypeFace ,
1410
+ 16 ,
1410
1411
" characterComplement" ,
1411
1412
t->CharacterComplement ,
1413
+ 8 ,
1412
1414
" strokeWeight" ,
1413
1415
t->StrokeWeight ,
1414
1416
" widthType" ,
@@ -1531,7 +1533,8 @@ static PyObject *PyFT2Font_get_bbox(PyFT2Font *self, void *closure)
1531
1533
{
1532
1534
FT_BBox *bbox = &(self->x ->get_face ()->bbox );
1533
1535
1534
- return Py_BuildValue (" iiii" , bbox->xMin , bbox->yMin , bbox->xMax , bbox->yMax );
1536
+ return Py_BuildValue (" llll" ,
1537
+ bbox->xMin , bbox->yMin , bbox->xMax , bbox->yMax );
1535
1538
}
1536
1539
1537
1540
static PyObject *PyFT2Font_ascender (PyFT2Font *self, void *closure)
0 commit comments