|
@@ 1317-1321 (lines=5) @@
|
| 1314 |
|
$table[$tag]['data'] = substr($table[$tag]['data'], 0, 8)."\x0\x0\x0\x0".substr($table[$tag]['data'], 12); |
| 1315 |
|
} |
| 1316 |
|
$pad = 4 - ($table[$tag]['length'] % 4); |
| 1317 |
|
if ($pad != 4) { |
| 1318 |
|
// the length of a table must be a multiple of four bytes |
| 1319 |
|
$table[$tag]['length'] += $pad; |
| 1320 |
|
$table[$tag]['data'] .= str_repeat("\x0", $pad); |
| 1321 |
|
} |
| 1322 |
|
$table[$tag]['offset'] = $offset; |
| 1323 |
|
$offset += $table[$tag]['length']; |
| 1324 |
|
// check sum is not changed (so keep the following line commented) |
|
@@ 1334-1338 (lines=5) @@
|
| 1331 |
|
$table['loca']['data'] = $loca; |
| 1332 |
|
$table['loca']['length'] = strlen($loca); |
| 1333 |
|
$pad = 4 - ($table['loca']['length'] % 4); |
| 1334 |
|
if ($pad != 4) { |
| 1335 |
|
// the length of a table must be a multiple of four bytes |
| 1336 |
|
$table['loca']['length'] += $pad; |
| 1337 |
|
$table['loca']['data'] .= str_repeat("\x0", $pad); |
| 1338 |
|
} |
| 1339 |
|
$table['loca']['offset'] = $offset; |
| 1340 |
|
$table['loca']['checkSum'] = self::_getTTFtableChecksum($table['loca']['data'], $table['loca']['length']); |
| 1341 |
|
$offset += $table['loca']['length']; |
|
@@ 1346-1350 (lines=5) @@
|
| 1343 |
|
$table['glyf']['data'] = $glyf; |
| 1344 |
|
$table['glyf']['length'] = strlen($glyf); |
| 1345 |
|
$pad = 4 - ($table['glyf']['length'] % 4); |
| 1346 |
|
if ($pad != 4) { |
| 1347 |
|
// the length of a table must be a multiple of four bytes |
| 1348 |
|
$table['glyf']['length'] += $pad; |
| 1349 |
|
$table['glyf']['data'] .= str_repeat("\x0", $pad); |
| 1350 |
|
} |
| 1351 |
|
$table['glyf']['offset'] = $offset; |
| 1352 |
|
$table['glyf']['checkSum'] = self::_getTTFtableChecksum($table['glyf']['data'], $table['glyf']['length']); |
| 1353 |
|
// rebuild font |