Class FontSize
Inherited Members
Namespace: IronPPT.Models
Assembly: IronPPT.dll
Syntax
public class FontSize : DocUnit, IFontSize, IDocUnit
The point size text renders at, expressed the way PowerPoint stores it, is held by FontSize. It lets a run or a Font carry an exact size while keeping the underlying half-point representation out of everyday code.
HalfPoint, a nullable int, is the stored value: PowerPoint records font sizes in half-points, so a 12-point size is 24 half-points, and leaving it null means no explicit size is set. Most code never touches HalfPoint directly, because FontSize defines an implicit conversion from double, so assigning a plain point value like 18 produces the right FontSize for you. Building on DocUnit, it shares the unit-aware behavior of the library's other measurement types, which is why a size reads naturally as a number while the half-point detail stays internal. Assign a FontSize wherever a size is expected, typically the FontSize property of a Font, and the text renders at that size. To put it to work, style the text it applies to. The text styling workflow shows where size fits alongside typeface.
using IronPPT.Models;
FontSize size = 18;The add text how-to adds and styles text on a slide, and the paragraph style example sets text styling.
Constructors
FontSize()
Declaration
public FontSize()
Properties
HalfPoint
Declaration
public Nullable<int> HalfPoint { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Int32> |
Operators
Implicit(Double to FontSize)
Declaration
public static implicit operator FontSize(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double | value |
Returns
| Type | Description |
|---|---|
| FontSize |