diff --git a/web/org.openbravo.mobile.core/source/utils/ob-utilitiesui.js b/web/org.openbravo.mobile.core/source/utils/ob-utilitiesui.js
--- a/web/org.openbravo.mobile.core/source/utils/ob-utilitiesui.js
+++ b/web/org.openbravo.mobile.core/source/utils/ob-utilitiesui.js
@@ -706,8 +706,8 @@
   }
 };
 
-/* Adapt component font for dom object with id = objId */
-OB.UTIL.adaptFontSize = function (objId, minFntSz, maxFntSz, maxHgt, minLnCalc) {
+/* Adapt component font for dom object, passing the obj itself or its id as first argument */
+OB.UTIL.adaptFontSize = function (obj, minFntSz, maxFntSz, maxHgt, minLnCalc) {
 
   var maxWidth = false,
       currentWidth = false,
@@ -737,7 +737,11 @@
       currentTextObj.style.fontSize = finalFontSize + 'px';
     }
   }
-  currentBox = document.getElementById(objId);
+  if (typeof obj === 'string') {
+    currentBox = document.getElementById(obj);
+  } else if (typeof obj === 'object') {
+    currentBox = obj;
+  }
   if (!currentBox) {
     return;
   }
@@ -757,58 +761,18 @@
 
 /* Adapt all component's font for components with 'fitText' or 'buttonText' class */
 OB.UTIL.adaptAllFontSizes = function () {
+  var classNameArr = ['fitText', 'buttonText'],
+      minFontSize, maxFontSize, maxHeight, minLengthForCalc;
 
-  var maxWidth = false,
-      currentWidth = false,
-      currentBox = false,
-      currentTextObj = false,
-      classNameArr = ['fitText', 'buttonText'],
-      minFontSize = false,
-      maxFontSize = false,
-      maxHeight = false,
-      minLengthForCalc = 10;
-
-  function fit(maxFontSize) {
-    //to number
-    var tmpFontSize = OB.DEC.add(currentTextObj.style.fontSize.replace('px', ''), 0, 0);
-    currentTextObj.style.fontSize = tmpFontSize + 1 + 'px';
-    var tmpWidth = currentTextObj.offsetWidth,
-        tmpHeight = currentTextObj.offsetHeight,
-        finalFontSize = 0;
-    if (tmpWidth >= currentWidth && tmpWidth < maxWidth && tmpHeight < maxHeight && tmpFontSize < maxFontSize) {
-      currentWidth = currentTextObj.offsetWidth;
-      fit(maxFontSize);
-    } else {
-      finalFontSize = OB.DEC.add(currentTextObj.style.fontSize.replace('px', ''), 0, 0) - OB.DEC.One;
-      if (maxFontSize && maxFontSize < finalFontSize) {
-        finalFontSize = maxFontSize;
-      }
-      currentTextObj.style.fontSize = finalFontSize + 'px';
-    }
-  }
   _.each(classNameArr, function (className) {
     var objs = document.getElementsByClassName(className);
     if (objs.length !== 0) {
       minFontSize = className === 'buttonText' ? 15 : 9;
       maxFontSize = className === 'buttonText' ? 30 : 16;
       maxHeight = className === 'buttonText' ? 57 : 18;
+      minLengthForCalc = 10;
       _.each(objs, function (obj) {
-        currentBox = obj;
-        if (!currentBox) {
-          return;
-        }
-        currentTextObj = currentBox.getElementsByTagName('SPAN')[0];
-        currentTextObj.style.fontSize = maxFontSize + 'px';
-        maxWidth = currentBox.offsetWidth;
-        if (currentTextObj.offsetWidth !== 0 && currentTextObj.textContent.length >= minLengthForCalc) {
-          // start with the minFontSize(9px or 16px) to reduce iterations
-          // 9px is the minimum font size for the text and 16px is the minimun font size for the button
-          currentTextObj.style.fontSize = minFontSize + 'px';
-          currentWidth = currentTextObj.offsetWidth;
-          fit(maxFontSize);
-        } else {
-          currentTextObj.style.fontSize = maxFontSize + 'px';
-        }
+        OB.UTIL.adaptFontSize = function (obj, minFontSize, maxFontSize, maxHeight, minLengthForCalc);
       });
     }
   });
