DefaultRegularFont

LoadOptions.DefaultRegularFont-Eigenschaft

Gibt die reguläre Schriftart zurück oder legt sie fest, die verwendet wird, wenn die Quellet Schriftart nicht gefunden wird. Lese-/Schreib-String.

public string DefaultRegularFont { get; set; }

Beispiele

Das folgende Beispiel zeigt, wie man Standard-Schriftarten für das Rendern von PowerPoint-Präsentationen festlegt.

[C#]
// Verwende Ladeoptionen, um die Standardschriftarten für reguläre und asiatische Schriftarten festzulegen
LoadOptions loadOptions = new LoadOptions(LoadFormat.Auto);
loadOptions.DefaultRegularFont = "Wingdings";
loadOptions.DefaultAsianFont = "Wingdings";
// Lade die Präsentation
using (Presentation pptx = new Presentation("DefaultFonts.pptx", loadOptions))
{
    // Generiere ein Miniaturbild der Folie
    pptx.Slides[0].GetThumbnail(1, 1).Save("output_out.png", ImageFormat.Png);
    // Generiere PDF
    pptx.Save("output_out.pdf", SaveFormat.Pdf);
    // Generiere XPS
    pptx.Save("output_out.xps", SaveFormat.Xps);
}

Siehe Auch