/// <summary> /// copy constructor /// </summary> /// <param name="fromMgFont"></param> public MgFont(MgFont fromMgFont) { Index = fromMgFont.Index; Height = fromMgFont.Height; Style = fromMgFont.Style; TypeFace = fromMgFont.TypeFace; Orientation = fromMgFont.Orientation; CharSet = fromMgFont.CharSet; }
/// <summary> /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(Object obj) { if (obj != null && obj is MgFont) { MgFont otherFont = (MgFont)obj; if (this == otherFont) { return(true); } else { if ( (Height == otherFont.Height) && (Style == otherFont.Style) && (Orientation == otherFont.Orientation) && ((TypeFace == null && otherFont.TypeFace == null) || (TypeFace.Equals(otherFont.TypeFace))) && (CharSet == otherFont.CharSet) ) { return(true); } } } return(false); }