IFontInfo
Leave feedback
On this page
public interface IFontInfo
Common interface for all fonts that can be extracted from document formats: PDF, WordProcessing, Spreadsheet, and Presentation.
| Method | Description |
|---|---|
| getFamilyName() | Family name of the font as a string. |
| getStyle() | Style of the font \u2014 Regular, Bold, Italic, or BoldItalic. |
| getFormat() | Format of the font \u2014 TrueType, TrueType Collection, OpenType, Embedded OpenType, or Unknown. |
| getContent() | Binary content of the font, or null if not available. |
| serializeToCss(Writer output) | Serializes this font info as a @font-face at-rule and writes it to the specified writer. |
public abstract String getFamilyName()
Family name of the font as a string.
Returns: java.lang.String
public abstract FontStyles getStyle()
Style of the font \u2014 Regular, Bold, Italic, or BoldItalic. Some document formats may have only Regular.
Returns: com.groupdocs.viewer.fonts.FontStyles
public abstract int getFormat()
Format of the font \u2014 TrueType, TrueType Collection, OpenType, Embedded OpenType, or Unknown.
Returns: int
public abstract byte[] getContent()
Binary content of the font, or null if not available.
Returns: byte[]
public abstract void serializeToCss(Writer output)
Serializes this font info as a @font-face at-rule and writes it to the specified writer.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| output | java.io.Writer | destination writer |
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.