/// <summary>
		/// Create an ASCII Ramp with from the given font and characters
		/// </summary>
		/// <param name="font">Font to be used</param>
		/// <param name="characters">The characters to be used for the ramp</param>
		/// <returns>A new ASCII ramp</returns>
		public static string CreateRamp(Font font, string characters)
		{
			if (characters == null || characters.Length < 1)
				return null;

			if (characters.Length == 1)
				return characters;

			string characterstring = "";

			foreach (char c in characters.ToCharArray())
			{
				if (characterstring.IndexOf(c) == -1)
				{
					characterstring += c.ToString();
				}
			}

			System.Collections.SortedList list = new System.Collections.SortedList();

			int min = 255;
			int max = 0;

			CharacterValue charval;

			for (int i = 0; i < characterstring.Length; i++)
			{
				charval = new CharacterValue(characterstring[i], font);

				if (list.ContainsKey(charval.Value))
				{
					if (charval.Score < ((CharacterValue)list[charval.Value]).Score)
					{
						list[charval.Value] = charval;
					}
				}
				else
				{
					if (charval.Value < min)
						min = charval.Value;

					if (charval.Value > max)
						max = charval.Value;

					list.Add(charval.Value, charval);
				}
			}

			list.TrimToSize();


			string result = "";

			System.Collections.IDictionaryEnumerator idenu = list.GetEnumerator();

			// move to the first object
			idenu.MoveNext();

			int current = (int)idenu.Key;
			int next, mid;

			// loop through and fill in the gaps
			while (idenu.MoveNext())
			{
				next = (int)idenu.Key;
				mid = ((next - current) / 2) + current;

				for (int i = current; i < mid; i++)
				{
					result += list[current];
				}

				for (int i = mid; i < next; i++)
				{
					result += list[next];
				}

				current = next;
			}

			return result;
		}
        /// <summary>
        /// Create an ASCII Ramp with from the given font and characters
        /// </summary>
        /// <param name="font">Font to be used</param>
        /// <param name="characters">The characters to be used for the ramp</param>
        /// <returns>A new ASCII ramp</returns>
        public static string CreateRamp(Font font, string characters)
        {
            if (characters == null || characters.Length < 1)
            {
                return(null);
            }

            if (characters.Length == 1)
            {
                return(characters);
            }

            string characterstring = "";

            foreach (char c in characters.ToCharArray())
            {
                if (characterstring.IndexOf(c) == -1)
                {
                    characterstring += c.ToString();
                }
            }

            System.Collections.SortedList list = new System.Collections.SortedList();

            int min = 255;
            int max = 0;

            CharacterValue charval;

            for (int i = 0; i < characterstring.Length; i++)
            {
                charval = new CharacterValue(characterstring[i], font);

                if (list.ContainsKey(charval.Value))
                {
                    if (charval.Score < ((CharacterValue)list[charval.Value]).Score)
                    {
                        list[charval.Value] = charval;
                    }
                }
                else
                {
                    if (charval.Value < min)
                    {
                        min = charval.Value;
                    }

                    if (charval.Value > max)
                    {
                        max = charval.Value;
                    }

                    list.Add(charval.Value, charval);
                }
            }

            list.TrimToSize();


            string result = "";

            System.Collections.IDictionaryEnumerator idenu = list.GetEnumerator();

            // move to the first object
            idenu.MoveNext();

            int current = (int)idenu.Key;
            int next, mid;

            // loop through and fill in the gaps
            while (idenu.MoveNext())
            {
                next = (int)idenu.Key;
                mid  = ((next - current) / 2) + current;

                for (int i = current; i < mid; i++)
                {
                    result += list[current];
                }

                for (int i = mid; i < next; i++)
                {
                    result += list[next];
                }

                current = next;
            }

            return(result);
        }