mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 10:08:06 +02:00
Merge pull request #9230 from Snuffleupagus/issue-9195
Add basic support for non-embedded Calibri fonts (issue 9195)
This commit is contained in:
commit
af1d80d45e
4 changed files with 44 additions and 1 deletions
|
@ -28,7 +28,7 @@ import {
|
|||
} from './encodings';
|
||||
import {
|
||||
getGlyphMapForStandardFonts, getNonStdFontMap, getStdFontMap,
|
||||
getSupplementalGlyphMapForArialBlack
|
||||
getSupplementalGlyphMapForArialBlack, getSupplementalGlyphMapForCalibri
|
||||
} from './standard_fonts';
|
||||
import {
|
||||
getUnicodeForGlyph, getUnicodeRangeFor, mapSpecialUnicodeValues
|
||||
|
@ -1244,7 +1244,14 @@ var Font = (function FontClosure() {
|
|||
for (charCode in SupplementalGlyphMapForArialBlack) {
|
||||
map[+charCode] = SupplementalGlyphMapForArialBlack[charCode];
|
||||
}
|
||||
} else if (/Calibri/i.test(name)) {
|
||||
let SupplementalGlyphMapForCalibri =
|
||||
getSupplementalGlyphMapForCalibri();
|
||||
for (charCode in SupplementalGlyphMapForCalibri) {
|
||||
map[+charCode] = SupplementalGlyphMapForCalibri[charCode];
|
||||
}
|
||||
}
|
||||
|
||||
var isIdentityUnicode = this.toUnicode instanceof IdentityToUnicodeMap;
|
||||
if (!isIdentityUnicode) {
|
||||
this.toUnicode.forEach(function(charCode, unicodeCharCode) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue