title: Anything wrong about this code? This is giving me corrupted content
body: <pre><code>private static void UpdateFontSettings(WordprocessingDocument content, WordprocessingDocument template)
  
      {
          if (content != null &amp;&amp; content.MainDocumentPart != null &amp;&amp; content.MainDocumentPart.FontTablePart != null &amp;&amp;
              template != null &amp;&amp; template.MainDocumentPart != null &amp;&amp; template.MainDocumentPart.FontTablePart != null)
          {
              IEnumerable&lt;OpenXmlPart&gt; partsToDelete = from idPartPair in content.MainDocumentPart.FontTablePart.Parts
                                                       select idPartPair.OpenXmlPart;
  
              content.MainDocumentPart.FontTablePart.DeleteParts(partsToDelete);
  
              StreamReader streamReader = null;
              StreamWriter streamWriter = null;
  
              try
              {
                  streamReader = new StreamReader(template.MainDocumentPart.FontTablePart.GetStream());
                  streamWriter = new StreamWriter(content.MainDocumentPart.FontTablePart.GetStream(FileMode.Create));
              }
              catch
              {
                  if (streamReader != null)
                  {
                      streamReader.Close();
                  }
  
                  throw;
              }
  
              using (streamWriter)
              {
                  streamWriter.Write(streamReader.ReadToEnd());
              }
  
              if (streamReader != null)
              {
                  streamReader.Close();
              }
          }
      }
  </code></pre>