Search Results for

    Show / Hide Table of Contents

    Interface IFontSize

    Inherited Members
    IDocUnit.ToString()
    IDocUnit.CM
    IDocUnit.EMU
    IDocUnit.Inch
    IDocUnit.MM
    IDocUnit.Percentage
    IDocUnit.Point
    IDocUnit.Twips
    Namespace: IronPPT.Interfaces
    Assembly: IronPPT.dll
    Syntax
    public interface IFontSize : IDocUnit

    Expressing the size of text in the unit PowerPoint stores it in runs through IFontSize. The contract adds a HalfPoint property, a nullable integer holding the size in half-point units (the native font-size unit, where 24 means 12 points), on top of the multi-unit measurement contract it extends. Coding against the contract lets text-sizing logic set or read a size in half-points without rebuilding the conversion that font sizing needs.

    The concrete implementor in IronPPT is FontSize, which is what a Font returns from its FontSize property. Because the type also satisfies the broader unit contract it extends, a developer can read the same size in inches, points, or other units, while HalfPoint is the value that maps directly to how PowerPoint records font size. A developer usually receives a FontSize from a font rather than constructing it, then sets HalfPoint to apply an exact size.

    fontSize.HalfPoint = 24;

    The add text how-to covers adding and sizing text, and the paragraph style example sets font sizes while styling content.

    Properties

    HalfPoint

    Declaration
    Nullable<int> HalfPoint { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Int32>

    Inherited members

    ToString()
    CM
    EMU
    Inch
    MM
    Percentage
    Point
    Twips
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet