Esempio n. 1
0
 public FontInfo(System.Drawing.Font font, ExcelColor color)
 {
     this.Font = font;
     this.Color = color;
 }
Esempio n. 2
0
 private void WriteFontRecord(BinaryWriter writer, Font font, ExcelColor color)
 {
     ushort[] numArray2 = new ushort[5];
     numArray2[0] = 0x231;
     numArray2[4] = color.Index;
     ushort[] numArray = numArray2;
     byte[] bytes = Encoding.ASCII.GetBytes(font.FontFamily.Name);
     int length = bytes.Length;
     numArray[1] = (ushort) (7 + length);
     numArray[2] = (ushort) (font.SizeInPoints * 20f);
     int num2 = 0;
     if (font.Bold)
     {
         num2 |= 1;
     }
     if (font.Italic)
     {
         num2 |= 2;
     }
     if (font.Underline)
     {
         num2 |= 4;
     }
     if (font.Strikeout)
     {
         num2 |= 8;
     }
     numArray[3] = (ushort) num2;
     WriteUshortArray(writer, numArray);
     writer.Write((byte) length);
     writer.Write(bytes);
 }