IFontInfo
public interface IFontInfo
Common interface for all fonts that can be extracted from document formats: PDF, WordProcessing, Spreadsheet, and Presentation.
Methods
| 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. |
getFamilyName()
public abstract String getFamilyName()
Family name of the font as a string.
Returns: java.lang.String
getStyle()
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
getFormat()
public abstract int getFormat()
Format of the font \u2014 TrueType, TrueType Collection, OpenType, Embedded OpenType, or Unknown.
Returns: int
getContent()
public abstract byte[] getContent()
Binary content of the font, or null if not available.
Returns: byte[]
serializeToCss(Writer output)
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 |