Merge pull request #4578 from Snuffleupagus/bug-847420
Workaround for cases where FontName in the FontDescriptor differs from BaseFont in the Font (bug 847420)
This commit is contained in:
		
						commit
						d1f9a4e965
					
				@ -1219,6 +1219,12 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
 | 
				
			|||||||
          info('The FontDescriptor\'s FontName is "' + fontNameStr +
 | 
					          info('The FontDescriptor\'s FontName is "' + fontNameStr +
 | 
				
			||||||
               '" but should be the same as the Font\'s BaseFont "' +
 | 
					               '" but should be the same as the Font\'s BaseFont "' +
 | 
				
			||||||
               baseFontStr + '"');
 | 
					               baseFontStr + '"');
 | 
				
			||||||
 | 
					          // Workaround for cases where e.g. fontNameStr = 'Arial' and
 | 
				
			||||||
 | 
					          // baseFontStr = 'Arial,Bold' (needed when no font file is embedded).
 | 
				
			||||||
 | 
					          if (fontNameStr && baseFontStr &&
 | 
				
			||||||
 | 
					              baseFontStr.search(fontNameStr) === 0) {
 | 
				
			||||||
 | 
					            fontName = baseFont;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      fontName = (fontName || baseFont);
 | 
					      fontName = (fontName || baseFont);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user