Skip to main content
All docs
V26.1
  • TextFont Struct

    Contains properties that specify font settings for presentation text.

    Namespace: DevExpress.Docs.Office

    Assembly: DevExpress.Docs.Core.v26.1.dll

    NuGet Package: DevExpress.Docs.Core

    Declaration

    public readonly struct TextFont

    Remarks

    The following code snippet specifies the Latin font for shape text:

    using DevExpress.Docs.Office;
    using DevExpress.Docs.Presentation;
    
    Shape shape = new Shape(ShapeType.Rectangle, 0, 0, presentation.SlideSize.Width, presentation.SlideSize.Height);
    shape.TextArea = new TextArea("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.") {
        Level1ParagraphProperties = new TextParagraphProperties { TextProperties = new TextProperties { FontSize=30, LatinFont = new TextFont("Calibri") } }
    };
    slide.Shapes.Add(shape);
    

    For information on how to load custom fonts, refer to the following help topic: Load and Use Custom Fonts in Office & PDF File API Applications.

    See Also