1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Account for formatting changes in Prettier version 2.3.0

With the exception of one tweaked `eslint-disable` comment, in `web/generic_scripting.js`, this patch was generated automatically using `gulp lint --fix`.

Please find additional information at:
 - https://github.com/prettier/prettier/releases/tag/2.3.0
 - https://prettier.io/blog/2021/05/09/2.3.0.html
This commit is contained in:
Jonas Jenwald 2021-05-16 10:58:34 +02:00
parent 30908451b4
commit 8943bcd3c3
28 changed files with 127 additions and 192 deletions

View file

@ -999,12 +999,14 @@ class Font {
map[+charCode] = GlyphMapForStandardFonts[charCode];
}
if (/Arial-?Black/i.test(name)) {
const SupplementalGlyphMapForArialBlack = getSupplementalGlyphMapForArialBlack();
const SupplementalGlyphMapForArialBlack =
getSupplementalGlyphMapForArialBlack();
for (const charCode in SupplementalGlyphMapForArialBlack) {
map[+charCode] = SupplementalGlyphMapForArialBlack[charCode];
}
} else if (/Calibri/i.test(name)) {
const SupplementalGlyphMapForCalibri = getSupplementalGlyphMapForCalibri();
const SupplementalGlyphMapForCalibri =
getSupplementalGlyphMapForCalibri();
for (const charCode in SupplementalGlyphMapForCalibri) {
map[+charCode] = SupplementalGlyphMapForCalibri[charCode];
}
@ -1801,22 +1803,7 @@ class Font {
// glyf table cannot be empty -- redoing the glyf and loca tables
// to have single glyph with one point
const simpleGlyph = new Uint8Array([
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
49,
0,
0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0,
]);
for (i = 0, j = itemSize; i < numGlyphsOut; i++, j += itemSize) {
itemEncode(locaData, j, simpleGlyph.length);
@ -2707,9 +2694,8 @@ class Font {
return charCode | 0;
}
}
newMapping.charCodeToGlyphId[
newMapping.nextAvailableFontCharCode
] = glyphId;
newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] =
glyphId;
return newMapping.nextAvailableFontCharCode++;
}