From 559bd070bf8b8644b4cfe0860fc2622b6908602a Mon Sep 17 00:00:00 2001
From: notmasteryet <async.processingjs@yahoo.com>
Date: Fri, 16 Sep 2011 19:53:52 -0500
Subject: [PATCH] Fixing lint long lines warnings

---
 fonts.js | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/fonts.js b/fonts.js
index 4f95d16f0..52fc2fb0a 100644
--- a/fonts.js
+++ b/fonts.js
@@ -12,7 +12,8 @@ var kMaxWaitForFontFace = 1000;
 // Unicode Private Use Area
 var kCmapGlyphOffset = 0xE000;
 
-// PDF Glyph Space Units are one Thousandth of a TextSpace Unit except for Type 3 fonts
+// PDF Glyph Space Units are one Thousandth of a TextSpace Unit
+// except for Type 3 fonts
 var kPDFGlyphSpaceUnits = 1000;
 
 // Until hinting is fully supported this constant can be used
@@ -709,9 +710,12 @@ var Font = (function Font() {
     var winAscent = override.yMax || typoAscent;
     var winDescent = -override.yMin || -typoDescent;
 
-    // if there is a units per em value but no other override then scale the calculated ascent
-    if (unitsPerEm != kPDFGlyphSpaceUnits && 'undefined' == typeof(override.ascent)) {
-      // if the font units differ to the PDF glyph space units then scale up the values
+    // if there is a units per em value but no other override
+    // then scale the calculated ascent
+    if (unitsPerEm != kPDFGlyphSpaceUnits &&
+        'undefined' == typeof(override.ascent)) {
+      // if the font units differ to the PDF glyph space units
+      // then scale up the values
       typoAscent = Math.round(typoAscent * unitsPerEm / kPDFGlyphSpaceUnits);
       typoDescent = Math.round(typoDescent * unitsPerEm / kPDFGlyphSpaceUnits);
       winAscent = typoAscent;
@@ -1076,14 +1080,15 @@ var Font = (function Font() {
       createOpenTypeHeader(header.version, ttf, numTables);
 
       if (requiredTables.indexOf('OS/2') != -1) {
-        //extract some more font properties from the OpenType head and hhea tables
+        // extract some more font properties from the OpenType head and
+        // hhea tables; yMin and descent value are always negative
         var override = {
           unitsPerEm: int16([head.data[18], head.data[19]]),
           yMax: int16([head.data[42], head.data[43]]),
-          yMin: int16([head.data[38], head.data[39]]) - 0x10000, //always negative
+          yMin: int16([head.data[38], head.data[39]]) - 0x10000,
           ascent: int16([hhea.data[4], hhea.data[5]]),
-          descent: int16([hhea.data[6], hhea.data[7]]) - 0x10000 //always negative
-        }
+          descent: int16([hhea.data[6], hhea.data[7]]) - 0x10000
+        };
 
         tables.push({
           tag: 'OS/2',
@@ -1329,7 +1334,8 @@ var Font = (function Font() {
       var rule = "@font-face { font-family:'" + fontName + "';src:" + url + '}';
       var styleSheet = document.styleSheets[0];
       if (!styleSheet) {
-        document.documentElement.firstChild.appendChild( document.createElement('style') );
+        document.documentElement.firstChild.appendChild(
+          document.createElement('style'));
         styleSheet = document.styleSheets[0];
       }
       styleSheet.insertRule(rule, styleSheet.cssRules.length);