FontResourceBase
Leave feedback
On this page
Inheritance: java.lang.Object
All Implemented Interfaces: com.groupdocs.editor.htmlcss.resources.IHtmlResource
public abstract class FontResourceBase implements IHtmlResource
Base class for any supported font type as a resource for the HTML document with all its properties
| Constructor | Description |
|---|---|
| FontResourceBase() |
| Field | Description |
|---|---|
| Disposed | Event, which occurs when this font is disposed |
| Method | Description |
|---|---|
| getName() | Returns name of this font resource. |
| getFilenameWithExtension() | Returns correct filename of this font resource, which consists of name |
| and extension. | |
| getByteContent() | Returns content of this font as byte stream |
| getTextContent() | Returns content of this font as base64-encoded string. |
| save(String fullPathToFile) | Saves this font to the specified file |
| equals(IHtmlResource other) | Checks this instance with specified HTML resource on reference equality |
| equals(FontResourceBase other) | Checks this instance with specified font resource on reference equality |
| dispose() | Disposes this font resource, disposing its content and making most |
| methods and properties non-working | |
| isDisposed() | Determines whether this font is disposed or not |
| getType() | In implementing type should return information about type of specific |
| font resource as an instance of specific FontType type, which | |
| encapsulates all type-specific info | |
public FontResourceBase()
public final Event<EventHandler> Disposed
Event, which occurs when this font is disposed
public final String getName()
Returns name of this font resource. Usually doesn’t contain filename extension and theoretically can differ from filename.
Returns: java.lang.String
public final String getFilenameWithExtension()
Returns correct filename of this font resource, which consists of name and extension. Theoretically can differ from the name.
Returns: java.lang.String
public final InputStream getByteContent()
Returns content of this font as byte stream
Returns: java.io.InputStream -
public final String getTextContent()
Returns content of this font as base64-encoded string. This value is cached after first invoke.
Returns: java.lang.String -
public final void save(String fullPathToFile)
Saves this font to the specified file
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fullPathToFile | java.lang.String | Full path to the file, which will be created or rewritten |
public final boolean equals(IHtmlResource other)
Checks this instance with specified HTML resource on reference equality
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | IHtmlResource | Other inheritor of IHtmlResource interface |
Returns: boolean - True if are equal, false if are unequal
public final boolean equals(FontResourceBase other)
Checks this instance with specified font resource on reference equality
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | FontResourceBase | Other inheritor of FontResourceBase abstract class |
Returns: boolean - True if are equal, false if are unequal
public final void dispose()
Disposes this font resource, disposing its content and making most methods and properties non-working
public final boolean isDisposed()
Determines whether this font is disposed or not
Returns: boolean -
public abstract FontType getType()
In implementing type should return information about type of specific font resource as an instance of specific FontType type, which encapsulates all type-specific info
Returns: FontType
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.