iTextSharp.text.pdf.GlyphList.UnicodeToName C# (CSharp) Метод

UnicodeToName() публичный статический Метод

public static UnicodeToName ( int num ) : string
num int
Результат string
        public static string UnicodeToName(int num)
        {
            string a;
            unicode2names.TryGetValue(num, out a);
            return a;
        }

Usage Example

Пример #1
0
        /** Gets the kerning between two Unicode characters. The characters
         * are converted to names and this names are used to find the kerning
         * pairs in the <CODE>Hashtable</CODE> <CODE>KernPairs</CODE>.
         * @param char1 the first char
         * @param char2 the second char
         * @return the kerning to be applied
         */
        public override int GetKerning(int char1, int char2)
        {
            string first = GlyphList.UnicodeToName((int)char1);

            if (first == null)
            {
                return(0);
            }
            string second = GlyphList.UnicodeToName((int)char2);

            if (second == null)
            {
                return(0);
            }
            Object[] obj = (Object[])KernPairs[first];
            if (obj == null)
            {
                return(0);
            }
            for (int k = 0; k < obj.Length; k += 2)
            {
                if (second.Equals(obj[k]))
                {
                    return((int)obj[k + 1]);
                }
            }
            return(0);
        }
All Usage Examples Of iTextSharp.text.pdf.GlyphList::UnicodeToName