public abstract class FontResourceBase extends Object implements IHtmlResource
Base class for any supported font type as a resource for the HTML document with all its properties
| Modifier and Type | Field and Description |
|---|---|
protected String |
_base64TextContent
Content of the font in base64-encoded form, stored in the string
|
protected com.aspose.ms.System.IO.Stream |
_binaryContent
Content of the font in the stream
|
protected String |
_name
Name of the font resource, which serves as its unique identifier.
|
protected long |
_streamOrigPosition
Original position in the stream, which indicates the beginning of the
font content
|
Event<EventHandler> |
Disposed
Event, which occurs when this font is disposed
|
| Constructor and Description |
|---|
FontResourceBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes this font resource, disposing its content and making most
methods and properties non-working
|
boolean |
equals(FontResourceBase other)
Checks this instance with specified font resource on reference equality
|
boolean |
equals(IHtmlResource other)
Checks this instance with specified HTML resource on reference equality
|
InputStream |
getByteContent()
Returns content of this font as byte stream
|
String |
getFilenameWithExtension()
Returns correct filename of this font resource, which consists of name
and extension.
|
String |
getName()
Returns name of this font resource.
|
String |
getTextContent()
Returns content of this font as base64-encoded string.
|
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
|
boolean |
isDisposed()
Determines whether this font is disposed or not
|
void |
save(String fullPathToFile)
Saves this font to the specified file
|
protected String _base64TextContent
Content of the font in base64-encoded form, stored in the string
protected com.aspose.ms.System.IO.Stream _binaryContent
Content of the font in the stream
protected String _name
Name of the font resource, which serves as its unique identifier. Should not be changed (readonly) after creating an instance of the class.
protected long _streamOrigPosition
Original position in the stream, which indicates the beginning of the font content
public final Event<EventHandler> Disposed
public final void dispose()
Disposes this font resource, disposing its content and making most methods and properties non-working
dispose in interface IDisposablepublic final boolean equals(FontResourceBase other)
Checks this instance with specified font resource on reference equality
other - Other inheritor of FontResourceBase abstract classpublic final boolean equals(IHtmlResource other)
Checks this instance with specified HTML resource on reference equality
other - Other inheritor of IHtmlResource interfacepublic final InputStream getByteContent()
Returns content of this font as byte stream
getByteContent in interface IHtmlResourcepublic final String getFilenameWithExtension()
Returns correct filename of this font resource, which consists of name and extension. Theoretically can differ from the name.
getFilenameWithExtension in interface IHtmlResourcepublic final String getName()
Returns name of this font resource. Usually doesn't contain filename extension and theoretically can differ from filename.
getName in interface IHtmlResourcepublic final String getTextContent()
Returns content of this font as base64-encoded string. This value is cached after first invoke.
getTextContent in interface IHtmlResourcepublic 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
getType in interface IHtmlResourcepublic final boolean isDisposed()
Determines whether this font is disposed or not
isDisposed in interface IAuxDisposablepublic final void save(String fullPathToFile)
Saves this font to the specified file
save in interface IHtmlResourcefullPathToFile - Full path to the file, which will be created or
rewrittenCopyright © 2024. All rights reserved.