示例#1
0
 public int GetKerning(char first, char second)
 {
     KernKey key = new KernKey((int)first, (int)second);
     int outValue;
     if(_kernData.TryGetValue(key, out outValue))
     {
         return outValue;
     }
     return 0;
 }
        public int GetKerning(char first, char second)
        {
            KernKey key = new KernKey((int)first, (int)second);
            int     outValue;

            if (_kernData.TryGetValue(key, out outValue))
            {
                return(outValue);
            }
            return(0);
        }
示例#3
0
 private static void ParseKernData(int start, string[] lines, Dictionary <KernKey, int> kernDictionary)
 {
     for (int i = start; i < lines.Length; i += 1)
     {
         string   line           = lines[i];
         string[] typesAndValues = line.Split(" ".ToCharArray(),
                                              StringSplitOptions.RemoveEmptyEntries);
         // As before the order of the enteries is used to make the parsing simpler.
         KernKey key = new KernKey(GetValue(typesAndValues[1]), GetValue(typesAndValues[2]));
         kernDictionary.Add(key, GetValue(typesAndValues[3]));
     }
 }
示例#4
0
 private static void ParseKernData(int start, string[] lines, Dictionary<KernKey, int> kernDictionary)
 {
     for (int i = start; i < lines.Length; i += 1)
     {
         string line = lines[i];
         string[] typesAndValues = line.Split(" ".ToCharArray(), 
             StringSplitOptions.RemoveEmptyEntries);
         // As before the order of the enteries is used to make the parsing simpler.
         KernKey key = new KernKey(GetValue(typesAndValues[1]), GetValue(typesAndValues[2]));
         kernDictionary.Add(key, GetValue(typesAndValues[3]));
     }
 }