Merge pull request #870 from notmasteryet/issue-867
(#867) Set Type3 font encoding; enable text selection testing
This commit is contained in:
		
						commit
						bf755f459e
					
				@ -763,8 +763,10 @@ var Font = (function Font() {
 | 
			
		||||
 | 
			
		||||
    this.fontMatrix = properties.fontMatrix;
 | 
			
		||||
    this.widthMultiplier = 1.0;
 | 
			
		||||
    if (properties.type == 'Type3')
 | 
			
		||||
    if (properties.type == 'Type3') {
 | 
			
		||||
      this.encoding = properties.baseEncoding;
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // Trying to fix encoding using glyph CIDSystemInfo.
 | 
			
		||||
    this.loadCidToUnicode(properties);
 | 
			
		||||
@ -2150,7 +2152,7 @@ var Font = (function Font() {
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    charsToGlyphs: function fonts_chars2Glyphs(chars) {
 | 
			
		||||
    charsToGlyphs: function fonts_charsToGlyphs(chars) {
 | 
			
		||||
      var charsCache = this.charsCache;
 | 
			
		||||
      var glyphs;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -160,6 +160,10 @@ function nextPage(task, loadError) {
 | 
			
		||||
      canvas.height = pageHeight * pdfToCssUnitsCoef;
 | 
			
		||||
      clear(ctx);
 | 
			
		||||
 | 
			
		||||
      // using non-attached to the document div to test
 | 
			
		||||
      // text layer creation operations
 | 
			
		||||
      var textLayer = document.createElement('div');
 | 
			
		||||
 | 
			
		||||
      page.startRendering(
 | 
			
		||||
        ctx,
 | 
			
		||||
        function nextPageStartRendering(error) {
 | 
			
		||||
@ -167,7 +171,8 @@ function nextPage(task, loadError) {
 | 
			
		||||
          if (error)
 | 
			
		||||
            failureMessage = 'render : ' + error.message;
 | 
			
		||||
          snapshotCurrentPage(task, failureMessage);
 | 
			
		||||
        }
 | 
			
		||||
        },
 | 
			
		||||
        textLayer
 | 
			
		||||
      );
 | 
			
		||||
    } catch (e) {
 | 
			
		||||
      failure = 'page setup : ' + e.toString();
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user