Rename FontFace to FontFaceObject
This name clashes with the FontFace constructor from the Font Loading CSS module: http://dev.w3.org/csswg/css-font-loading/#font-face-constructor
This commit is contained in:
parent
a10fde165c
commit
6a230af332
@ -17,8 +17,9 @@
|
|||||||
/* globals PDFJS, isArrayBuffer, error, combineUrl, createPromiseCapability,
|
/* globals PDFJS, isArrayBuffer, error, combineUrl, createPromiseCapability,
|
||||||
StatTimer, globalScope, MessageHandler, info, FontLoader, Util, warn,
|
StatTimer, globalScope, MessageHandler, info, FontLoader, Util, warn,
|
||||||
Promise, PasswordResponses, PasswordException, InvalidPDFException,
|
Promise, PasswordResponses, PasswordException, InvalidPDFException,
|
||||||
MissingPDFException, UnknownErrorException, FontFace, loadJpegStream,
|
MissingPDFException, UnknownErrorException, FontFaceObject,
|
||||||
createScratchCanvas, CanvasGraphics, UnexpectedResponseException */
|
loadJpegStream, createScratchCanvas, CanvasGraphics,
|
||||||
|
UnexpectedResponseException */
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@ -962,7 +963,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
|
|||||||
this.commonObjs.resolve(id, error);
|
this.commonObjs.resolve(id, error);
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
font = new FontFace(exportedData);
|
font = new FontFaceObject(exportedData);
|
||||||
}
|
}
|
||||||
|
|
||||||
FontLoader.bind(
|
FontLoader.bind(
|
||||||
|
@ -271,8 +271,8 @@ var FontLoader = {
|
|||||||
//#endif
|
//#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
var FontFace = (function FontFaceClosure() {
|
var FontFaceObject = (function FontFaceObjectClosure() {
|
||||||
function FontFace(name, file, properties) {
|
function FontFaceObject(name, file, properties) {
|
||||||
this.compiledGlyphs = {};
|
this.compiledGlyphs = {};
|
||||||
if (arguments.length === 1) {
|
if (arguments.length === 1) {
|
||||||
// importing translated data
|
// importing translated data
|
||||||
@ -283,8 +283,8 @@ var FontFace = (function FontFaceClosure() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
FontFace.prototype = {
|
FontFaceObject.prototype = {
|
||||||
bindDOM: function FontFace_bindDOM() {
|
bindDOM: function FontFaceObject_bindDOM() {
|
||||||
if (!this.data) {
|
if (!this.data) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -311,7 +311,7 @@ var FontFace = (function FontFaceClosure() {
|
|||||||
return rule;
|
return rule;
|
||||||
},
|
},
|
||||||
|
|
||||||
getPathGenerator: function (objs, character) {
|
getPathGenerator: function FontLoader_getPathGenerator(objs, character) {
|
||||||
if (!(character in this.compiledGlyphs)) {
|
if (!(character in this.compiledGlyphs)) {
|
||||||
var js = objs.get(this.loadedName + '_path_' + character);
|
var js = objs.get(this.loadedName + '_path_' + character);
|
||||||
/*jshint -W054 */
|
/*jshint -W054 */
|
||||||
@ -320,5 +320,5 @@ var FontFace = (function FontFaceClosure() {
|
|||||||
return this.compiledGlyphs[character];
|
return this.compiledGlyphs[character];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return FontFace;
|
return FontFaceObject;
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user