Search Results for

    Show / Hide Table of Contents

    Class Font

    Inheritance
    System.Object
    Font
    Implements
    IFont
    Namespace: IronPPT.Models
    Assembly: IronPPT.dll
    Syntax
    public class Font : Object, IFont

    Font is the record you set on a run or paragraph style to control which typeface and size text is drawn in. It collects the font choices that PowerPoint tracks separately for different scripts, so a single object describes how Latin, East Asian, and complex-script text should each appear, plus the point size they share.

    A Font is built with new Font() and assigned to the text style that owns it, where it travels with the run or paragraph it styles. LatinFont names the typeface for ordinary Latin characters, EastAsia names the one for East Asian characters, and ComplexScript covers complex scripts such as Arabic or Hebrew. SymbolFont selects a symbol typeface, and FontFamily carries the family name when a single name applies. Each of these is a plain string, the font name as PowerPoint would list it, so spelling and casing should match an installed or embedded face.

    FontSize holds the size as a FontSize object rather than a raw number, which keeps the point value and its unit handling in one place; assign one and the run renders at that size. Set only the script slots a deck actually uses, a Latin-only presentation needs LatinFont alone, while a multilingual deck benefits from filling EastAsia and ComplexScript so each script keeps its intended face. Because Font is consumed by the text styling layer rather than created in isolation, configure it as part of styling a run or paragraph. The text and paragraph styling workflow is the place to apply it.

    using IronPPT.Models;
    
    var font = new Font();
    font.LatinFont = "Calibri";
    font.FontSize = 18;

    The add text how-to adds text to a slide, the paragraph style example styles a paragraph, and the add paragraph example builds the run a font applies to.

    Constructors

    Font()

    Declaration
    public Font()

    Properties

    ComplexScript

    Declaration
    public string ComplexScript { get; set; }
    Property Value
    Type Description
    System.String

    EastAsia

    Declaration
    public string EastAsia { get; set; }
    Property Value
    Type Description
    System.String

    FontFamily

    Declaration
    public string FontFamily { get; set; }
    Property Value
    Type Description
    System.String

    FontSize

    Declaration
    public FontSize FontSize { get; set; }
    Property Value
    Type Description
    FontSize

    LatinFont

    Declaration
    public string LatinFont { get; set; }
    Property Value
    Type Description
    System.String

    SymbolFont

    Declaration
    public string SymbolFont { get; set; }
    Property Value
    Type Description
    System.String

    Implements

    IFont
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet