Enum FontFileFormatType

FontFileFormatType enumeration

Represents font format type.

public enum FontFileFormatType

Values

NameValueDescription
Unknown0Unknown font format type.
Ttf1TTF font format type.
Otf2OTF font format type.
Ttc3TTC font format type.

Examples

namespace AsposeCellsExamples
{
    using Aspose.Cells;
    using System;

    public class CellsClassFontFileFormatTypeDemo
    {
        public static void Run()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets[0];

            // Access a cell and set its style
            Cell cell = worksheet.Cells["A1"];
            cell.PutValue("Font Format Type Demo");
            Style style = cell.GetStyle();

            // Demonstrate FontFileFormatType usage
            FontFileFormatType fontFormat = FontFileFormatType.Ttf;
            Console.WriteLine("Selected font format: " + fontFormat.ToString());

            // Apply font settings
            style.Font.Name = "Arial";
            style.Font.Size = 14;
            cell.SetStyle(style);

            // Check font format compatibility
            if (fontFormat == FontFileFormatType.Ttf)
            {
                Console.WriteLine("Using TrueType font format");
            }

            // Save the workbook
            workbook.Save("FontFileFormatTypeDemo.xlsx");
        }
    }
}

See Also