         //  Class methods
         //
         //--------------------------------------------------------------------------
+        /**
+         *  @private
+         */
+        public static function getNumberOrPercentOf(value:Object,
+                                                    n:Number):Number
+        {
+            // If 'value' is a Number like 10.5, return it.
+            if (value is Number)
+                return Number(value);
+            
+            // If 'value' is a percentage String like "10.5%",
+            // return that percentage of 'n'.
+            if (value is String)
+            {
+                var len:int = String(value).length;
+                if (len >= 1 && value.charAt(len - 1) == "%")
+                {
+                    var percent:Number = Number(value.substring(0, len - 1));
+                    return percent / 100 * n;
+                }
+            }
+            
+            // Otherwise, return NaN.
+            return NaN;
+        }        
         
         /**
          *  @private

            {
                var value:Object = getStyle("lineHeight");     
                var lineHeight:Number =
                    TextUtil.getNumberOrPercentOf(value, getStyle("fontSize"));
                
                // Default is 120%
                if (isNaN(lineHeight))

                strToInsert +
                str.substring(end, str.length);
        }

        //--------------------------------------------------------------------------
        //
        //  Constructor
