mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Support lsb div format
This commit is contained in:
parent
1edf8dcc4e
commit
f48ab3cfd1
1 changed files with 5 additions and 1 deletions
6
fonts.js
6
fonts.js
|
@ -1485,14 +1485,18 @@ var Type1Parser = function() {
|
|||
// TODO Clean this code
|
||||
if (value == 13) {
|
||||
if (charstring.length == 2) {
|
||||
lsb = charstring[0];
|
||||
width = charstring[1];
|
||||
} else if (charstring.length == 4 && charstring[3] == 'div') {
|
||||
lsb = charstring[0];
|
||||
width = charstring[1] / charstring[2];
|
||||
} else if (charstring.length == 4 && charstring[2] == 'div') {
|
||||
lsb = charstring[0] / charstring[1];
|
||||
width = charstring[3];
|
||||
} else {
|
||||
error('Unsupported hsbw format: ' + charstring);
|
||||
}
|
||||
|
||||
lsb = charstring[0];
|
||||
charstring.push(lsb, 'hmoveto');
|
||||
charstring.splice(0, 1);
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue