iTextSharp.text.FontFactoryImp.RegisterFamily C# (CSharp) Метод

RegisterFamily() публичный Метод

public RegisterFamily ( String familyName, String fullName, String path ) : void
familyName String
fullName String
path String
Результат void
        public void RegisterFamily(String familyName, String fullName, String path)
        {
            if (path != null)
                trueTypeFonts[fullName] = path;
            List<string> tmp;
            fontFamilies.TryGetValue(familyName, out tmp);
            if (tmp == null) {
                tmp = new List<string>();
                tmp.Add(fullName);
                fontFamilies[familyName] = tmp;
            }
            else {
                int fullNameLength = fullName.Length;
                bool inserted = false;
                for (int j = 0; j < tmp.Count; ++j) {
                    if (tmp[j].Length >= fullNameLength) {
                        tmp.Insert(j, fullName);
                        inserted = true;
                        break;
                    }
                }
                if (!inserted)
                    tmp.Add(fullName);
            }
        }

Usage Example

Пример #1
0
 /**
  * Register a font by giving explicitly the font family and name.
  * @param familyName the font family
  * @param fullName the font name
  * @param path the font path
  */
 public static void RegisterFamily(String familyName, String fullName, String path)
 {
     fontImp.RegisterFamily(familyName, fullName, path);
 }
All Usage Examples Of iTextSharp.text.FontFactoryImp::RegisterFamily