Merge pull request #1106 from arturadib/issue-1049

fontMatrix parsing fix, setFont() supports negative sizes
This commit is contained in:
Brendan Dahl 2012-02-03 11:10:58 -08:00
commit b3fb41caa9
8 changed files with 90 additions and 24 deletions

View file

@ -159,6 +159,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
// a Stream in the main thread.
if (translated.file)
translated.file = translated.file.getBytes();
if (translated.properties.file) {
translated.properties.file =
translated.properties.file.getBytes();
}
handler.send('obj', [
loadedName,
@ -783,11 +787,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
properties: properties
};
}
}
// According to the spec if 'FontDescriptor' is declared, 'FirstChar',
// 'LastChar' and 'Widths' should exists too, but some PDF encoders seems
// 'LastChar' and 'Widths' should exist too, but some PDF encoders seem
// to ignore this rule when a variant of a standart font is used.
// TODO Fill the width array depending on which of the base font this is
// a variant.