]> git.parisson.com Git - pdf.js.git/commitdiff
fix merge conflicts
author= <=>
Tue, 4 Oct 2011 00:18:47 +0000 (17:18 -0700)
committer= <=>
Tue, 4 Oct 2011 00:18:47 +0000 (17:18 -0700)
1  2 
fonts.js
pdf.js
test/test_manifest.json

diff --cc fonts.js
Simple merge
diff --cc pdf.js
index 18368aa0bd17a40df829261fa0bdc9d2c4ffc027,2eba4e652a324c722f84ee8d4c2c275cd1306e10..da6dbc0166bfeac8fbf9488aad5d7d2af83cb1a7
--- 1/pdf.js
--- 2/pdf.js
+++ b/pdf.js
@@@ -4685,43 -4746,36 +4747,43 @@@ var PartialEvaluator = (function partia
          composite = true;
        }
  
 -      // Before PDF 1.5 if the font was one of the base 14 fonts, having a
 -      // FontDescriptor was not required.
 -      // This case is here for compatibility.
        var descriptor = xref.fetchIfRef(dict.get('FontDescriptor'));
        if (!descriptor) {
 -        // Note for Type3 fonts: it has no no base font, feeding default
 -        // font name and trying to get font metrics as the same way as for
 -        // a font without descriptor.
 -        var baseFontName = dict.get('BaseFont') || new Name('sans-serif');
 -
 -        // Using base font name as a font name.
 -        baseFontName = baseFontName.name.replace(/,/g, '_');
 -        var metricsAndMap = this.getBaseFontMetricsAndMap(baseFontName);
 -
 -        var properties = {
 -          type: type.name,
 -          encoding: metricsAndMap.map,
 -          differences: [],
 -          widths: metricsAndMap.widths,
 -          defaultWidth: metricsAndMap.defaultWidth,
 -          firstChar: 0,
 -          lastChar: 256
 -        };
 -        this.extractEncoding(dict, xref, properties);
 +        if (type.name == 'Type3') {
 +          // FontDescriptor is only required for Type3 fonts when the document
 +          // is a tagged pdf. Create a barbebones one to get by.
 +          descriptor = new Dict();
 +          descriptor.set('FontName', new Name(type.name));
 +        } else {
 +          // Before PDF 1.5 if the font was one of the base 14 fonts, having a
 +          // FontDescriptor was not required.
 +          // This case is here for compatibility.
 +          var baseFontName = dict.get('BaseFont');
-           if (!IsName(baseFontName))
++          if (!isName(baseFontName))
 +            return null;
 +
 +          // Using base font name as a font name.
 +          baseFontName = baseFontName.name.replace(/,/g, '_');
 +          var metricsAndMap = this.getBaseFontMetricsAndMap(baseFontName);
 +
 +          var properties = {
 +            type: type.name,
 +            encoding: metricsAndMap.map,
 +            differences: [],
 +            widths: metricsAndMap.widths,
 +            defaultWidth: metricsAndMap.defaultWidth,
 +            firstChar: 0,
 +            lastChar: 256
 +          };
 +          this.extractEncoding(dict, xref, properties);
 +
 +          return {
 +            name: baseFontName,
 +            dict: baseDict,
 +            properties: properties
 +          };
 +        }
  
 -        return {
 -          name: baseFontName,
 -          dict: baseDict,
 -          properties: properties
 -        };
        }
  
        // According to the spec if 'FontDescriptor' is declared, 'FirstChar',
Simple merge