WebFont Constructor
Creates an instance of a WebFont.
public WebFont( LocalFont? fallbackFont = null, string? woffUrl = null, string? woff2Url = null, string? trueTypeUrl = null, string? openTypeUrl = null )
Parameters
- fallbackFont LocalFont (Optional)
- Fallback font to be used if the font files cannot be loaded.
- woffUrl String (Optional)
- URL to a WOFF font file to be included as a @font-face.
- woff2Url String (Optional)
- URL to a WOFF2 font file to be included as a @font-face.
- trueTypeUrl String (Optional)
- URL to a TypeType font file to be included as a @font-face.
- openTypeUrl String (Optional)
- URL to a OpenType font file to be included as a @font-face.
Exceptions
Exception | Condition |
---|---|
ArgumentException | None of the url parameters were specified. |
Remarks
Note that standalone SVGs must not reference external resources. If you intend to create standalone SVG files, ensure the font URLs are data URLs.