Beispiel #1
0
        private void WriteFontRecord(BinaryWriter writer, Font font, ExcelColor color)
        {
            ushort[] clData = { BIFF.FontRecord, 0, 0, 0, color.Index };
            byte[] plainText = Encoding.ASCII.GetBytes(font.FontFamily.Name);
            int iLen = plainText.Length;
            clData[1] = (ushort)(7 + iLen);
            clData[2] = (ushort)(font.SizeInPoints * 20);
            int Flags = 0;
            if (font.Bold)
                Flags |= 1;
            if (font.Italic)
                Flags |= 2;
            if (font.Underline)
                Flags |= 4;
            if (font.Strikeout)
                Flags |= 8;
            clData[3] = (ushort)Flags;

            WriteUshortArray(writer, clData);
            writer.Write((byte)iLen);
            writer.Write(plainText);
        }
Beispiel #2
0
 public FontInfo(Font font, ExcelColor color)
 {
     this.Font  = font;
     this.Color = color;
 }
Beispiel #3
0
 public FontInfo(Font font, ExcelColor color)
 {
     this.Font = font;
     this.Color = color;
 }