Skip to main content

ITypeface

Git Source

Functions

name

Returns the typeface name.

function name() external view returns (string memory);

supportsCodePoint

Check if typeface includes a glyph for a specific character code point.

3 bytes supports all possible unicodes.

function supportsCodePoint(bytes3 codePoint) external view returns (bool);

Parameters

NameTypeDescription
codePointbytes3Character code point.

Returns

NameTypeDescription
<none>booltrue True if supported.

sourceOf

Return source data of Font.

function sourceOf(Font memory font) external view returns (bytes memory);

Parameters

NameTypeDescription
fontFontFont to return source data for.

Returns

NameTypeDescription
<none>bytessource Source data of font.

hasSource

Checks if source data has been stored for font.

function hasSource(Font memory font) external view returns (bool);

Parameters

NameTypeDescription
fontFontFont to check if source data exists for.

Returns

NameTypeDescription
<none>booltrue True if source exists.

setSource

Stores source data for a font.

function setSource(Font memory font, bytes memory source) external;

Parameters

NameTypeDescription
fontFontFont to store source data for.
sourcebytesSource data of font.

setDonationAddress

Sets a new donation address.

function setDonationAddress(address donationAddress) external;

Parameters

NameTypeDescription
donationAddressaddressNew donation address.

donationAddress

Returns donation address

function donationAddress() external view returns (address);

Returns

NameTypeDescription
<none>addressdonationAddress Donation address.

Events

SetSource

Emitted when the source is set for a font.

event SetSource(Font font);

SetSourceHash

Emitted when the source hash is set for a font.

event SetSourceHash(Font font, bytes32 sourceHash);

SetDonationAddress

Emitted when the donation address is set.

event SetDonationAddress(address donationAddress);