FontFile.FromFile
FontFile.FromFile method
Load FontFile from file name
public static FontFile FromFile(string fileName)
Parameter | Type | Description |
---|---|---|
fileName | String | Path to the font file |
Return Value
FontFile instance
Examples
The following code shows how to create a 3D mesh from text using specified font file.
var font = FontFile.FromFile(@"CascadiaCode-Regular.otf");
var text = new Text();
text.Font = font;
text.Content = "ABC";
text.FontSize = 10;
var linear = new LinearExtrusion(text, 10).ToMesh();
var scene = new Scene(linear);
scene.Save(@"test.stl");
See Also
- class FontFile
- namespace Aspose.ThreeD.Profiles
- assembly Aspose.3D