FontSavingArgs class

FontSavingArgs class

Provides data for the IFontSavingCallback.font_saving() event. To learn more, visit the Save a Document documentation article.

Remarks

When Aspose.Words saves a document to HTML or related formats and HtmlSaveOptions.export_font_resources is set to True, it saves each font subject for export into a separate file.

FontSavingArgs controls whether particular font resource should be exported and how.

FontSavingArgs also allows to redefine how font file names are generated or to completely circumvent saving of fonts into files by providing your own stream objects.

To decide whether to save a particular font resource, use the FontSavingArgs.is_export_needed property.

To save fonts into streams instead of files, use the FontSavingArgs.font_stream property.

Properties

NameDescription
boldIndicates whether the current font is bold.
documentGets the document object that is being saved.
font_family_nameIndicates the current font family name.
font_file_nameGets or sets the file name (without path) where the font will be saved to.
font_streamAllows to specify the stream where the font will be saved to.
is_export_neededAllows to specify whether the current font will be exported as a font resource. Default is True.
is_subsetting_neededAllows to specify whether the current font will be subsetted before exporting as a font resource.
italicIndicates whether the current font is italic.
keep_font_stream_openSpecifies whether Aspose.Words should keep the stream open or close it after saving a font.
original_file_nameGets the original font file name with an extension.
original_file_sizeGets the original font file size.

See Also