Ejemplo n.º 1
0
 public bool Equals(BitFont font)
 {
     if (IsSystemFont && font.IsSystemFont)
     {
         return(ID == font.ID);
     }
     if (chars == null)
     {
         EnsureLoaded();
     }
     if (font.chars == null)
     {
         font.EnsureLoaded();
     }
     if (font.chars.Length != chars.Length || font.Width != Width || font.Height != Height)
     {
         return(false);
     }
     for (int i = 0; i < chars.Length; i++)
     {
         if (!chars[i].Equals(font.chars[i]))
         {
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 2
0
        public BitFont(BitFont source)
        {
            if (source.chars == null)
            {
                source.EnsureLoaded();
            }
            ID             = source.ID;
            Name           = source.Name;
            FontSet        = source.FontSet;
            CodePage       = source.CodePage;
            chars          = new FontCharacter[source.chars.Length];
            Width          = source.Width;
            Height         = source.Height;
            LegacyRatio    = source.LegacyRatio;
            Is9xFont       = source.Is9xFont;
            SauceID        = source.SauceID;
            IsStandardFont = source.IsStandardFont;
            IsSystemFont   = source.IsSystemFont;

            for (int i = 0; i < chars.Length; i++)
            {
                chars[i] = new FontCharacter(source.chars[i], this);
            }
        }