     if changedBox
       @gutter.style.height = "#{Math.max @mainScroller.offsetHeight, treeView.totalBounds.height}px"
 
+  getFontHeight = (family, size) ->
+    testElement = document.createElement 'span'
+    testElement.innerHTML = 'Hg'
+    testElement.style.fontSize = size; testElement.style.fontFamily = family
+
+    testPartner = document.createElement 'div'
+    testPartner.style.display = 'inline-block'
+    testPartner.style.width = '1px'; testPartner.style.height = '0px'
+
+    testWrapper = document.createElement 'div'
+    testWrapper.style.left = testWrapper.style.top = '-9999px'
+
+    testWrapper.appendChild testElement; testWrapper.appendChild testPartner
+
+    document.body.appendChild testWrapper
+
+    testPartner.style.verticalAlign = 'bottom'
+    descent = testPartner.offsetTop - testElement.offsetTop
+
+    return testPartner.offsetTop - testElement.offsetTop
+
+
   # DEBUG CODE
   # ================================
   Editor::dumpNodeForDebug = (hitTestResult, line) ->

    draw._setGlobalFontFamily fontFamily

    @fontFamily = fontFamily

    @view.clearCache(); @dragView.clearCache()
    @gutter.style.fontFamily = fontFamily


      @standardViewSettings =
        padding: 5
        indentWidth: getFontHeight 15, 'Courier New'
        indentTongueHeight: 20
        tabOffset: 10
        tabWidth: 15
