Woff2Font
Contents
[
Hide
]
Woff2Font class
Represents one font in the WOFF2 (Web Open Font Format) format
public sealed class Woff2Font : FontResourceBase
Constructors
Name | Description |
---|---|
Woff2Font(string, Stream) | Creates new Woff2Font class from content, represented as byte stream, and with specified name |
Woff2Font(string, string) | Creates new Woff2Font class from content, represented as base64-encoded string, and with specified name |
Properties
Name | Description |
---|---|
ByteContent { get; } | Returns content of this font as byte stream |
FilenameWithExtension { get; } | Returns correct filename of this font resource, which consists of name and extension. Theoretically can differ from the name. |
IsDisposed { get; } | Determines whether this font is disposed or not |
Name { get; } | Returns name of this font resource. Usually doesn’t contain filename extension and theoretically can differ from filename. |
TextContent { get; } | Returns content of this font as base64-encoded string. This value is cached after first invoke. |
override Type { get; } | Returns FontType.Woff2 |
Methods
Name | Description |
---|---|
Dispose() | Disposes this font resource, disposing its content and making most methods and properties non-working |
Equals(FontResourceBase) | Checks this instance with specified font resource on reference equality |
Equals(IHtmlResource) | Checks this instance with specified HTML resource on reference equality |
Save(string) | Saves this font to the specified file |
static IsValid(Stream) | Checks whether specified stream is a valid WOFF2 font |
static IsValid(string) | Checks whether specified base64-encoded string is a valid WOFF2 font |
Fields
Name | Description |
---|---|
const RequiredHeaderSize | WOFF2 header size (in bytes), which is required for its validation |
Events
Name | Description |
---|---|
event Disposed | Event, which occurs when this font is disposed |
See Also
- class FontResourceBase
- namespace GroupDocs.Editor.HtmlCss.Resources.Fonts
- assembly GroupDocs.Editor