FontSourceType
FontSourceType enumeration
Gibt den Typ einer Schriftartquelle an.
public enum FontSourceType
Werte
Name | Wert | Beschreibung |
---|---|---|
FontFile | 0 |
AFileFontSource Objekt, das eine einzelne Schriftdatei darstellt. |
FontsFolder | 1 |
AFolderFontSource Objekt, das Ordner mit Schriftdateien darstellt. |
MemoryFont | 2 |
AMemoryFontSource Objekt, das eine einzelne Schriftart im Speicher darstellt. |
SystemFonts | 3 |
ASystemFontSource Objekt, das alle auf dem System installierten Schriftarten darstellt. |
FontStream | 4 |
AStreamFontSource Objekt, das einen Stream mit Schriftdaten darstellt. |
Beispiele
Zeigt, wie eine Schriftartdatei im lokalen Dateisystem als Schriftartquelle verwendet wird.
FileFontSource fileFontSource = new FileFontSource(MyDir + "Alte DIN 1451 Mittelschrift.ttf", 0);
Document doc = new Document();
doc.FontSettings = new FontSettings();
doc.FontSettings.SetFontsSources(new FontSourceBase[] {fileFontSource});
Assert.AreEqual(MyDir + "Alte DIN 1451 Mittelschrift.ttf", fileFontSource.FilePath);
Assert.AreEqual(FontSourceType.FontFile, fileFontSource.Type);
Assert.AreEqual(0, fileFontSource.Priority);
Siehe auch
- namensraum Aspose.Words.Fonts
- Montage Aspose.Words