mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-29 15:47:57 +02:00
[api-minor] Remove the PDFDocumentProxy.stats
getter (PR 15758 follow-up)
This was deprecated in PR 15758 and given that it's quite unlikely that any third-party users are relying on this functionality, since it was only ever added to support telemetry reporting in the Firefox PDF Viewer, it should hopefully be fine to remove this fairly quickly. These changes reduce the bundle size of the Firefox PDF Viewer by 4.5 kB in total.
This commit is contained in:
parent
1e3e2defe4
commit
0c1fb4e740
10 changed files with 4 additions and 217 deletions
|
@ -17,7 +17,6 @@ import {
|
|||
assert,
|
||||
bytesToString,
|
||||
FONT_IDENTITY_MATRIX,
|
||||
FontType,
|
||||
FormatError,
|
||||
info,
|
||||
shadow,
|
||||
|
@ -27,7 +26,6 @@ import {
|
|||
import { CFFCompiler, CFFParser } from "./cff_parser.js";
|
||||
import {
|
||||
FontFlags,
|
||||
getFontType,
|
||||
MacStandardGlyphOrdering,
|
||||
normalizeFontName,
|
||||
recoverGlyphName,
|
||||
|
@ -92,7 +90,6 @@ const EXPORT_DATA_PROPERTIES = [
|
|||
"descent",
|
||||
"fallbackName",
|
||||
"fontMatrix",
|
||||
"fontType",
|
||||
"isInvalidPDFjsFont",
|
||||
"isType3Font",
|
||||
"italic",
|
||||
|
@ -986,7 +983,6 @@ class Font {
|
|||
this.toFontChar[charCode] =
|
||||
this.differences[charCode] || properties.defaultEncoding[charCode];
|
||||
}
|
||||
this.fontType = FontType.TYPE3;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1066,7 +1062,6 @@ class Font {
|
|||
|
||||
amendFallbackToUnicode(properties);
|
||||
this.data = data;
|
||||
this.fontType = getFontType(type, subtype, properties.isStandardFont);
|
||||
|
||||
// Transfer some properties again that could change during font conversion
|
||||
this.fontMatrix = properties.fontMatrix;
|
||||
|
@ -1102,9 +1097,7 @@ class Font {
|
|||
this.missingFile = true;
|
||||
// The file data is not specified. Trying to fix the font name
|
||||
// to be used with the canvas.font.
|
||||
const name = this.name;
|
||||
const type = this.type;
|
||||
const subtype = this.subtype;
|
||||
const { name, type } = this;
|
||||
let fontName = normalizeFontName(name);
|
||||
const stdFontMap = getStdFontMap(),
|
||||
nonStdFontMap = getNonStdFontMap();
|
||||
|
@ -1252,7 +1245,6 @@ class Font {
|
|||
|
||||
amendFallbackToUnicode(properties);
|
||||
this.loadedName = fontName.split("-")[0];
|
||||
this.fontType = getFontType(type, subtype, properties.isStandardFont);
|
||||
}
|
||||
|
||||
checkAndRepair(name, font, properties) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue