Browse Source

Merge branch 'master' of https://github.com/andreasgal/pdf.js.git into tree-28

notmasteryet 14 years ago
parent
commit
81af550f83
  1. 9
      pdf.js

9
pdf.js

@ -4563,6 +4563,8 @@ var PartialEvaluator = (function partialEvaluator() {
break; break;
default: default:
warn('Unknown type of font: ' + type); warn('Unknown type of font: ' + type);
baseEncoding = [];
break;
} }
} }
@ -4749,9 +4751,10 @@ var PartialEvaluator = (function partialEvaluator() {
// This case is here for compatibility. // This case is here for compatibility.
var descriptor = xref.fetchIfRef(dict.get('FontDescriptor')); var descriptor = xref.fetchIfRef(dict.get('FontDescriptor'));
if (!descriptor) { if (!descriptor) {
var baseFontName = dict.get('BaseFont'); // Note for Type3 fonts: it has no no base font, feeding default
if (!isName(baseFontName)) // font name and trying to get font metrics as the same way as for
return null; // a font without descriptor.
var baseFontName = dict.get('BaseFont') || new Name('sans-serif');
// Using base font name as a font name. // Using base font name as a font name.
baseFontName = baseFontName.name.replace(/,/g, '_'); baseFontName = baseFontName.name.replace(/,/g, '_');

Loading…
Cancel
Save