예제 #1
0
 public void CopyFrom(ICSSFont cssFont)
 {
     if (cssFont == null)
     {
         throw new ArgumentNullException("cssFont");
     }
     if (cssFont == this)
     {
         return;
     }
     _width      = cssFont.FontWidth;
     FontStyle   = cssFont.FontStyle;
     FontVariant = cssFont.FontVariant;
     FontStretch = cssFont.FontStretch;
     _sources.Clear();
     foreach (var fontSource in cssFont.Sources)
     {
         var newSource = new FontSource();
         newSource.CopyFrom(fontSource);
         _sources.Add(newSource);
     }
 }
예제 #2
0
 public void CopyFrom(ICSSFont cssFont)
 {
     if (cssFont == null)
     {
         throw new ArgumentNullException("cssFont");
     }
     if (cssFont == this)
     {
         return;
     }
     _width = cssFont.FontWidth;
     FontStyle = cssFont.FontStyle;
     FontVariant = cssFont.FontVariant;
     FontStretch = cssFont.FontStretch;
     _sources.Clear();
     foreach (var fontSource in cssFont.Sources)
     {
         var newSource = new FontSource();
         newSource.CopyFrom(fontSource);
         _sources.Add(newSource);
     }
 }