[Pkg-javascript-commits] [pdf.js] 148/204: Rename FontFace to FontFaceObject

David Prévot taffit at moszumanska.debian.org
Sat Oct 25 18:50:44 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 6a230af332f8125b88715feadffc640dac06e946
Author: Rob Wu <rob at robwu.nl>
Date:   Tue Sep 30 19:33:16 2014 +0200

    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
---
 src/display/api.js         |  7 ++++---
 src/display/font_loader.js | 12 ++++++------
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/display/api.js b/src/display/api.js
index 23ff642..e400e1d 100644
--- a/src/display/api.js
+++ b/src/display/api.js
@@ -17,8 +17,9 @@
 /* globals PDFJS, isArrayBuffer, error, combineUrl, createPromiseCapability,
            StatTimer, globalScope, MessageHandler, info, FontLoader, Util, warn,
            Promise, PasswordResponses, PasswordException, InvalidPDFException,
-           MissingPDFException, UnknownErrorException, FontFace, loadJpegStream,
-           createScratchCanvas, CanvasGraphics, UnexpectedResponseException */
+           MissingPDFException, UnknownErrorException, FontFaceObject,
+           loadJpegStream, createScratchCanvas, CanvasGraphics,
+           UnexpectedResponseException */
 
 'use strict';
 
@@ -962,7 +963,7 @@ var WorkerTransport = (function WorkerTransportClosure() {
               this.commonObjs.resolve(id, error);
               break;
             } else {
-              font = new FontFace(exportedData);
+              font = new FontFaceObject(exportedData);
             }
 
             FontLoader.bind(
diff --git a/src/display/font_loader.js b/src/display/font_loader.js
index 105ed83..a7deaaf 100644
--- a/src/display/font_loader.js
+++ b/src/display/font_loader.js
@@ -271,8 +271,8 @@ var FontLoader = {
 //#endif
 };
 
-var FontFace = (function FontFaceClosure() {
-  function FontFace(name, file, properties) {
+var FontFaceObject = (function FontFaceObjectClosure() {
+  function FontFaceObject(name, file, properties) {
     this.compiledGlyphs = {};
     if (arguments.length === 1) {
       // importing translated data
@@ -283,8 +283,8 @@ var FontFace = (function FontFaceClosure() {
       return;
     }
   }
-  FontFace.prototype = {
-    bindDOM: function FontFace_bindDOM() {
+  FontFaceObject.prototype = {
+    bindDOM: function FontFaceObject_bindDOM() {
       if (!this.data) {
         return null;
       }
@@ -311,7 +311,7 @@ var FontFace = (function FontFaceClosure() {
       return rule;
     },
 
-    getPathGenerator: function (objs, character) {
+    getPathGenerator: function FontLoader_getPathGenerator(objs, character) {
       if (!(character in this.compiledGlyphs)) {
         var js = objs.get(this.loadedName + '_path_' + character);
         /*jshint -W054 */
@@ -320,5 +320,5 @@ var FontFace = (function FontFaceClosure() {
       return this.compiledGlyphs[character];
     }
   };
-  return FontFace;
+  return FontFaceObject;
 })();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list