mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Provides right fallback fonts for text layer
This commit is contained in:
parent
53c66f8a54
commit
ac7b6aeff4
4 changed files with 9 additions and 14 deletions
10
src/fonts.js
10
src/fonts.js
|
@ -1522,17 +1522,13 @@ var Font = (function FontClosure() {
|
|||
names = names.split(/[-,_]/g)[0];
|
||||
this.isSerifFont = !!(properties.flags & FontFlags.Serif);
|
||||
this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic);
|
||||
this.isMonospace = !!(properties.flags & FontFlags.FixedPitch);
|
||||
|
||||
var type = properties.type;
|
||||
this.type = type;
|
||||
|
||||
// If the font is to be ignored, register it like an already loaded font
|
||||
// to avoid the cost of waiting for it be be loaded by the platform.
|
||||
if (properties.ignore) {
|
||||
this.loadedName = this.isSerifFont ? 'serif' : 'sans-serif';
|
||||
this.loading = false;
|
||||
return;
|
||||
}
|
||||
this.fallbackName = this.isMonospace ? 'monospace' :
|
||||
this.isSerifFont ? 'serif' : 'sans-serif';
|
||||
|
||||
this.differences = properties.differences;
|
||||
this.widths = properties.widths;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue