Merge pull request #905 from notmasteryet/issue-886b
Fixing missing text (#886)
This commit is contained in:
		
						commit
						9ea8668dcb
					
				
							
								
								
									
										19
									
								
								src/fonts.js
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								src/fonts.js
									
									
									
									
									
								
							@ -884,6 +884,13 @@ var Font = (function Font() {
 | 
				
			|||||||
           String.fromCharCode(value & 0xff);
 | 
					           String.fromCharCode(value & 0xff);
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  function safeString16(value) {
 | 
				
			||||||
 | 
					    // clamp value to the 16-bit int range
 | 
				
			||||||
 | 
					    value = value > 0x7FFF ? 0x7FFF : value < -0x8000 ? -0x8000 : value;
 | 
				
			||||||
 | 
					    return String.fromCharCode((value >> 8) & 0xff) +
 | 
				
			||||||
 | 
					           String.fromCharCode(value & 0xff);
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  function string32(value) {
 | 
					  function string32(value) {
 | 
				
			||||||
    return String.fromCharCode((value >> 24) & 0xff) +
 | 
					    return String.fromCharCode((value >> 24) & 0xff) +
 | 
				
			||||||
           String.fromCharCode((value >> 16) & 0xff) +
 | 
					           String.fromCharCode((value >> 16) & 0xff) +
 | 
				
			||||||
@ -1903,9 +1910,9 @@ var Font = (function Font() {
 | 
				
			|||||||
              '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // creation date
 | 
					              '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // creation date
 | 
				
			||||||
              '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // modifification date
 | 
					              '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + // modifification date
 | 
				
			||||||
              '\x00\x00' + // xMin
 | 
					              '\x00\x00' + // xMin
 | 
				
			||||||
              string16(properties.descent) + // yMin
 | 
					              safeString16(properties.descent) + // yMin
 | 
				
			||||||
              '\x0F\xFF' + // xMax
 | 
					              '\x0F\xFF' + // xMax
 | 
				
			||||||
              string16(properties.ascent) + // yMax
 | 
					              safeString16(properties.ascent) + // yMax
 | 
				
			||||||
              string16(properties.italicAngle ? 2 : 0) + // macStyle
 | 
					              string16(properties.italicAngle ? 2 : 0) + // macStyle
 | 
				
			||||||
              '\x00\x11' + // lowestRecPPEM
 | 
					              '\x00\x11' + // lowestRecPPEM
 | 
				
			||||||
              '\x00\x00' + // fontDirectionHint
 | 
					              '\x00\x00' + // fontDirectionHint
 | 
				
			||||||
@ -1917,15 +1924,15 @@ var Font = (function Font() {
 | 
				
			|||||||
        'hhea': (function fontFieldsHhea() {
 | 
					        'hhea': (function fontFieldsHhea() {
 | 
				
			||||||
          return stringToArray(
 | 
					          return stringToArray(
 | 
				
			||||||
              '\x00\x01\x00\x00' + // Version number
 | 
					              '\x00\x01\x00\x00' + // Version number
 | 
				
			||||||
              string16(properties.ascent) + // Typographic Ascent
 | 
					              safeString16(properties.ascent) + // Typographic Ascent
 | 
				
			||||||
              string16(properties.descent) + // Typographic Descent
 | 
					              safeString16(properties.descent) + // Typographic Descent
 | 
				
			||||||
              '\x00\x00' + // Line Gap
 | 
					              '\x00\x00' + // Line Gap
 | 
				
			||||||
              '\xFF\xFF' + // advanceWidthMax
 | 
					              '\xFF\xFF' + // advanceWidthMax
 | 
				
			||||||
              '\x00\x00' + // minLeftSidebearing
 | 
					              '\x00\x00' + // minLeftSidebearing
 | 
				
			||||||
              '\x00\x00' + // minRightSidebearing
 | 
					              '\x00\x00' + // minRightSidebearing
 | 
				
			||||||
              '\x00\x00' + // xMaxExtent
 | 
					              '\x00\x00' + // xMaxExtent
 | 
				
			||||||
              string16(properties.capHeight) + // caretSlopeRise
 | 
					              safeString16(properties.capHeight) + // caretSlopeRise
 | 
				
			||||||
              string16(Math.tan(properties.italicAngle) *
 | 
					              safeString16(Math.tan(properties.italicAngle) *
 | 
				
			||||||
                       properties.xHeight) + // caretSlopeRun
 | 
					                       properties.xHeight) + // caretSlopeRun
 | 
				
			||||||
              '\x00\x00' + // caretOffset
 | 
					              '\x00\x00' + // caretOffset
 | 
				
			||||||
              '\x00\x00' + // -reserved-
 | 
					              '\x00\x00' + // -reserved-
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										1
									
								
								test/pdfs/geothermal.pdf.link
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								test/pdfs/geothermal.pdf.link
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1 @@
 | 
				
			|||||||
 | 
					http://geothermal.inel.gov/publications/future_of_geothermal_energy.pdf
 | 
				
			||||||
@ -302,5 +302,14 @@
 | 
				
			|||||||
       "link": true,
 | 
					       "link": true,
 | 
				
			||||||
       "rounds": 1,
 | 
					       "rounds": 1,
 | 
				
			||||||
       "type": "eq"
 | 
					       "type": "eq"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    {  "id": "geothermal.pdf",
 | 
				
			||||||
 | 
					       "file": "pdfs/geothermal.pdf",
 | 
				
			||||||
 | 
					       "md5": "ecffc0ce38ffdf1e90dc952f186e9a91",
 | 
				
			||||||
 | 
					       "rounds": 1,
 | 
				
			||||||
 | 
					       "link": true,
 | 
				
			||||||
 | 
					       "pageLimit": 5,
 | 
				
			||||||
 | 
					       "skipPages": [1],
 | 
				
			||||||
 | 
					       "type": "eq"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user